Regarding the issue of CUDA and Pytorch

I’m using a Jetson nano orin developer kit with Jetpack 6.1 and Ubuntu 22.04. Currently I’m facing an issue regarding the compatibility of pytorch and cuda. While I 'm running the code “nvidia-smi” the below results are coming. I don’t know how i can solve the issue.
---------------------------------------------------------------------------------------+
| NVIDIA-SMI 540.3.0 Driver Version: N/A CUDA Version: 12.2 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Orin (nvgpu) N/A | N/A N/A | N/A |
| N/A N/A N/A N/A / N/A | Not Supported | N/A N/A |
| | | N/A |
±----------------------------------------±---------------------±---------------------+

±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
±--------------------------------------------------------------------------------------+
Please can you help me.

Hi,

There is no error.
The nvidia-smi has limited functionality on Jetson and your logs look correct.

To install PyTorch for JetPack 5, please check the below topic for more info:

Thanks.

1 Like

Thanks for the reply.
In the above nvidia-smi it gave cuda version as 12.2. But when I run the nvcc --version I have cuda version 12.4. I’m using Ubuntu 22.04 in a Jetson Orin nano developer kit. Since I’m getting these cuda 12.4 I tried to install the pytorch with cuda capability from the link Start Locally | PyTorch . But after installing it when I run the below code it gives false.
(base) jino@jino-desktop:~$ python
Python 3.12.7 | packaged by Anaconda, Inc. | (main, Oct 4 2024, 13:17:02) [GCC 11.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import torch
print(torch.cuda.is_available())
False

I tried using various versions of torch, torchvision and torchaudio modules but nothing worked out giving the same results. Please kindly help.

Hi,

The package will look for the same CUDA version that is used for compiling.

It’s recommended to use our prebuilt instead which has built with Jetson’s GPU support.
On the link shared above, it contains packages built with 12.2 or 12.4 CUDA.

Thanks.