美文网首页
onnxruntime Failed to create CUD

onnxruntime Failed to create CUD

作者: 愤愤的有痣青年 | 来源:发表于2023-06-25 19:53 被阅读0次

在使用 onnxruntime-gpu时,出现如下错误:

[W:onnxruntime:Default, onnxruntime_pybind_state.cc:578 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/reference/execution-providers/CUDA-ExecutionProvider.html#requirements to ensure all dependencies are met.

在docker中使用FROM nvidia/cuda:11.2.1-base-ubuntu20.04镜像与onnxruntime-gpu==1.13.1版本时,仍然出现该错误.
解决办法,在项目最开始的代码前加入import torch即可解决该问题,当前,需要提前安装torch,我安装的是torch==2.0.1

相关文章

网友评论

      本文标题:onnxruntime Failed to create CUD

      本文链接:https://www.haomeiwen.com/subject/frtwydtx.html