The torch-2.5.0a0+872d972e41.nv24.08 for JetPack-6.1 can't getDeviceCount

HW: Jetson Orin NX
JP: 6.1
PyTorch版本: 2.5.0a0+872d972e41.nv24.08

The jtop and tegrastats command is running normal in isaac common official docker container,but get error below:

/usr/local/lib/python3.10/dist-packages/torch/cuda/init.py:129: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 801: operation not supported (Triggered internally at /opt/pytorch/pytorch/c10/cuda/CUDAFunctions.cpp:108.)
return torch._C._cuda_getDeviceCount() > 0

same error as # 310384, but there is no answer.

Who can help me? please.

Hello,

Thanks for visiting the NVIDIA Developer forums! Your topic will be best served in the Jetson category.

I have moved this post for better visibility.

Cheers,
Tom

1 Like

Hi,

Which container do you use?
Thanks.

Hi,
thanks for the reply!

The container is from isaac_ros_common, using command:
cd ${ISAAC_ROS_WS}/src/isaac_ros_common && ./scripts/run_dev.sh

when I use this package:
https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/a86/1895294d90440/torch-2.6.0rc1-cp310-cp310-linux_aarch64.whl
https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/aa2/2da8dcf4c4c8d/torchvision-0.21.0-cp310-cp310-linux_aarch64.whl
the problem is gone, But it seems that the full performance of the Orin NX GPU is not brought into play.

Hi @onedaydayd

Did you setup your Jetson following the documentation?

Your Jetson have CUDA and libraries installed?

Best,
Raffaello