-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add infrastructure for auto EP selection #24430
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
Merged
Merged
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can commit the suggested changes from lintrunner.
skottmckay
commented
Apr 15, 2025
skottmckay
commented
Apr 15, 2025
skottmckay
commented
Apr 15, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bunch of build failures. missing some dxcore header ? |
yuslepukhin
reviewed
Apr 15, 2025
skottmckay
commented
Apr 15, 2025
skottmckay
commented
Apr 15, 2025
fs-eire
reviewed
Apr 15, 2025
…EpInfrastructure_PR
Address PR comment
Disable EP registration/auto selection testing on non-Windows platforms. There's no device discovery so it can't be used.
…thub.com/microsoft/onnxruntime into skottmckay/AutoSelectEpInfrastructure_PR
Add ORT_API_CALL fixes Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com>
…EpInfrastructure_PR
…cies a lot simpler, and in the future we need to provide that to an EP author so it is reasonable for it to be implemented in onnxruntime_session. Address PR comments. Add onnxruntime_session to the CUDA EP dependencies.
Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com>
…thub.com/microsoft/onnxruntime into skottmckay/AutoSelectEpInfrastructure_PR
- move provider bridge support to the EP side - change SessionOptionsAppendExecutionProvider_V2 to take OrtEpDevices as input - better device discovery (pending final implementation)
Avoid double lock for Provider Get when it calls Load.
Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com>
Disable setting device_id for DML. Need to investigate why we get an invalid bus number in device discovery. The device discovery code is temporary and most likely has an issue.
…thub.com/microsoft/onnxruntime into skottmckay/AutoSelectEpInfrastructure_PR
jywu-msft
approved these changes
Apr 20, 2025
Will follow up any comments in separate PR |
ashrit-ms
pushed a commit
that referenced
this pull request
Apr 24, 2025
### Description <!-- Describe your changes. --> Add infrastructure to enable auto EP selection. Device discovery for CPU/GPU/NPU on Windows. Supports internal (CPU/DML/WebGPU) and provider bridge (CUDA) EPs currently. Infrastructure will be used with plugin EPs next. Selection policy implementation will be added next, so in the interim there's a temporary function with manually specified selection so unit tests can cover the end-to-end. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com>
adrianlizarraga
added a commit
that referenced
this pull request
Apr 25, 2025
### Description Fixes a segfault that occurs when an EP library is re-loaded in the same process. ### Motivation and Context A recent [PR ](#24430) updated the Environment to unload all EP libraries on destruction of `OrtEnv`. We forgot to properly update the state to mark the EP library as unloaded. Therefore, this caused a segfault when the EP library was re-loaded.
intbf
pushed a commit
to intbf/onnxruntime
that referenced
this pull request
Apr 25, 2025
### Description <!-- Describe your changes. --> Add infrastructure to enable auto EP selection. Device discovery for CPU/GPU/NPU on Windows. Supports internal (CPU/DML/WebGPU) and provider bridge (CUDA) EPs currently. Infrastructure will be used with plugin EPs next. Selection policy implementation will be added next, so in the interim there's a temporary function with manually specified selection so unit tests can cover the end-to-end. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com> Signed-off-by: bfilipek <bartlomiej.filipek@intel.com>
vraspar
pushed a commit
that referenced
this pull request
Apr 28, 2025
### Description Fixes a segfault that occurs when an EP library is re-loaded in the same process. ### Motivation and Context A recent [PR ](#24430) updated the Environment to unload all EP libraries on destruction of `OrtEnv`. We forgot to properly update the state to mark the EP library as unloaded. Therefore, this caused a segfault when the EP library was re-loaded.
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.
Description
Add infrastructure to enable auto EP selection.
Device discovery for CPU/GPU/NPU on Windows.
Supports internal (CPU/DML/WebGPU) and provider bridge (CUDA) EPs currently.
Infrastructure will be used with plugin EPs next.
Selection policy implementation will be added next, so in the interim there's a temporary function with manually specified selection so unit tests can cover the end-to-end.
Motivation and Context