Closed weiforce closed 2 years ago
The problem here, is that torch
couldn't identify your gpu's CC (compute capability). You have to tell it by defining an environment variable TORCH_CUDA_ARCH_LIST
to your gpu's CC +'+PTX', e.g. in bash:
TORCH_CUDA_ARCH_LIST=5.0+PTX
Then run pip install .
again.
If you don't know your gpu's CC, if you have an NVIDIA gpu you can run nvidia-smi
to get the model if you don't know it already, then look it up in this table:
If you don't have an NVIDIA gpu you'll have to look up the CC by it's model on the internet.
Unrelated, it's generally considered bad practise to run pip as root.
The problem here, is that
torch
couldn't identify your gpu's CC (compute capability). You have to tell it by defining an environment variableTORCH_CUDA_ARCH_LIST
to your gpu's CC +'+PTX', e.g. in bash:TORCH_CUDA_ARCH_LIST=5.0+PTX
Then run
pip install .
again.If you don't know your gpu's CC, if you have an NVIDIA gpu you can run
nvidia-smi
to get the model if you don't know it already, then look it up in this table:If you don't have an NVIDIA gpu you'll have to look up the CC by it's model on the internet.
Unrelated, it's generally considered bad practise to run pip as root.
It worked! Thanks.
If you don't know your gpu's CC, if you have an NVIDIA gpu you can run
nvidia-smi
to get the model if you don't know it already, then look it up in this table:
@bolshoytoster could you please post a link to this table? My (fairly new) nvidia gpu is not listed in the screenshot. I assume it might have been updated but i can not find this table on the nvidia site. thanks.
@dadaphl sorry, I can’t seem to find the exact article, but I think got it from something on mylifeismymessage.net.
I did find a wikipedia article that might contain your gpu. Look for ‘Compute ability’ or ‘CUDA Compute ability’ in the tables (it looks like it only gives it for the GeForce 8xxx and tesla series’)
I had to use export TORCH_CUDA_ARCH_LIST="6.1 7.5 8.6"
for it to work.
(plenoxel) root@6ba5ad9d785b:~/svox2# pip install . Processing /root/svox2 DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default. pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555. Building wheels for collected packages: svox2 Building wheel for svox2 (setup.py) ... error ERROR: Command errored out with exit status 1: command: /root/miniconda/envs/plenoxel/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1y564l6b/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1y564l6b/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-mrnyst1c cwd: /tmp/pip-req-build-1y564l6b/ Complete output (65 lines): No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' 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/svox2 copying svox2/init.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/defs.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/svox2.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/utils.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/version.py -> build/lib.linux-x86_64-3.8/svox2 package init file 'svox2/csrc/init.py' not found (or not a regular file) running build_ext /root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.4) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'svox2.csrc' extension creating /tmp/pip-req-build-1y564l6b/build/temp.linux-x86_64-3.8 creating /tmp/pip-req-build-1y564l6b/build/temp.linux-x86_64-3.8/svox2 creating /tmp/pip-req-build-1y564l6b/build/temp.linux-x86_64-3.8/svox2/csrc Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-req-build-1y564l6b/setup.py", line 55, in
setup(
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 735, in build_extensions
build_ext.build_extensions(self)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 551, in unix_wrap_ninja_compile
cuda_post_cflags = unix_cuda_flags(cuda_post_cflags)
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 450, in unix_cuda_flags
cflags + _get_cuda_arch_flags(cflags))
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1606, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range
ERROR: Failed building wheel for svox2 Running setup.py clean for svox2 Failed to build svox2 Installing collected packages: svox2 Running setup.py install for svox2 ... error ERROR: Command errored out with exit status 1: command: /root/miniconda/envs/plenoxel/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1y564l6b/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1y564l6b/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-uibjp4fh/install-record.txt --single-version-externally-managed --compile --install-headers /root/miniconda/envs/plenoxel/include/python3.8/svox2 cwd: /tmp/pip-req-build-1y564l6b/ Complete output (67 lines): No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda' 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/svox2 copying svox2/init.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/defs.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/svox2.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/utils.py -> build/lib.linux-x86_64-3.8/svox2 copying svox2/version.py -> build/lib.linux-x86_64-3.8/svox2 package init file 'svox2/csrc/init.py' not found (or not a regular file) running build_ext /root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py:782: UserWarning: The detected CUDA version (11.4) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'svox2.csrc' extension creating /tmp/pip-req-build-1y564l6b/build/temp.linux-x86_64-3.8 creating /tmp/pip-req-build-1y564l6b/build/temp.linux-x86_64-3.8/svox2 creating /tmp/pip-req-build-1y564l6b/build/temp.linux-x86_64-3.8/svox2/csrc Traceback (most recent call last): File "", line 1, in
File "/tmp/pip-req-build-1y564l6b/setup.py", line 55, in
setup(
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 735, in build_extensions
build_ext.build_extensions(self)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "/root/miniconda/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 551, in unix_wrap_ninja_compile
cuda_post_cflags = unix_cuda_flags(cuda_post_cflags)
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 450, in unix_cuda_flags
cflags + _get_cuda_arch_flags(cflags))
File "/root/miniconda/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1606, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range
ERROR: Command errored out with exit status 1: /root/miniconda/envs/plenoxel/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1y564l6b/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1y564l6b/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-uibjp4fh/install-record.txt --single-version-externally-managed --compile --install-headers /root/miniconda/envs/plenoxel/include/python3.8/svox2 Check the logs for full command output.