caiyuanhao1998/SAX-NeRF

SAX-NeRF in colab

adatteq opened this issue · 1 comments

Hello,

Apparently, SAX-NeRF code requires cuda 11.3, which seems suprising as it looks to be built on naf hash encoder that I could run on cuda 12.2. In colab, the default version is 12.2, and it is not convenient to modify that. Do you know if there is any solution to run your code in colab?

Here is what I obtain when running the code:
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
warnings.warn(
Traceback (most recent call last):
File "/content/drive/MyDrive/SAX-NeRF/train_mlg.py", line 23, in
from src.trainer_mlg import Trainer
File "/content/drive/MyDrive/SAX-NeRF/src/trainer_mlg.py", line 17, in
from .encoder import get_encoder
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/init.py", line 1, in
from .hashencoder import HashEncoder
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/hashencoder/init.py", line 1, in
from .hashgrid import HashEncoder
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/hashencoder/hashgrid.py", line 8, in
from .backend import _backend
File "/content/drive/MyDrive/SAX-NeRF/src/encoder/hashencoder/backend.py", line 6, in
_backend = load(name='_hash_encoder',
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1309, in load
return _jit_compile(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1719, in _jit_compile
_write_ninja_file_and_build_library(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1819, in _write_ninja_file_and_build_library
_write_ninja_file_to_build_library(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 2206, in _write_ninja_file_to_build_library
cuda_flags = common_cflags + COMMON_NVCC_FLAGS + _get_cuda_arch_flags()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/cpp_extension.py", line 1987, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range

Thank you for your time.
Quentin

hi, naf is also built on cuda 11.3. Just have a look at their README.md

It is better to reproduce our results in our suggested environment.

If you find our repo useful, please help us star it :)

Thanks for your interest