Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AT_CHECK deprecated since torch 1.5 #361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guigarfr
Copy link

Fixes this issue

AT_CHECK is deprecated since torch 1.5, so i added this code for compatibility.

@YuxuanWen-Code
Copy link

Hi, thank you very much for your contribution, but after I replaced the changed files with your, the error still exists, can you take a look at my errors?
running build
running build_py
running build_ext
/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (10.1) has a minor version mismatch with the version that was used to compile PyTorch (10.2). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 10.1
warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'fcos_core._C' extension
/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/cuda/init.py:146: UserWarning:
NVIDIA GeForce RTX 3080 Ti with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA GeForce RTX 3080 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
Emitting ninja build file /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/9] c++ -MMD -MF /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/ROIAlign_cpu.o.d -pthread -B /home/zhou/anaconda3/envs/FCOSenv/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cpu/ROIAlign_cpu.cpp -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/ROIAlign_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/ROIAlign_cpu.o
c++ -MMD -MF /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/ROIAlign_cpu.o.d -pthread -B /home/zhou/anaconda3/envs/FCOSenv/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cpu/ROIAlign_cpu.cpp -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/ROIAlign_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cpu/ROIAlign_cpu.cpp:2:10: fatal error: cpu/vision.h: No such file or directory
2 | #include "cpu/vision.h"
| ^~~~~~~~~~~~~~
compilation terminated.
[2/9] c++ -MMD -MF /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/nms_cpu.o.d -pthread -B /home/zhou/anaconda3/envs/FCOSenv/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cpu/nms_cpu.cpp -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/nms_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/nms_cpu.o
c++ -MMD -MF /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/nms_cpu.o.d -pthread -B /home/zhou/anaconda3/envs/FCOSenv/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -O2 -isystem /home/zhou/anaconda3/envs/FCOSenv/include -fPIC -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cpu/nms_cpu.cpp -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cpu/nms_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cpu/nms_cpu.cpp:2:10: fatal error: cpu/vision.h: No such file or directory
2 | #include "cpu/vision.h"
| ^~~~~~~~~~~~~~
compilation terminated.
[3/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/nms.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/nms.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
--expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS
-DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/nms.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/nms.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/nms.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS
-D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/nms.cu:5:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
[4/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/deform_conv_cuda.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu:7:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
[5/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ROIAlign_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ROIAlign_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ROIAlign_cuda.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ROIAlign_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ROIAlign_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ROIAlign_cuda.cu:5:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
[6/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/SigmoidFocalLoss_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/SigmoidFocalLoss_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/SigmoidFocalLoss_cuda.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/SigmoidFocalLoss_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/SigmoidFocalLoss_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/SigmoidFocalLoss_cuda.cu:8:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
[7/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ml_nms.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ml_nms.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ml_nms.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ml_nms.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ml_nms.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ml_nms.cu:5:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
[8/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/deform_pool_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/deform_pool_cuda.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/deform_pool_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu:11:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
[9/9] /usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ROIPool_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ROIPool_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ROIPool_cuda.o
/usr/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/TH -I/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/include/THC -I/home/zhou/anaconda3/envs/FCOSenv/include/python3.10 -c -c /home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ROIPool_cuda.cu -o /home/zhou/wyx/FCOS/build/temp.linux-x86_64-cpython-310/fcos_core/csrc/cuda/ROIPool_cuda.o -D__CUDA_NO_HALF_OPERATORS
-D__CUDA_NO_HALF_CONVERSIONS
-D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/zhou/wyx/FCOS/fcos_core/csrc/cuda/ROIPool_cuda.cu:5:10: fatal error: THC/THC.h: No such file or directory
#include <THC/THC.h>
^~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
subprocess.run(
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/zhou/wyx/FCOS/setup.py", line 66, in
setup(
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/init.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
self.run_command(cmd)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
cmd_obj.run()
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/command/build.py", line 24, in run
super().run()
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
cmd_obj.run()
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
build_ext.build_extensions(self)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
self._build_extensions_serial()
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
self.build_extension(ext)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 547, in build_extension
objects = self.compiler.compile(
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/zhou/anaconda3/envs/FCOSenv/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: identifier "AT_CHECK" is undefined occured when use python setup.py build develop
2 participants