- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.5k
 
'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
Conversation
| 
           build error for building as shared lib  | 
    
          
 Sorry... I assumed an MSVC-ism. Will fix shortly.  | 
    
| 
           @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.  | 
    
| 
           Hi there! We haven't cut the release branch for this version yet, so I'm removing the   | 
    
…icrosoft#25407) ### Description The `QnnEpFactory` implementation currently initializes the underlying provider by passing the `backend_type` configuration as `htp`, 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 the `QnnEpFactory` 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 an `QnnEpFactory` 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. --------- Co-authored-by: George Wu <[email protected]>
…icrosoft#25407) ### Description The `QnnEpFactory` implementation currently initializes the underlying provider by passing the `backend_type` configuration as `htp`, 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 the `QnnEpFactory` 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 an `QnnEpFactory` 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. --------- Co-authored-by: George Wu <[email protected]>
Description
The
QnnEpFactoryimplementation currently initializes the underlying provider by passing thebackend_typeconfiguration 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 theQnnEpFactoryimplementation 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
QnnEpFactoryimplementation is co-located with the OnnxRuntime library, then this is consistent with the existing behavior, but anQnnEpFactoryimplementation 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.