Pytorch-Correlation-extension
Pytorch-Correlation-extension copied to clipboard
failed to install spatial_correlation_sampler
OS :Linux Pytorch=1.8.0 torchversion=0.9.0 python 3.8
(torch18) cwc@imc-Z9PE-D8-WS:~/aot-benchmark-main$ pip install spatial_correlation_sampler
Collecting spatial_correlation_sampler Using cached spatial_correlation_sampler-0.3.0.tar.gz (8.6 kB) Requirement already satisfied: torch>=1.1 in /home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages (from spatial_correlation_sampler) (1.8.0) Requirement already satisfied: numpy in /home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages (from spatial_correlation_sampler) (1.21.4) Requirement already satisfied: typing_extensions in /home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages (from torch>=1.1->spatial_correlation_sampler) (3.10.0.0) Building wheels for collected packages: spatial-correlation-sampler Building wheel for spatial-correlation-sampler (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/cwc/anaconda3/envs/torch18/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py'"'"'; file='"'"'/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-x8cd6j80 cwd: /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/ Complete output (102 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/spatial_correlation_sampler copying Correlation_Module/spatial_correlation_sampler/spatial_correlation_sampler.py -> build/lib.linux-x86_64-3.8/spatial_correlation_sampler copying Correlation_Module/spatial_correlation_sampler/init.py -> build/lib.linux-x86_64-3.8/spatial_correlation_sampler running build_ext building 'spatial_correlation_sampler_backend' extension creating /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8 creating /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module /home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py:283: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (c++) is not compatible with the compiler Pytorch was built with for this platform, which is g++ on linux. Please use g++ to to compile your extension. Alternatively, you may compile PyTorch from source using c++, and then you can also use c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help with compiling PyTorch from source. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format(
Emitting ninja build file /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/3] /usr/local/cuda-10.0/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o.d -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation_cuda_kernel.cu -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o /usr/local/cuda-10.0/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o.d -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation_cuda_kernel.cu -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 nvcc fatal : Unknown option '-generate-dependencies-with-compile' [2/3] c++ -MMD -MF /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation.o.d -pthread -B /home/cwc/anaconda3/envs/torch18/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation.cpp -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation.o -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [3/3] c++ -MMD -MF /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_sampler.o.d -pthread -B /home/cwc/anaconda3/envs/torch18/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation_sampler.cpp -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_sampler.o -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1667, in _run_ninja_build subprocess.run( File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/subprocess.py", line 516, 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 "", line 1, in
File "/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py", line 57, in
launch_setup()
File "/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py", line 25, in launch_setup
setup(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 529, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1354, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
ERROR: Failed building wheel for spatial-correlation-sampler Running setup.py clean for spatial-correlation-sampler Failed to build spatial-correlation-sampler Installing collected packages: spatial-correlation-sampler Running setup.py install for spatial-correlation-sampler ... error ERROR: Command errored out with exit status 1: command: /home/cwc/anaconda3/envs/torch18/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py'"'"'; file='"'"'/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-ha5w3xf2/install-record.txt --single-version-externally-managed --compile --install-headers /home/cwc/anaconda3/envs/torch18/include/python3.8/spatial-correlation-sampler cwd: /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/ Complete output (104 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/spatial_correlation_sampler copying Correlation_Module/spatial_correlation_sampler/spatial_correlation_sampler.py -> build/lib.linux-x86_64-3.8/spatial_correlation_sampler copying Correlation_Module/spatial_correlation_sampler/init.py -> build/lib.linux-x86_64-3.8/spatial_correlation_sampler running build_ext building 'spatial_correlation_sampler_backend' extension creating /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8 creating /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module /home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py:283: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format(
Emitting ninja build file /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/3] /usr/local/cuda-10.0/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o.d -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation_cuda_kernel.cu -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
FAILED: /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o
/usr/local/cuda-10.0/bin/nvcc --generate-dependencies-with-compile --dependency-output /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o.d -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation_cuda_kernel.cu -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.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'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
nvcc fatal : Unknown option '-generate-dependencies-with-compile'
[2/3] c++ -MMD -MF /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation.o.d -pthread -B /home/cwc/anaconda3/envs/torch18/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation.cpp -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation.o -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
[3/3] c++ -MMD -MF /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_sampler.o.d -pthread -B /home/cwc/anaconda3/envs/torch18/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/Correlation_Module/correlation_sampler.cpp -o /tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_sampler.o -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1667, in _run_ninja_build
subprocess.run(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/subprocess.py", line 516, 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 "<string>", line 1, in <module>
File "/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py", line 57, in <module>
launch_setup()
File "/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py", line 25, in launch_setup
setup(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 529, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1354, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
----------------------------------------
ERROR: Command errored out with exit status 1: /home/cwc/anaconda3/envs/torch18/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py'"'"'; file='"'"'/tmp/pip-install-rz6e9mzk/spatial-correlation-sampler_548563e690e643e5962f05675cec8f78/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-ha5w3xf2/install-record.txt --single-version-externally-managed --compile --install-headers /home/cwc/anaconda3/envs/torch18/include/python3.8/spatial-correlation-sampler Check the logs for full command output.
I can read in the log the sentence "nvcc fatal : Unknown option '-generate-dependencies-with-compile'" What is your cuda version and what cuda version your pytorch was built with ?
Also I advice you tu install it from source as it has been updated recently, I do need to update the pip package
Thank you for your reply!!!
I change the pytorch version it also doesn't work pytorch==1.7.0 torchvision==0.8.0 cuda 10.0
Here is the TraceBack running install running bdist_egg running egg_info writing Correlation_Module/spatial_correlation_sampler.egg-info/PKG-INFO writing dependency_links to Correlation_Module/spatial_correlation_sampler.egg-info/dependency_links.txt writing requirements to Correlation_Module/spatial_correlation_sampler.egg-info/requires.txt writing top-level names to Correlation_Module/spatial_correlation_sampler.egg-info/top_level.txt reading manifest file 'Correlation_Module/spatial_correlation_sampler.egg-info/SOURCES.txt' writing manifest file 'Correlation_Module/spatial_correlation_sampler.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext building 'spatial_correlation_sampler_backend' extension /home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py:253: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Your compiler (c++) is not compatible with the compiler Pytorch was built with for this platform, which is g++ on linux. Please use g++ to to compile your extension. Alternatively, you may compile PyTorch from source using c++, and then you can also use c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help with compiling PyTorch from source. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(WRONG_COMPILER_WARNING.format( Emitting ninja build file /home/cwc/aot-benchmark/networks/layers/Pytorch-Correlation-extension/build/temp.linux-x86_64-3.8/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/1] /usr/local/cuda-10.0/bin/nvcc -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /home/cwc/aot-benchmark/networks/layers/Pytorch-Correlation-extension/Correlation_Module/correlation_cuda_kernel.cu -o /home/cwc/aot-benchmark/networks/layers/Pytorch-Correlation-extension/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /home/cwc/aot-benchmark/networks/layers/Pytorch-Correlation-extension/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o /usr/local/cuda-10.0/bin/nvcc -DUSE_CUDA -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/TH -I/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/home/cwc/anaconda3/envs/torch18/include/python3.8 -c -c /home/cwc/aot-benchmark/networks/layers/Pytorch-Correlation-extension/Correlation_Module/correlation_cuda_kernel.cu -o /home/cwc/aot-benchmark/networks/layers/Pytorch-Correlation-extension/build/temp.linux-x86_64-3.8/Correlation_Module/correlation_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=spatial_correlation_sampler_backend -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14 nvcc fatal : Unsupported gpu architecture 'compute_86' ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1516, in _run_ninja_build subprocess.run( File "/home/cwc/anaconda3/envs/torch18/lib/python3.8/subprocess.py", line 516, 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 "setup.py", line 57, in
Hi sorry, for late answer, the problem is probably that you don't have g++ installed, hence the message
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using c++, and then you can also use
c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You need to either install g++ or compile torch with the compiler you are currently using.