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

some errors with python setup.py install #91

Closed
1359347500cwc opened this issue Mar 8, 2023 · 1 comment
Closed

some errors with python setup.py install #91

1359347500cwc opened this issue Mar 8, 2023 · 1 comment

Comments

@1359347500cwc
Copy link

(s0.3.6_py38) [chenwenchao@SH-IDC1-10-142-4-32 Pytorch-Correlation-extension-master]$ python setup.py install --user
No CUDA runtime is found, using CUDA_HOME='/mnt/cache/share/cuda-11.3'
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'
adding license file 'LICENSE'
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
Traceback (most recent call last):
File "setup.py", line 57, in
launch_setup()
File "setup.py", line 25, in launch_setup
setup(
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
build_ext.build_extensions(self)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 581, in unix_wrap_ninja_compile
cuda_post_cflags = unix_cuda_flags(cuda_post_cflags)
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 480, in unix_cuda_flags
cflags + _get_cuda_arch_flags(cflags))
File "/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.6_py38/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1694, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range

@ClementPinard
Copy link
Owner

Hello, see this issue : pytorch/extension-cpp#71

Basically, your GPU is not detected at install time, which means pytorch does not find architecture to compile the code with.
Make sure your GPU can be seen before installing (like a simple nvidia-smi) and if not you might have to manually set the architecture with the environment variable TORCH_CUDA_ARCH_LIST

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

No branches or pull requests

2 participants