I am struggling with install Pytoch and torchvision for latest Jetpack 6.1 on Jetson Orin AGX Developer Kit.
I am working with yolo and it runs with cpu but I need cuda support with pytorch.
Please, Can anyone help me with step by step guides.
Thank you!
dalab@ubuntu:~/vision$ python
Python 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import torch
print(“CUDA Available:”, torch.cuda.is_available())
CUDA Available: False
print(“Device Name:”, torch.cuda.get_device_name(0) if torch.cuda.is_available() else “CUDA not available”)
Device Name: CUDA not available
x = torch.rand(3, 3).cuda()
Traceback (most recent call last):
File “”, line 1, in
File “/home/dalab/.local/lib/python3.10/site-packages/torch/cuda/init.py”, line 310, in _lazy_init
raise AssertionError(“Torch not compiled with CUDA enabled”)
AssertionError: Torch not compiled with CUDA enabled
print(“Tensor on GPU:”, x)
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘x’ is not defined
exit()
dalab@ubuntu:~/vision$ cd …
dalab@ubuntu:~$ python3 -c “import torchvision; print(torchvision.version)”
0.20.1
dalab@ubuntu:~$ python3 -c “import torch; print(torch.version); print(torch.cuda.is_available())”
2.5.1
False
dalab@ubuntu:~$