Load WinML runtime DLL for SDK EP discovery#733
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
baijumeswani
previously approved these changes
May 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Python SDK’s native library initialization on Windows to optionally load the WinML runtime DLL (Microsoft.Windows.AI.MachineLearning.dll) when it is present, enabling WinML execution providers in the WinML variant of the package.
Changes:
- Add a cached
_winml_libraryhandle toCoreInteropto keep the WinML DLL loaded for the process lifetime. - During Windows initialization, detect and load
Microsoft.Windows.AI.MachineLearning.dllfrom the Core binary directory when present.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Preload Microsoft.Windows.AI.MachineLearning.dll from the native runtime directory for WinML SDK variants so callers do not need to add that directory to PATH for EP discovery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The C# SDK already resolves the WinML runtime through its normal native dependency layout, so avoid explicitly preloading Microsoft.Windows.AI.MachineLearning.dll. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
baijumeswani
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Microsoft.Windows.AI.MachineLearning.dllfrom the Core native directory for the Python SDK when present.winmlbuilds from the native runtime directory.Validation