You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a C++ application that uses the DirectML Execution Provider, I was using the onnxruntime.dll and onnxruntime_providers_shared.dll from the NuGet C# package Microsoft.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 from Python313\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's onnxruntime.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\cor
e\providers\dml\DmlExecutionProvider\src\AbiCustomRegistry.cpp(519)\onnxruntime.dll!00007FFDB396E372: (caller: 00007FFDB
38DDB99) 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: (ca
ller: 00007FFDB38DDB99) Exception(3) tid(7150) 80070057 Incorrect parameter.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to write a C++ application that uses the DirectML Execution Provider, I was using the
onnxruntime.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 from
Python313\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's
onnxruntime.dll
has 19-ish KB, while the one from C# has 16-ish KBWhat's the reason for this difference? Shouldn't both packages just be thin wrappers around the same lib?
The error I was getting was
Beta Was this translation helpful? Give feedback.
All reactions