tiny-cuda-nn icon indicating copy to clipboard operation
tiny-cuda-nn copied to clipboard

RuntimeError: Error compiling objects for extension

Open 12345678901234567800001882277777 opened this issue 1 year ago • 2 comments

python3.8/site-packages/tiny-cuda-nn/bindings/torch$ python setup.py install 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 /miniconda3/envs/scope/lib/python3.8/site-packages/torch/cuda/init.py:104: UserWarning: NVIDIA GeForce RTX 4090 with CUDA capability sm_89 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_35 sm_50 sm_60 sm_61 sm_70 sm_75 compute_50. If you want to use the NVIDIA GeForce RTX 4090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name)) Obtained compute capability 89 from PyTorch Detected CUDA version 11.5 WARNING: Compute capabilities [89] are not all supported by the installed CUDA version 11.5. Targeting [86] instead. Targeting C++ standard 17 running install /miniconda3/envs/scope/lib/python3.8/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.
    ********************************************************************************

/miniconda3/envs/scope/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

For the aforementioned issue, I hope to receive some assistance.

I have the same issue

TonyHongtaoWu avatar Nov 20 '24 18:11 TonyHongtaoWu

I have the same issue

First, there was an error: RuntimeError: Error compiling objects for extension. Then, in the setup.py file, change cmdclass={'build_ext': BuildExtension} to cmdclass={'build_ext': BuildExtension.with_options(use_ninja=False)}.

After that, there was another error: error: command '/usr/bin/nvcc' failed with exit code 1. Using sudo find / -name "nvcc" to locate the nvcc of the CUDA installation (version 11.6), edit the ~/.bashrc file :

vim ~/.bashrc export CUDA_HOME=/home/li/miniconda3/pkgs/cuda-11.6 export PATH=$CUDA_HOME/bin:$PATH export LD_LIBRARY_PATH=$CUDA_HOME/lib:$LD_LIBRARY_PATH

source ~/.bashrc

Finally, the download of the tinycudann package was completed

This is my solution, hope it helps you.