I want to implement a deep learning project which has been developed with Anaconda on a computer GPU to my Jetson Nano 4GB. The project uses VGG19 and as benchmark declares it is okay to inference that network on Nano, which I’m able to run the project on CPU without any error and I get good results too. But my problem is on one line of the project, where it says
self.device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") if device == None else device
But I changed it into
self.device = torch.device(“cuda”)
Because when I don’t change it either works on CPU (which is not what I want) or it gets AssertionError: Torch not compiled with CUDA enabled. Even though I downloaded the enabled version.
My system info’ s are:
JetPack 4.6 L4T32.6.1
CUDA 10.2
Python: 3.7.1
PyTorch as 1.7.1
Pyyaml: 5.4.1
Pillow: 8.2.0
Note: I applied some sample CUDA Deep Learning projects with the same card and they work fine on GPU, so the CUDA is ofc downloaded with JetPack image but I think since the project I want to apply is built with Anaconda and Anaconda makes it’s own CMake files, when I apply this project to my Nano I’m not able to reach CUDA?
Hi @senasahin, how did you install PyTorch? If it was through Anaconda, then my guess is it installed a CPU-only wheel. Instead please install one of the PyTorch wheels from this topic that are built with GPU acceleration:
I came across that Nano aarch64 doesn’t supports Anaconda so I downloaded PyTorch already with these PyTorch for Jetson wheels to the Nano. The project was suggested to run on Anaconda environment and does not includes CMake or Makefile files so I downloaded required software by myself, with wheels. But still Torch doesn’t runs GPU enabled sir
And yes, in my computer I run the project with conda but on Nano I’m not able to download conda. So I tried runing the project in a python environment where I downloaded the project requierements manually
Deleted default coming PyTorch 1.6 (with previous steps) and after making sure that version is uninstalled, reinstalling wheel formatted PyTorch 1.7 ( since I needed that version ) from PyTorch for Jetson
Maybe only last step seems like what solved the issue but I actually tried uninstalling and reinstalling the versions before 1,2,3 and it didn’t changed the error I was getting. So just make sure the containers are well builded on your system.