Skip to content

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 36 commits into from
Apr 20, 2025

Conversation

skottmckay
Copy link
Contributor

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

Copy link
Contributor

@github-actions github-actions bot left a 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.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jywu-msft
Copy link
Member

bunch of build failures. missing some dxcore header ?

Disable EP registration/auto selection testing on non-Windows platforms. There's no device discovery so it can't be used.
@jywu-msft jywu-msft requested a review from RyanUnderhill April 17, 2025 22:41
Copy link
Contributor

@adrianlizarraga adrianlizarraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding ORT_API_CALL to the factory functions should hopefully fix the x86 ci errors

skottmckay and others added 5 commits April 19, 2025 06:53
Add ORT_API_CALL fixes

Co-authored-by: Adrian Lizarraga <[email protected]>
…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.
skottmckay and others added 4 commits April 20, 2025 07:28
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 skottmckay merged commit 6df6206 into main Apr 20, 2025
87 of 89 checks passed
@skottmckay skottmckay deleted the skottmckay/AutoSelectEpInfrastructure_PR branch April 20, 2025 06:14
@skottmckay
Copy link
Contributor Author

Will follow up any comments in separate PR

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.

6 participants