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

Does ONNX models used in this project supports CUDA only( crashes on CPU) #1

Open
JohnMasen opened this issue May 4, 2023 · 3 comments

Comments

@JohnMasen
Copy link

HI,
I'm trying to run your models with CPU, the application crashes while loading the model.
To verify if these ONNX models could be loaded by CPU, I created a simple test app like this.

using Microsoft.ML.OnnxRuntime;
using Onnx;
SessionOptions options = new();
options.AppendExecutionProvider_CPU();
InferenceSession session = new InferenceSession(@"D:\Models\RWKV-4-Raven-3B-v11-Eng49-Chn49-Jpn1-Other1-20230429-ctx4096_32_2560_16.onnx", options);
Console.WriteLine("Done");
Console.ReadLine();

the application crashes with following exception

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

Could you please kindly suggest if any thing I did wrong or the model bin file is designed for CUDA only?

@imxcstar
Copy link
Owner

imxcstar commented May 5, 2023

Which onnx nuget package are you using? The CPU does not need to install cuda when using this'Microsoft.ML.OnnxRuntime '

@JohnMasen
Copy link
Author

Microsoft.ML.OnnxRuntime v1.14.1

@imxcstar
Copy link
Owner

imxcstar commented May 7, 2023

This is not clear. Perhaps the configuration environment is different somewhere. 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants