DekuLiuTesla / CityGaussian

[ECCV2024] CityGaussian: Real-time High-quality Large-Scale Scene Rendering with Gaussians
https://dekuliutesla.github.io/citygs/
Other
329 stars 18 forks source link

No GPUs Available #4

Closed nurbanu170399 closed 1 month ago

nurbanu170399 commented 1 month ago

I am trying to train on mill19/building-pixsfm dataset. When i run bash scripts/run_citygs_lod.sh, i get the error: Traceback (most recent call last): File "/home/pc_5053/CityGaussian/render_large_lod.py", line 143, in safe_state(args.quiet) File "/home/pc_5053/CityGaussian/utils/general_utils.py", line 149, in safe_state torch.cuda.set_device(torch.device("cuda:0")) File "/home/pc_5053/anaconda3/envs/citygs/lib/python3.9/site-packages/torch/cuda/init.py", line 350, in set_device torch._C._cuda_setDevice(device) File "/home/pc_5053/anaconda3/envs/citygs/lib/python3.9/site-packages/torch/cuda/init.py", line 247, in _lazy_init torch._C._cuda_init() RuntimeError: No CUDA GPUs are available Traceback (most recent call last): File "/home/pc_5053/CityGaussian/metrics_large.py", line 110, in torch.cuda.set_device(device) File "/home/pc_5053/anaconda3/envs/citygs/lib/python3.9/site-packages/torch/cuda/init.py", line 350, in set_device torch._C._cuda_setDevice(device) File "/home/pc_5053/anaconda3/envs/citygs/lib/python3.9/site-packages/torch/cuda/init.py", line 247, in _lazy_init torch._C._cuda_init() RuntimeError: No CUDA GPUs are available

Even though i have an Available GPU (RTX4090). What is the issue? Here is some extra information:

Python 3.9.19 | packaged by conda-forge | (main, Mar 20 2024, 12:50:21) [GCC 12.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import torch print("CUDA Available:", torch.cuda.is_available()) .cuda.device_count()) print("Current Device:", torch.cuda.current_device())CUDA Available: True print("Number of GPUs:", torch.cuda.device_count()) Number of GPUs: 1 print("Current Device:", torch.cuda.current_device()) Current Device: 0 nvcc --version output: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0

WangYu0611 commented 1 month ago

reboot , i can use

DekuLiuTesla commented 1 month ago

Hi, perhaps the get_available_gpu function didn't detect available GPU. Try to replace CUDA_VISIBLE_DEVICES=$(get_available_gpu) to CUDA_VISIBLE_DEVICES=0.

I have added command to print available GPUS. You can update the scripts to the latest.

nurbanu170399 commented 1 month ago

It turns out i didnt have enough memory on the GPU. Thanks a lot!