skyhehe123 / VoxSeT

Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR 2022)
MIT License
194 stars 19 forks source link

fix: support latest pytorch version and spconv version #19

Open OrangeSodahub opened 1 year ago

OrangeSodahub commented 1 year ago

Fix following errors when build pcdet (support newer pytorch version):

src/ball_query.cpp:22:27: error: ‘THCState_getCurrentStream’ was not declared in this scope
   22 |     cudaStream_t stream = THCState_getCurrentStream(state);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
src/roipool3d.cpp: In function ‘int roipool3d_cpu(at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor)’:
src/roipool3d.cpp:6:29: error: ‘AT_CHECK’ was not declared in this scope; did you mean ‘DCHECK’?
    6 | #define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x, " must be contiguous ")
      |                             ^~~~~~~~
src/roipool3d.cpp:6:29: note: in definition of macro ‘CHECK_CONTIGUOUS’
    6 | #define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x, " must be contiguous ")
      |                             ^~~~~~~~

Fix AttributeError due to spconv v2:

AttributeError: module 'spconv' has no attribute 'SparseModule'