yifita/deep_cage

Compiling error

wanglei1006 opened this issue · 4 comments

when i run "python setup.py develop", got following errors
I replace "THCState_getCudaHostAllocator" with "at::cuda::getCurrentCUDAStream", still not work


/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp:28:63: error: invalid conversion from ‘THCState*’ to ‘c10::DeviceIndex {aka short int}’ [-fpermissive]
cudaStream_t stream = at::cuda::getCurrentCUDAStream(state);
^
In file included from /home/wanglei/anaconda3/envs/pytorch-all/lib/python3.7/site-packages/torch/include/ATen/cuda/CUDAContext.h:11:0,
from /data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/utils.h:2,
from /data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp:1:
/home/wanglei/anaconda3/envs/pytorch-all/lib/python3.7/site-packages/torch/include/c10/cuda/CUDAStream.h:202:23: note: initializing argument 1 of ‘c10::cuda::CUDAStream c10::cuda::getCurrentCUDAStream(c10::DeviceIndex)’
CAFFE2_API CUDAStream getCurrentCUDAStream(DeviceIndex device_index = -1);
^~~~~~~~~~~~~~~~~~~~
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp: In function ‘int gather_points_grad_wrapper_fast(int, int, int, int, at::Tensor&, at::Tensor&, at::Tensor&)’:
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp:41:63: error: invalid conversion from ‘THCState*’ to ‘c10::DeviceIndex {aka short int}’ [-fpermissive]
cudaStream_t stream = at::cuda::getCurrentCUDAStream(state);

/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp: In function ‘void three_nn_wrapper_fast(int, int, int, at::Tensor, at::Tensor, at::Tensor, at::Tensor)’:
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp:196:59: error: cannot convert ‘c10::Allocator*’ to ‘cudaStream_t {aka CUstream_st*}’ in initialization
cudaStream_t stream = THCState_getCudaHostAllocator(state);
^
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp: In function ‘void three_interpolate_wrapper_fast(int, int, int, int, at::Tensor, at::Tensor, at::Tensor, at::Tensor)’:
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp:212:59: error: cannot convert ‘c10::Allocator*’ to ‘cudaStream_t {aka CUstream_st*}’ in initialization
cudaStream_t stream = THCState_getCudaHostAllocator(state);
^
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp: In function ‘void three_interpolate_grad_wrapper_fast(int, int, int, int, at::Tensor, at::Tensor, at::Tensor, at::Tensor)’:
/data2/wanglei/3D_mesh/deep_cage/pytorch_points/pytorch_points/_ext/sampling.cpp:227:59: error: cannot convert ‘c10::Allocator*’ to ‘cudaStream_t {aka CUstream_st*}’ in initialization
cudaStream_t stream = THCState_getCudaHostAllocator(state);

I am not sure how to compile objects for extension.
looking forward to your reply, thanks!!!

which pytorch version are you using? This looks like a version incompatibility issue.

which pytorch version are you using? This looks like a version incompatibility issue.

The version of the pytorch I used is 1.5.1

Please try to install with 1.4.0, I'll correct the environment file in pytorch_points.
Thanks for the issue!

Thanks! I will try.