Megvii-BaseDetection / BEVDepth

Official code for BEVDepth.
MIT License
730 stars 101 forks source link

error: no instance of overloaded function "atomicAdd" matches the argument list #159

Open yukaizhou opened 1 year ago

yukaizhou commented 1 year ago

Hi,Encountered the following questions when configuring the environment, and look forward to your answers.

-D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 /dfs/data/code_python/detection_3d/BEVDepth_sec/bevdepth/ops/voxel_pooling_train/src/voxel_pooling_train_forward_cuda.cu(60): error: no instance of overloaded function "atomicAdd" matches the argument list argument types are: (half , const half) detected during instantiation of "void voxel_pooling_train_forward_kernel(int, int, int, int, int, int, const int , const T , T , int *) [with T=half]" (99): here

1 error detected in the compilation of "/dfs/data/code_python/detection_3d/BEVDepth_sec/bevdepth/ops/voxel_pooling_train/src/voxel_pooling_train_forward_cuda.cu".

zhenghw2000 commented 1 year ago

Hello, have you solved this problem?

IranQin commented 1 year ago

Did anyone solve this problem? I try all versions of Torch but still have this problem.

steven9046 commented 1 year ago

same error. any suggestion?

IranQin commented 1 year ago

One suggestion, use bevdet-depth config in bevdet repo.

ZM-Zhou commented 1 year ago

I sloved this by setting export TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6+PTX" before use python setup.py develop I think it is because the "atomicAdd" with Half type only support the GPU with 7.x+ Compute Capability