Closed asmirnov82 closed 1 month ago
My guess here is that the cuda dependency was not found. Currently, onnxruntime-genai stable release depends on cuda 11.8. And the onnxruntime dependency depends on cuda 11.8 and cudnn 8.x for cuda 11.8.
If the cuda toolkit bin directory is not in your PATH or if the installed cuda toolkit version differs from what is expected, that would explain why you're seeing this error.
The crash is likely to be caused by ORT NuGet package. There's a packaging error in the latest ORT NuGet that has incorrect CUDA version, which leads to DLL loading failure.
See: https://github.com/microsoft/onnxruntime/issues/20916#issuecomment-2158872185
I hope the above suggestions helped. Closing this issue now. Please let us know if you run into more problems.
Describe the bug
Unhandled exception. System.DllNotFoundException: Unable to load DLL 'onnxruntime-genai' or one of its dependencies: The specified module could not be found. (0x8007007E) at Microsoft.ML.OnnxRuntimeGenAI.NativeMethods.OgaCreateModel(Byte[] configPath, IntPtr& model) at Microsoft.ML.OnnxRuntimeGenAI.Model..ctor(String modelPath) at Program.Run(String modelPath) at Program.Main(String[] args)
To Reproduce Steps to reproduce the behavior:
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):