1.git下载
git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
2.检查dependence中的两个包fmt和cultlass是否安装成功,若未成功,执行下面指令
cd tiny-cuda-nn/dependencies
git clone https://github.com/NVIDIA/cutlass.git
git clone https://github.com/fmtlib/fmt.git
3.相关依赖版本要求
GCC/G++ 版本在8以上
cuda 版本10.2以上
cmake 版本3.21以上
4.编译
cd tiny-cuda-nn
cmake . -B build
cmake --build build --config RelWithDebInfo -j
若第三行编译时间过长,指令删掉-j重新编译(这一行编译时间是有点长,在65%卡住了,但是等了一会儿编译成功了,可以选择等10min)
5.安装
cd bindings/torch
python setup.py install
6.检查安装是否成功
pip show tinycudann
7.运气好执行下面一行代码也可以直接安装
pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch