Open jackft2 opened 4 years ago
environment: ubuntu16.04 pytorch:1.6 python:3.6 gcc:7.5
I have found the solution for this issue here:
https://github.com/mrlooi/rotated_maskrcnn/issues/31
In short, you can add this snippet
#ifndef AT_CHECK
#define AT_CHECK TORCH_CHECK
#endif
at the top of the two srcs, maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu maskrcnn_benchmark/csrc/cuda/deform_pool_cuda.cu
bingo
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:354:1: note: declared here T data() const { ^ ~~ /home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/SigmoidFocalLoss_cuda.cu:173:880: warning: ‘T at::Tensor::data() const [with T = float]’ is deprecated: Tensor.data() is deprecated. Please use Tensor.data_ptr() instead. [-Wdeprecated-declarations]
AT_DISPATCH_FLOATING_TYPES(logits.type(), "SigmoidFocalLoss_backward", [&] {
^
/usr/local/lib/python3.6/dist-packages/torch/include/ATen/core/TensorBody.h:354:1: note: declared here
T * data() const {
^ ~~
/usr/local/cuda/bin/nvcc -DWITH_CUDA -I/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc -I/usr/local/lib/python3.6/dist-packages/torch/include -I/usr/local/lib/python3.6/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.6/dist-packages/torch/include/TH -I/usr/local/lib/python3.6/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c /home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu -o build/temp.linux-x86_64-3.6/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14
/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu(72): error: identifier "AT_CHECK" is undefined
/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu(200): error: identifier "AT_CHECK" is undefined
/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu(307): error: identifier "AT_CHECK" is undefined
/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu(423): error: identifier "AT_CHECK" is undefined
/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu(504): error: identifier "AT_CHECK" is undefined
/home/ubuntu/workspace/MaskTextSpotterV3/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu(586): error: identifier "AT_CHECK" is undefined
6 errors detected in the compilation of "/tmp/tmpxft_0000451d_00000000-6_deform_conv_cuda.cpp1.ii". error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1