Tiny-cuda-nn安装指南
前言
用这个命令去安装:
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
能成功那你就是万中无一的幸运儿! 可以跳过本教程了!
从源码编译
clone源码:
git clone https://github.com/NVlabs/tiny-cuda-nn.git
cd tiny-cuda-nn
直接运行编译命令会出错:
cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
报错如下:
-- The CXX compiler identification is GNU 9.4.0
-- The CUDA compiler identification is NVIDIA 12.1.66
-- 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/local/cuda-12.1/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
CMake Error at CMakeLists.txt:57 (message):Some tiny-cuda-nn dependencies are missing. If you forgot the"--recursive" flag when cloning this project, this can be fixed by calling"git submodule update --init --recursive".-- Configuring incomplete, errors occurred!
See also "/home/cyberbus/xgh/backup/instant-nsr-pl/tiny-cuda-nn/build/CMakeFiles/CMakeOutput.log".
debug发现是有子模块没有安装,所以运行如下命令后再编译即可成功:
git submodule update --init --recursive
cmake . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --config RelWithDebInfo -j$(nproc)