NVlabs / tiny-cuda-nn

Lightning fast C++/CUDA neural network framework
Other
3.77k stars 458 forks source link

'Ensure pytorch with CUDA support is installed' - Error with running #461

Open Mike-The-Knight opened 3 months ago

Mike-The-Knight commented 3 months ago

I have run into a problem where I install CUDA 12.1 which fits my Graphics card, I then install pytorch for 12.1 from pytorch documentation to a conda environment. I then install ninja and install a requirements file for a separate project which includes pip installing tiny-cuda-nn and everything works fine.

However when I run the main file for the other project that uses tiny-cuda-nn it doesn't recognise my pytorch with CUDA support is installed or something along those lines.

Please help and I am happy to offer any extra information needed.

image

gaetan-landreau commented 2 months ago

+1 Got a similar issue while both my torch and CUDA drivers are properly installed. GPUs are detected, running pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch works like a charm, but the import fails.

Edward-HE commented 1 month ago

I encountered a similar issue today. I installed everything correctly and was able to import tinycudann without any problems when using the interactive Python console from the command line. However, when running the program, I kept getting an error: "Ensure PyTorch with CUDA support is installed."

After double-checking everything, I realized the problem was due to a simple mistake: I needed to import torch first, and then tinycudann. Once I adjusted the import order, the program ran smoothly.