Cuda can't work on AGX orin

Hi,
I installed Jetpack 5.0.2 on AGX orin but the cuda can’t work.

import torch
print('CUDA available: ’ + str(torch.cuda.is_available()))
CUDA available: False

when I run ./deviceQuery, it shows

./deviceQuery Starting…
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 100
→ no CUDA-capable device is detected
Result = FAIL

When I run

jetson_release -v

It shows

Software part of jetson-stats 4.2.3 - (c) 2023, Raffaello Bonghi
Model: Jetson AGX Orin - Jetpack 5.0.2 GA [L4T 35.1.0]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:

  • 699-level Part Number: 699-13701-0000-500 K.0
  • P-Number: p3701-0000
  • Module: NVIDIA Jetson AGX Orin
  • SoC: tegra23x
  • CUDA Arch BIN: 8.7
  • Codename: Concord
    Platform:
  • Machine: aarch64
  • System: Linux
  • Distribution: Ubuntu 20.04 focal
  • Release: 5.10.104-tegra
  • Python: 3.8.10
    jtop:
  • Version: 4.2.3
  • Service: Active
    Libraries:
  • CUDA: 11.4.239
  • cuDNN: 8.4.1.50
  • TensorRT: 5.0.2
  • VPI: 2.1.6
  • OpenCV: 4.5.4 - with CUDA: NO

when I run

nvcc -V

It shows

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_May__4_00:02:26_PDT_2022
Cuda compilation tools, release 11.4, V11.4.239
Build cuda_11.4.r11.4/compiler.31294910_0

when I run

ls /usr/src | grep nvidia

It shows

nvidia
nvidia-525.125.06

Can someone help me with this please?

Hi, how do you installed the jet pack? Because if you installed it using sdkmanager this will install everything including CUDA, but if you use only the flash script from l4t then you will need to install CUDA, you can do this using Ubuntu package manager:

sudo apt install nvidia-jetpack

Thank you for your reply.

I follow the commands of How to Install JetPack :: NVIDIA JetPack Documentation.

I can’t remember how I install jetpack but I have updated it so I think it is fine.
I use the commands below to update jetpack successfully.

sudo apt update
sudo apt dist-upgrade
sudo apt install --fix-broken -o Dpkg::Options::=“–force-overwrite”

I can find the cuda folder, cuda-11.4 folder under the path /usr/local/. But when I run ./deviceQuery
it shows

./deviceQuery
./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 100
→ no CUDA-capable device is detected
Result = FAIL

Can you run nvidia-smi? it looks like a nvidia-driver problem.

Thank you for your reply.

I think Nvidia-smi can’t work on Jetson. But the similar tool jtop can work correctly on my board.

Hi

Could you help to check the output of CUDA_VISIBLE_DEVICES?

Thanks.

Hi, I ran the command

echo “export CUDA_VISIBLE_DEVICES=${gpu}”

I got

export CUDA_VISIBLE_DEVICES=

I noticed that when I ran jtop and check the gpu, it showed it was offline. What means by that?

I use

echo $CUDA_VISIBLE_DEVICES

and it returns nothing

Hi,

It seems that apt upgrade update your environment to r35.2.1.
Would you mind reflashing your device with the latest JetPack 5.1.2 and checking if the issue still exists?

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.