Manual installation with torch extension fails: parameter packs not expanding after cmake build success
ForestEco opened this issue · comments
I managed to get cmake to build the package after restarting the OS last night. However, the final step to setup the bindings in torch folder with fails.
Please help me understand what to do about the error log going forward. It appears my conda is not accessing torch. Perhaps I need to use pip for this?
tiny-cuda-nn$ cd bindings/torch
tiny-cuda-nn/bindings/torch$ **python setup.py install**
Here is the error report and evidence the cmake build worked:
(base) jsafr@jsafr-ROG-Zephyrus-M16-GU603HM-GU603HM:/media/jsafr/Extreme Pro/U(base) jsafr@jsafr-ROG-Zephyrus-M16-GU603HM-GU603HM:/media/jsafr/Extreme Pro/Ubu
ntu Linux/Wonder3D/tiny-cuda-nn$ cmake . -B build -DCMAKE_BUILD_TYPE=RelWith
DebInfo
-- The CXX compiler identification is GNU 11.4.0
-- The CUDA compiler identification is NVIDIA 11.5.119
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /usr/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Obtained CUDA architectures automatically from installed GPUs
-- Targeting CUDA architectures: 86
-- Module support is disabled.
-- Version: 9.1.1
-- Build type: RelWithDebInfo
-- Configuring done
-- Generating done
-- Build files have been written to: /media/jsafr/Extreme Pro/Ubuntu Linux/Wonder3D/tiny-cuda-nn/build
ntu Linux/Wonder3D/tiny-cuda-nn/bindings/torch$ python setup.py install
/media/jsafr/Extreme Pro/Ubuntu Linux/Wonder3D/tiny-cuda-nn/bindings/torch/setup.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import parse_version
/home/jsafr/miniconda3/lib/python3.12/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'),
Building PyTorch extension for tiny-cuda-nn version 1.7
Obtained compute capability 86 from PyTorch
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0
Detected CUDA version 11.5
Targeting C++ standard 17
running install
/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
self.initialize_options()
running bdist_egg
running egg_info
writing tinycudann.egg-info/PKG-INFO
writing dependency_links to tinycudann.egg-info/dependency_links.txt
writing top-level names to tinycudann.egg-info/top_level.txt
reading manifest file 'tinycudann.egg-info/SOURCES.txt'
writing manifest file 'tinycudann.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/lib.linux-x86_64-cpython-312
creating build/lib.linux-x86_64-cpython-312/tinycudann
copying tinycudann/init.py -> build/lib.linux-x86_64-cpython-312/tinycudann
copying tinycudann/modules.py -> build/lib.linux-x86_64-cpython-312/tinycudann
copying tinycudann/bindings.cpp -> build/lib.linux-x86_64-cpython-312/tinycudann
running build_ext
Traceback (most recent call last):
File "/media/jsafr/Extreme Pro/Ubuntu Linux/Wonder3D/tiny-cuda-nn/bindings/torch/setup.py", line 189, in
setup(
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/init.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/command/install.py", line 84, in run
self.do_egg_install()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/command/install.py", line 132, in do_egg_install
self.run_command('bdist_egg')
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/command/bdist_egg.py", line 167, in run
cmd = self.call_command('install_lib', warn_dir=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/command/bdist_egg.py", line 153, in call_command
self.run_command(cmdname)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/command/install_lib.py", line 111, in build
self.run_command('build_ext')
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/dist.py", line 989, in run_command
super().run_command(command)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 88, in run
_build_ext.run(self)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
self.build_extensions()
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 523, in build_extensions
_check_cuda_version(compiler_name, compiler_version)
File "/home/jsafr/miniconda3/lib/python3.12/site-packages/torch/utils/cpp_extension.py", line 414, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (11.5) mismatches the version that was used to compile
PyTorch (12.1). Please make sure to use the same CUDA versions.
Your PyTorch version(12.1) mismatches your CUDA version(11.5), please downgrade your pytorch.