Jetson Orin Nano Super运行.onnx模型无法调用GPU
老师们,我买的Jetson Orin Nano Super 8GB,在调用.onnx模型时无法使用GPU,jetpack 6.2和jetpack 6.0两个版本都试过了,也安装了相关模块,就是一直调用CPU再跑,GPU调用不上,如下是运行过程中的一些图。
Hi,
Based on your error log, the ONNXRuntime doesn’t support CUDAExecutionProvider.
You will need to install the one that supports CUDA to run the model on GPU.
You can find one in the below link:
Thanks.
老师,目前我們在使用 JetPack 6.2 環境,CUDA 版本為 12.6,cuDNN 版本為 9.3,符合官方推薦的匹配配置。
我們也嘗試了重裝 onnxruntime-gpu。
但仍然遇到錯誤。詳細的報錯資訊如下(詳情見附件log.txt):
在運行 test.py 時,出現以下錯誤:
(env) pega@q255000041-pc:~/Desktop/fps_mun$ python test.py
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.6 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with ‘pybind11>=2.12’.
If you are a user of the module, the easiest solution will be to
downgrade to ‘numpy<2’ or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File “/home/pega/Desktop/fps_mun/test.py”, line 1, in
import yolov7
File “/home/pega/Desktop/fps_mun/yolov7.py”, line 4, in
import onnxruntime as ort
File “/home/pega/Desktop/fps_mun/env/lib/python3.10/site-packages/onnxruntime/init.py”, line 23, in
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File “/home/pega/Desktop/fps_mun/env/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py”, line 32, in
from .onnxruntime_pybind11_state import * # noqa
Traceback (most recent call last):
File “/home/pega/Desktop/fps_mun/env/lib/python3.10/site-packages/numpy/core/_multiarray_umath.py”, line 44, in getattr
raise ImportError(msg)
ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.6 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with ‘pybind11>=2.12’.
If you are a user of the module, the easiest solution will be to
downgrade to ‘numpy<2’ or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last):
File “/home/pega/Desktop/fps_mun/test.py”, line 1, in
import yolov7
File “/home/pega/Desktop/fps_mun/yolov7.py”, line 4, in
import onnxruntime as ort
File “/home/pega/Desktop/fps_mun/env/lib/python3.10/site-packages/onnxruntime/init.py”, line 57, in
raise import_capi_exception
File “/home/pega/Desktop/fps_mun/env/lib/python3.10/site-packages/onnxruntime/init.py”, line 23, in
from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401
File “/home/pega/Desktop/fps_mun/env/lib/python3.10/site-packages/onnxruntime/capi/_pybind_state.py”, line 32, in
from .onnxruntime_pybind11_state import * # noqa
ImportError
log.txt (10.0 KB)
Hi,
Somehow the packages in jp6/cu126 index don’t have CUDAExecutionProvider.
We need to check with our internal team first. Will provide more info to you later.
Thanks.
之前有老师说是numpy版本问题,建议安装 numpy==1.26.4,但是 numpy重新安装成1.26.4版本后报如下错误,详情如附件所示。
pega@q255000041-pc:~/Desktop/fps_mun$ python test.py
2025-06-09 10:53:00.290822627 [E:onnxruntime:Default, provider_bridge_ort.cc:1744 TryGetProviderInfo_CUDA] /home/yifanl/onnxruntime/onnxruntime/core/session/provider_bridge_ort.cc:1426 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn.so.8: cannot open shared object file: No such file or directory
2025-06-09 10:53:00.291056690 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:870 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference NVIDIA - CUDA | onnxruntime ensure all dependencies are met.
Model correct
2025-06-09 10:53:01.101660910 [E:onnxruntime:Default, provider_bridge_ort.cc:1744 TryGetProviderInfo_CUDA] /home/yifanl/onnxruntime/onnxruntime/core/session/provider_bridge_ort.cc:1426 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn.so.8: cannot open shared object file: No such file or directory
2025-06-09 10:53:01.101718450 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:870 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference NVIDIA - CUDA | onnxruntime ensure all dependencies are met.
Segmentation fault (core dumped)
logs.txt (1.5 KB)
Hi,
libcudnn.so.8: cannot open shared object file: No such file or directory
Based on the above error, the installed onnxruntime package is not built on JetPack 6.2 as JetPack 6.2 uses cuDNN 9.3.
Do you download the package from the below link?
https://pypi.jetson-ai-lab.dev/jp6/cu126
We can get CUDAExecutionProvider with the container.
Could you give it a try?
Thanks.
解决了吗?
Hi,
The onnxruntime v1.22 from the below link should work well on JetPack 6.2:
Thanks.


