mrlooi / rotated_maskrcnn

Rotated Mask R-CNN: From Bounding Boxes to Rotated Bounding Boxes
MIT License
347 stars 62 forks source link

Hi, this project won't compile because of AT_CHECK #31

Closed guni9191 closed 4 years ago

guni9191 commented 4 years ago

Hi, because of the error below,

/home/psh/Desktop/rotated_maskrcnn/rotated_maskrcnn/maskrcnn_benchmark/csrc/cuda/deform_pool_cuda.cu(42): error: identifier "AT_CHECK" is undefined

/home/psh/Desktop/rotated_maskrcnn/rotated_maskrcnn/maskrcnn_benchmark/csrc/cuda/deform_pool_cuda.cu(68): error: identifier "AT_CHECK" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_000012c7_00000000-6_deform_pool_cuda.cpp1.ii".
error: command '/usr/local/cuda-10.2/bin/nvcc' failed with exit status 1

this project won't compile at the last stage of installation

cd $INSTALL_DIR
git clone https://github.com/mrlooi/rotated_maskrcnn.git
cd rotated_maskrcnn
python setup.py build develop

My environment is cuda = 10.2, pytorch= 1.6 using pip3. can't compile because of AT_CHECK variable. I think the term is deprecated, but don't know how to replace them. Any solutions?

guni9191 commented 4 years ago

I've found out the solution. add the code below

#ifndef AT_CHECK
#define AT_CHECK TORCH_CHECK 
#endif

at the top of the two srcs, rotated_maskrcnn/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu rotated_maskrcnn/maskrcnn_benchmark/csrc/cuda/deform_pool_cuda.cu