-
Notifications
You must be signed in to change notification settings - Fork 3.4k
'QnnEpFactory' should provide a fully-qualified path to the backend #25407
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
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
nieubank
previously approved these changes
Jul 15, 2025
build error for building as shared lib |
Sorry... I assumed an MSVC-ism. Will fix shortly. |
jywu-msft
previously approved these changes
Jul 17, 2025
jywu-msft
reviewed
Jul 17, 2025
@adrianlizarraga @skottmckay can you take a quick look at this? |
conflict with #25456 |
I resolved the merge conflict. pls confirm it looks ok. |
Looks good, thanks. |
adrianlizarraga
approved these changes
Jul 21, 2025
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
The
QnnEpFactory
implementation currently initializes the underlying provider by passing thebackend_type
configuration ashtp
, causing the provider to find the appropriate backend-library, and load it relative to the OnnxRuntime library. But if EP's are distributed separately from the OnnxRuntime library - a major benefit of the EP ABI - then the backend-library may-well not be relative to the OnnxRuntime. Having theQnnEpFactory
implementation look for its associated runtime relative to itself would allow the implementation to bring its own runtime - and that's what this PR enables.If the
QnnEpFactory
implementation is co-located with the OnnxRuntime library, then this is consistent with the existing behavior, but anQnnEpFactory
implementation that is shipped 'out-of-band' will use a backend-relative to itself.WinML has been using a version of this fix, and this PR is 'upstreaming' the change.
Motivation and Context
To support out-of-band distribution of EP's - enabled by the EP ABI work - then EP's should accommodate finding dependencies relative to the EP library, and not the OnnxRuntime library.