Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] LoadLibrary failed with error 126 #20589

Closed
johnny857 opened this issue May 7, 2024 · 1 comment
Closed

[Build] LoadLibrary failed with error 126 #20589

johnny857 opened this issue May 7, 2024 · 1 comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform

Comments

@johnny857
Copy link

johnny857 commented May 7, 2024

Describe the issue

image

Urgency

Microsoft.ML.OnnxRuntime.OnnxRuntimeException:“[ErrorCode:RuntimeException] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Projects\Yolov8.Net\Yolo.Net.FromTest\bin\Debug\net6.0-windows\runtimes\win-x64\native\onnxruntime_providers_cuda.dll

Target platform

Windows 10

Build script

if (useCuda)
_inferenceSession = new InferenceSession(modelPath, SessionOptions.MakeSessionOptionWithCudaProvider());
else
_inferenceSession = new InferenceSession(modelPath);

Error / output

Microsoft.ML.OnnxRuntime.OnnxRuntimeException:“[ErrorCode:RuntimeException] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1193 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\Projects\Yolov8.Net\Yolo.Net.FromTest\bin\Debug\net6.0-windows\runtimes\win-x64\native\onnxruntime_providers_cuda.dll

Visual Studio Version

17.7

GCC / Compiler Version

I am using the following content: Microsoft.ML.OnnxRuntime.GPU (nuget package VERSION 1.16.0)
NVIDIA CUDA Tool Kit (VERSION 11.3)
CUDNN (VERSION 8.2)
No response

@johnny857 johnny857 added the build build issues; typically submitted using template label May 7, 2024
@github-actions github-actions bot added platform:windows issues related to the Windows platform ep:CUDA issues related to the CUDA execution provider labels May 7, 2024
@matmatos
Copy link

I had a similar issue, take a look at this: #20597

@snnn snnn closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

3 participants