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

Can't load CUDA on .NET project #23810

Open
ElinLiu0 opened this issue Feb 25, 2025 · 0 comments
Open

Can't load CUDA on .NET project #23810

ElinLiu0 opened this issue Feb 25, 2025 · 0 comments
Labels
api:CSharp issues related to the C# API ep:CUDA issues related to the CUDA execution provider .NET Pull requests that update .net code

Comments

@ElinLiu0
Copy link

Describe the issue

I'm installed Microsoft.ML.OnnxRuntime.Gpu and Microsoft.ML.OnnxRuntime.Gpu.Windows via NuGet.

Yet when trying using below code to initalize session:

if (nvGPUExists)
{
    using var gpuSessionOptions = SessionOptions.MakeSessionOptionWithCudaProvider();
    this.HubertModle = new InferenceSession(HubertModelPath, gpuSessionOptions);
}
else
{
    SessionOptions sessionOptions = new SessionOptions();
    sessionOptions.GraphOptimizationLevel = GraphOptimizationLevel.ORT_ENABLE_ALL;
    sessionOptions.AppendExecutionProvider_DML(0);
    this.HubertModle = new InferenceSession(HubertModelPath, sessionOptions);
}

Then it raised:

Unable to find an entry point named 'OrtSessionOptionsAppendExecutionProvider_CUDA' in DLL 'onnxruntime'.

To reproduce

No exactlly

Urgency

No response

Platform

Windows

OS Version

Windows 11 24H2

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.20.1

ONNX Runtime API

C#

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

CUDA 12.8,CUDNN 9.7,TensorRT 10.8.0.43

@github-actions github-actions bot added .NET Pull requests that update .net code api:CSharp issues related to the C# API ep:CUDA issues related to the CUDA execution provider labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:CSharp issues related to the C# API ep:CUDA issues related to the CUDA execution provider .NET Pull requests that update .net code
Projects
None yet
Development

No branches or pull requests

1 participant