Skip to content

Cant get GPU to work with ONNX Runtime 1.19 Cuda 12.6 CuDNN 9 RTXA4000 #21825

Description

Describe the issue

providers = ['CUDAExecutionProvider'] # Specify the GPU provider
session = ort.InferenceSession(model_path, providers=providers) # Create the ONNX Runtime InferenceSession with GPU

Reports error

['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
2024-08-22 13:01:04.2808367 [E:onnxruntime:Default, provider_bridge_ort.cc:1992 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1637 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "c:\Simon\Timpi\test\myenv\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

2024-08-22 13:01:04.2871671 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:965 onnxruntime::python::CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*, and the latest MSVC runtime. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
ONNX Runtime is using the CPU (CPUExecutionProvider).

To reproduce

providers = ['CUDAExecutionProvider'] # Specify the GPU provider
session = ort.InferenceSession(model_path, providers=providers) # Create the ONNX Runtime InferenceSession with GPU

DUMPBIN on DLL

cublasLt64_12.dll          Directory: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin
cublas64_12.dll
cudnn64_9.dll
cufft64_11.dll
cudart64_12.dll
onnxruntime_providers_shared.dll
KERNEL32.dll
MSVCP140.dll
VCRUNTIME140.dll
VCRUNTIME140_1.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll

cublasLt64_12.dll:  Found at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\cublasLt64_12.dll
cublas64_12.dll:    Found at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\cublas64_12.dll
cudnn64_9.dll:      Found at C:\Program Files\NVIDIA\CUDNN\v9.3\bin\11.8\cudnn64_9.dll
cufft64_11.dll:     Found at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\cufft64_11.dll
cudart64_12.dll:    Found at C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\cudart64_12.dll
onnxruntime_providers_shared.dll:   Not found
KERNEL32.dll: Not found
MSVCP140.dll:       Found at C:\Program Files (x86)\NortonInstaller\{0C55C096-0F1D-4F28-AAA2-85EF591126E7}\NGC\A5E82D02\22.23.1.21\MSVCP140.dll
VCRUNTIME140.dll:   Found at C:\Program Files (x86)\NortonInstaller\{0C55C096-0F1D-4F28-AAA2-85EF591126E7}\NGC\A5E82D02\22.23.1.21\VCRUNTIME140.dll
VCRUNTIME140_1.dll: Not found
api-ms-win-crt-heap-l1-1-0.dll: Found at C:\Program Files\Azure Data Studio\resources\app\extensions\mssql\sqltoolsservice\Windows\4.0.1.1\api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll: Found at C:\Program Files\Azure Data Studio\resources\app\extensions\mssql\sqltoolsservice\Windows\4.0.1.1\api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll: Found at C:\Program Files\Azure Data Studio\resources\app\extensions\mssql\sqltoolsservice\Windows\4.0.1.1\api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll: Found at C:\Program Files\Azure Data Studio\resources\app\extensions\mssql\sqltoolsservice\Windows\4.0.1.1\api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll: Found at C:\Program Files\Azure Data Studio\resources\app\extensions\mssql\sqltoolsservice\Windows\4.0.1.1\api-ms-win-crt-string-l1-1-0.dll

Urgency

Urgent

Platform

Windows

OS Version

11

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

11.9

ONNX Runtime API

Python

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

cuda 12.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:CUDAissues related to the CUDA execution providerrelease:1.19.0Cherry pick to ORT 1.19

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions