I'm trying to write a C++ application that uses the DirectML Execution Provider, I was using theonnxruntime.dll andonnxruntime_providers_shared.dll from the NuGet C# packageMicrosoft.ML.OnnxRuntime.DirectML and everything worked fine for the first 2 models I tried to run, but later, when trying to run a YOLO one, it didn't ran on DML, only in CUDA or CPU. After a lot of debugging, I tried running it on python and everything worked fine, out of curiosity, I tried copying the python dlls fromPython313\Lib\site-packages\onnxruntime\capi to my own C++ project, and voala, it worked! I noticed that the Python version has 1 extra dll,DirectML.dll , that the C# one does not. Also, Python'sonnxruntime.dll has 19-ish KB, while the one from C# has 16-ish KB What's the reason for this difference? Shouldn't both packages just be thin wrappers around the same lib? The error I was getting was ←[1;31m2025-05-26 17:36:02.1363987 [E:onnxruntime:, inference_session.cc:2281 onnxruntime::InferenceSession::Initialize::<lambda_5767435f92a738c7a221df2e7c461c0f>::operator ()] Exception during initialization: D:\a\_work\1\s\onnxruntime\core\providers\dml\DmlExecutionProvider\src\AbiCustomRegistry.cpp(519)\onnxruntime.dll!00007FFDB396E372: (caller: 00007FFDB38DDB99) Exception(3) tid(7150) 80070057 ParFailed to create segmenter: Exception during initialization: D:\a\_work\1\s\onnxruntime\core\providers\dml\DmlExecutionProvider\src\AbiCustomRegistry.cpp(519)\onnxruntime.dll!00007FFDB396E372: (caller: 00007FFDB38DDB99) Exception(3) tid(7150) 80070057 Incorrect parameter.
|