nerfstudio-project / gsplat

CUDA accelerated rasterization of gaussian splatting
https://docs.gsplat.studio/
Apache License 2.0
1.84k stars 223 forks source link

No CUDA toolkit found. gsplat will be disabled. #249

Closed MasahiroOgawa closed 2 months ago

MasahiroOgawa commented 2 months ago

When I ran bash benchmark.sh, I got the title error. The whole error message is below.

bash benchmark.sh Running bicycle Warning: image_path not found for reconstruction [Parser] 194 images, taken by 1 cameras. Scene scale: 1.3044367243346904 Model initialized. Number of GS: 54275 Downloading: "https://download.pytorch.org/models/alexnet-owt-7be5be79.pth" to /home/mas/.cache/torch/hub/checkpoints/alexnet-owt-7be5be79.pth 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 233M/233M [00:12<00:00, 20.3MB/s] 0%| | 0/30000 [00:00<?, ?it/s]gsplat: No CUDA toolkit found. gsplat will be disabled. 0%| | 0/30000 [00:00<?, ?it/s] Traceback (most recent call last): File "/mnt/home/mas/proj/study/computer_vision/gsplat/examples/simple_trainer.py", line 983, in main(cfg) File "/mnt/home/mas/proj/study/computer_vision/gsplat/examples/simple_trainer.py", line 973, in main runner.train() File "/mnt/home/mas/proj/study/computer_vision/gsplat/examples/simple_trainer.py", line 466, in train renders, alphas, info = self.rasterize_splats( ^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/examples/simple_trainer.py", line 374, in rasterize_splats render_colors, render_alphas, info = rasterization( ^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/gsplat/rendering.py", line 212, in rasterization proj_results = fully_fused_projection( ^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/gsplat/cuda/_wrapper.py", line 260, in fully_fused_projection return _FullyFusedProjection.apply( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/torch/autograd/function.py", line 598, in apply return super().apply(*args, *kwargs) # type: ignore[misc] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/gsplat/cuda/_wrapper.py", line 692, in forward radii, means2d, depths, conics, compensations = _make_lazy_cuda_func( ^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/gsplat/cuda/_wrapper.py", line 12, in call_cuda return getattr(_C, name)(args, *kwargs) ^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'fully_fused_projection_fwd' Warning: image_path not found for reconstruction [Parser] 194 images, taken by 1 cameras. Scene scale: 1.3044367243346904 Model initialized. Number of GS: 54275 Traceback (most recent call last): File "/mnt/home/mas/proj/study/computer_vision/gsplat/examples/simple_trainer.py", line 983, in main(cfg) File "/mnt/home/mas/proj/study/computer_vision/gsplat/examples/simple_trainer.py", line 967, in main ckpt = torch.load(cfg.ckpt, map_location=runner.device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/torch/serialization.py", line 997, in load with _open_file_like(f, 'rb') as opened_file: ^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/torch/serialization.py", line 444, in _open_file_like return _open_file(name_or_buffer, mode) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mnt/home/mas/proj/study/computer_vision/gsplat/.venv/lib/python3.11/site-packages/torch/serialization.py", line 425, in init super().init(open(name, mode)) ^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'results/benchmark/bicycle/ckpts/'

MasahiroOgawa commented 2 months ago

I installed pytorch with cuda. here is my pyproject.toml file.

[tool.poetry] name = "gsplat-pip" version = "0.1.0" description = "" authors = [""] readme = "README.md"

[tool.poetry.dependencies] python = "^3.11" torch = {version = "^2.3.1+cu121", source = "torch_cu121"} torchvision = {version = "^0.18.1+cu121", source = "torch_cu121"} torchaudio = {version = "^2.3.1+cu121", source = "torch_cu121"} pycolmap = {git = "https://github.com/rmbrualla/pycolmap", rev = "cc7ea4b7301720ac29287dbe450952511b32125e"} viser = "^0.2.1" nerfview = "0.0.2" imageio = {extras = ["ffmpeg"], version = "^2.34.2"} numpy = "1.26.4" scikit-learn = "^1.5.0" tqdm = "^4.66.4" torchmetrics = {extras = ["image"], version = "^1.4.0.post0"} opencv-python = "^4.10.0.84" tyro = "^0.8.5" pillow = "^10.3.0" tensorboard = "^2.17.0" gsplat = "^1.0.0"

[[tool.poetry.source]] name = "torch_cu121" url = "https://download.pytorch.org/whl/cu121" priority = "explicit"

[build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"

MasahiroOgawa commented 2 months ago

It seems I could fixed.

Cause: I forgot to path nvcc. Solution: add path like;

export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
MasahiroOgawa commented 2 months ago

Yes, bash benchmark.sh works fine.