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

tiny-cudann won't install. #3077

Open
ATPAustinPeng opened this issue Apr 16, 2024 · 1 comment
Open

tiny-cudann won't install. #3077

ATPAustinPeng opened this issue Apr 16, 2024 · 1 comment

Comments

@ATPAustinPeng
Copy link

ATPAustinPeng commented Apr 16, 2024

Describe the bug
Error running pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

To Reproduce
Steps to reproduce the behavior:

conda create -n ngp_pl python==3.9
conda activate ngp_pl
conda install pip

pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.2.0+cu121.html
export TCNN_CUDA_ARCHITECTURES=90 # when using H100
  1. Using H100, sm90, cuda121. Create relevant environment and packages with the above commands.
  2. pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

Expected behavior

  • installed tiny-cuda-nn

Screenshots

Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
  Cloning https://github.com/NVlabs/tiny-cuda-nn/ to /scratch/591851/pip-req-build-l7x2_92v
  Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ /scratch/591851/pip-req-build-l7x2_92v
  Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 2ec562e853e6f482b5d09168705205f46358fb39
  Running command git submodule update --init --recursive -q
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: tinycudann
  Building wheel for tinycudann (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [79 lines of output]
      /scratch/591851/pip-req-build-l7x2_92v/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
      Building PyTorch extension for tiny-cuda-nn version 1.7
      Obtained compute capabilities [90] from environment variable TCNN_CUDA_ARCHITECTURES
      nvcc: NVIDIA (R) Cuda compiler driver
      Copyright (c) 2005-2023 NVIDIA Corporation
      Built on Tue_Jul_11_02:20:44_PDT_2023
      Cuda compilation tools, release 12.2, V12.2.128
      Build cuda_12.2.r12.2/compiler.33053471_0
      Detected CUDA version 12.2
      Targeting C++ standard 17
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/tinycudann
      copying tinycudann/__init__.py -> build/lib.linux-x86_64-cpython-39/tinycudann
      copying tinycudann/modules.py -> build/lib.linux-x86_64-cpython-39/tinycudann
      running egg_info
      creating tinycudann.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
      writing manifest file 'tinycudann.egg-info/SOURCES.txt'
      reading manifest file 'tinycudann.egg-info/SOURCES.txt'
      writing manifest file 'tinycudann.egg-info/SOURCES.txt'
      copying tinycudann/bindings.cpp -> build/lib.linux-x86_64-cpython-39/tinycudann
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/scratch/591851/pip-req-build-l7x2_92v/bindings/torch/setup.py", line 189, in <module>
          setup(
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 509, in build_extensions
          compiler_name, compiler_version = self._check_abi()
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 895, in _check_abi
          _, version = get_compiler_abi_compatibility_and_version(compiler)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 359, in get_compiler_abi_compatibility_and_version
          if not check_compiler_ok_for_platform(compiler):
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 312, in check_compiler_ok_for_platform
          which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/home/hice1/apeng39/.conda/envs/ngp_pl_new/lib/python3.9/subprocess.py", line 524, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['which', '/usr/local/pace-apps/spack/packages/linux-rhel7-x86_64/gcc-4.8.5/gcc-10.3.0-o57x6h2gubo7bzh7evmy4mvibdqrlghr/bin/g++']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tinycudann
  Running setup.py clean for tinycudann
Failed to build tinycudann
ERROR: Could not build wheels for tinycudann, which is required to install pyproject.toml-based projects

Additional context
Add any other context about the problem here.

@adlane98
Copy link

adlane98 commented May 1, 2024

Make sure you use the same pytorch version as mentioned on the installation page, i.e. torch 2.1.2 with CUDA 11.8 or 2.0.1 with CUDA 11.7.

I ran into a similar bug (the error was RuntimeError: Error compiling objects for extension) even tough I had CUDA 11.8 and torch 2.1.2.

For my nvidia driver installation I had to upgrade my gcc version to gcc-12. When I tried to install tiycudann, I kept this gcc version, and I ran into this bug. But when I downgraded to gcc-11, tinycudann succesfully installed.

Hope it helps

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