-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Creating DirectML Device crashes at DMLCreateDevice1
#3360
Comments
@RobinKa : Does the crash on your machine occur when calling |
@RobinKa : Thanks. Oh yes, you must use the preview DirectML.dll that came with this version of the ONNX Runtime package. The older OS version is not compatible with this package because ORT relies on some newer API's in preview DML that don't exist in the OS. |
Describe the bug
When trying to use the DirectML provider a crash happens when calling
DMLCreateDevice1
here. Replacing it withDMLCreateDevice
works although I don't know if there are any unintended consequences:THROW_IF_FAILED(DMLCreateDevice(d3d12_device.Get(), flags, IID_PPV_ARGS(&dml_device)));
Urgency
DirectML does not work (for me) without that fix. For me personally not having DML is a big issue as I need my program to run on all GPU vendors' devices.
System information
To Reproduce
Build onnxruntime with
build.bat --config RelWithDebInfo --parallel --use_dml --cmake_generator "Visual Studio 16 2019
. Try adding the DML provider (eg. start with this sample and addOrtSessionOptionsAppendExecutionProvider_DML(session_options, 0);
. The program will crash at this line (although I noticed when using a nonsensical device like 100 it goes through, but seems to use CPU still).Alternatively, python can be used using my recent PR and the following code will crash without a message at
set_providers()
:Expected behavior
It should not crash and use the DirectML execution provider.
The text was updated successfully, but these errors were encountered: