Add infrastructure for auto EP selection by skottmckay · Pull Request #24430 · microsoft/onnxruntime
added 2 commits
April 15, 2025 21:46Disable EP registration/auto selection testing on non-Windows platforms. There's no device discovery so it can't be used.
- move provider bridge support to the EP side - change SessionOptionsAppendExecutionProvider_V2 to take OrtEpDevices as input - better device discovery (pending final implementation)
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.
skottmckay
deleted the
skottmckay/AutoSelectEpInfrastructure_PR
branch
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.
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request
May 12, 2025### Description Fixes a segfault that occurs when an EP library is re-loaded in the same process. ### Motivation and Context A recent [PR ](microsoft#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.
fdwr
mentioned this pull request
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