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

[DML] Add support for AppendExecutionProvider_DML1 with C#. #22291

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

azchohfi
Copy link

@azchohfi azchohfi commented Oct 1, 2024

Description

Adds the ability to use the SessionOptionsAppendExecutionProvider_DML1 method with C#.

Motivation and Context

It was not possible to use the SessionOptionsAppendExecutionProvider_DML1 method with C# before. This PR adds adds the mapping of the DML EP, only for the SessionOptionsAppendExecutionProvider_DML1 method. The user of the library is still required to create the IDMLDevice and ID3D12CommandQueue manually, however that may be.

We validated that this works BY using CsWin32 to create projections of the native types and copying the logic from the ESRGAN super-resolution model sample, in particular, the SelectAdapter and CreateDmlDeviceAndCommandQueue methods from the helpers.cpp class.

A follow-up PR could make this process even simpler and provide this helper method, but it seemed a little bit too much for the basic support.

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

Successfully merging this pull request may close these issues.

1 participant