XuyangBai / TransFusion

[PyTorch] Official implementation of CVPR2022 paper "TransFusion: Robust LiDAR-Camera Fusion for 3D Object Detection with Transformers". https://arxiv.org/abs/2203.11496
Apache License 2.0
619 stars 76 forks source link

mmdet3d/ops/voxel/src/scatter_points_cuda.cu(272): error: no instance of overloaded function "at::Tensor::index_put_" matches the argument list #58

Closed RanTT1996 closed 2 years ago

RanTT1996 commented 2 years ago

hello, when running python setup.py develop, there is a problem

mmdet3d/ops/voxel/src/scatter_points_cuda.cu(272): error: no instance of overloaded function "at::Tensor::index_put_" matches the argument list
            argument types are: (at::Tensor, at::Tensor)
            object type is: at::Tensor

1 error detected in the compilation of "mmdet3d/ops/voxel/src/scatter_points_cuda.cu".
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

and the code is

  coors_map_sorted = coors_map_sorted.cumsum(0, torch::kInt32);
  coors_map.index_put_(coors_id_argsort, coors_map_sorted);

The env is

torch==1.9.1+cu111 torchvision==0.10.1
mmcv-full==1.4.0 and 1.2.4
mmdet3d==0.10.0 and 0.18.0

Thank you!

dk-liang commented 2 years ago

I meet the same issue. Could you please share the solution?

RanTT1996 commented 2 years ago

I meet the same issue. Could you please share the solution?

https://github.com/XuyangBai/TransFusion/issues/16#issuecomment-1206007042 change coors_map.index_put_(coors_id_argsort, coors_map_sorted); into coors_map.index_put_({coors_id_argsort}, coors_map_sorted);

dk-liang commented 2 years ago

I meet the same issue. Could you please share the solution?

#16 (comment) change coors_map.index_put_(coors_id_argsort, coors_map_sorted); into coors_map.index_put_({coors_id_argsort}, coors_map_sorted);

Thanks