onnxruntime,无法运行

首先查询cuda版本

C:\Users\admin>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

查询cudnn版本目录

C:\Program Files\NVIDIA\

查找对应的onnxruntime版本

https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html

如果安装了conda环境以后,部署有问题 126错误码的话,

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin

从这个目录中,11.8对应的是安装的cuda版本,找到如下几个文件复制到程序的目录下

cudnn64_8.dll
cudnn_ops_infer64_8.dll
cudnn_cnn_infer64_8.dll
cudnn_adv_infer64_8.dll

 

posted @ 2025-05-14 18:03  柏泊  阅读(89)  评论(0)    收藏  举报