microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.86k stars 2.94k forks source link

Could not load library cudnn_cnn_infer64_8.dll. Error code 127 #18973

Open cyclonedll opened 11 months ago

cyclonedll commented 11 months ago

Describe the issue

Could not load library cudnn_cnn_infer64_8.dll. Error code 127 when using 1.16.3 CUDA

To reproduce

SessionOptions.MakeSessionOptionWithCudaProvider())

Urgency

No response

Platform

Windows

OS Version

10

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.16.3

ONNX Runtime API

C#

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

No response

mszhanyi commented 11 months ago
  1. Could you check if cudnn is installed
  2. Could you check if CUPTI is installed
  3. download dependencies to check which dlls are missing?
cyclonedll commented 11 months ago

The project runs OK with previous version ONNXRuntime before I upgraded .

Then I download cudnn and cuda follow this table: https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html 微信截图_20240103134214 but it's not work.

Then I found this file in the 'native' directory , so it's should be deployed with OnnxRT , and maybe it's the code issue.

tianleiwu commented 11 months ago

If you install proper cudnn (for CUDA 11) and update PATH environment variable, the DLL shall be able to load unless some dependency is missing.

You might try install latest VC DLLs (x64): https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022

Alwezbluu commented 4 months ago

Hi, have you solved this? I've been searching for reasons for error code 127 for 3 days and none of that works for me :-( literally drives me crazy.

cyclonedll commented 4 months ago

Hi, have you solved this? I've been searching for reasons for error code 127 for 3 days and none of that works for me :-( literally drives me crazy.

Nope ,