LeegoChen / PTC-Net

PTC-Net
MIT License
15 stars 0 forks source link

pointops update #1

Open sijieaaa opened 1 year ago

sijieaaa commented 1 year ago

Hi,

To support pointops installation for the latest pytorch version (>=1.11). You can do the following updating:

(1) Replace the following 3 lines

define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x, " must be a CUDAtensor ")

define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x, " must be contiguous ")

define CHECK_INPUT(x) CHECK_CUDA(x);CHECK_CONTIGUOUS(x)

with the following 3 lines

define CHECK_CUDA(x) AT_ASSERTM(x.type().is_cuda(), #x " must be a CUDA tensor")

define CHECK_CONTIGUOUS(x) AT_ASSERTM(x.is_contiguous(), #x " must be contiguous")

define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)

(2) Uncomment the following 2 lines // #include <THC/THC.h> // extern THCState *state;

(3) Replace cudaStream_t stream = THCState_getCurrentStream(state); with cudaStream_t stream = c10::cuda::getCurrentCUDAStream();

Thanks!

LeegoChen commented 1 year ago

Thanks for your solution!