nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

"OSError: Could not find compatible tinycudann extension for compute capability 86"

Open rockywind opened this issue 2 years ago • 3 comments

Describe the bug When I run the script ns-train nerfacto nuscenes-data --data-dir data/NuScenes --data scene-0061. I met the error below.

(nerfstudio) zizhang.wu@shaxbw03:/SHFP12/02_bevdet/nerfstudio$ sh train.sh 
Traceback (most recent call last):
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/bin/ns-train", line 5, in <module>
    from scripts.train import entrypoint
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/scripts/train.py", line 50, in <module>
    from nerfstudio.configs.method_configs import AnnotatedBaseConfigUnion
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfstudio/configs/method_configs.py", line 38, in <module>
    from nerfstudio.models.instant_ngp import InstantNGPModelConfig
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfstudio/models/instant_ngp.py", line 38, in <module>
    from nerfstudio.field_components.field_heads import FieldHeadNames
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfstudio/field_components/__init__.py", line 17, in <module>
    from .encodings import Encoding, ScalingAndOffset
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/nerfstudio/field_components/encodings.py", line 34, in <module>
    import tinycudann as tcnn
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/tinycudann/__init__.py", line 9, in <module>
    from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
  File "/home/CN/zizhang.wu/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/tinycudann/modules.py", line 35, in <module>
    raise EnvironmentError(f"Could not find compatible tinycudann extension for compute capability {system_compute_capability}.")
OSError: Could not find compatible tinycudann extension for compute capability 86.

rockywind avatar Jan 10 '23 05:01 rockywind

same problem, have you solved it?

nullgogo avatar Jan 10 '23 11:01 nullgogo

Same problem here; I would appreciate any guidance on the matter.

Alaa-Abboud avatar Jan 10 '23 13:01 Alaa-Abboud

Try running pip list | grep torch The torch version should be 1.12.1+cu113 or 1.12.1+cu116 If the +cu... is missing, then you need to reinstall pytorch with cuda support, ie pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html

tancik avatar Jan 27 '23 18:01 tancik

I encountered a similar problem to this and #1283 #1189 as tcnn cannot find extension for compute capability 70. The short answer is to make sure tinycudann for your specific GPU/CUDA compute capability is correctly built so that you can run import tinycudann in python.

For me, the problem is that I have two GPUs of compute compatability 70 and 86. When I run pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch it automatically chooses my first GPU (86) as the compute capability to build. I can run if specifying only one GPU e.g. CUDA_VISIBLE_DEVICES=0 ns-train ..., but not the other.

To use the other GPU (70), I need to specify it and re-build tinycudann from source for that particular compatability.

tiny-cuda-nn$ cd bindings/torch
tiny-cuda-nn/bindings/torch$ CUDA_VISIBLE_DEVICES=1 python setup.py install

YifuTao avatar Feb 16 '23 00:02 YifuTao

Closing, feel free to reopen if it is still and issue.

tancik avatar Feb 22 '23 18:02 tancik

I encountered a similar problem to this and #1283 #1189 as tcnn cannot find extension for compute capability 70. The short answer is to make sure tinycudann for your specific GPU/CUDA compute capability is correctly built so that you can run import tinycudann in python.

For me, the problem is that I have two GPUs of compute compatability 70 and 86. When I run pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch it automatically chooses my first GPU (86) as the compute capability to build. I can run if specifying only one GPU e.g. CUDA_VISIBLE_DEVICES=0 ns-train ..., but not the other.

To use the other GPU (70), I need to specify it and re-build tinycudann from source for that particular compatability.

tiny-cuda-nn$ cd bindings/torch
tiny-cuda-nn/bindings/torch$ CUDA_VISIBLE_DEVICES=1 python setup.py install

It did work for me after I change another GPU, thx a lot

Zhentao-Liu avatar Jun 18 '23 01:06 Zhentao-Liu