[VitisAI] Add External EP Loader #26627
Open
+59
−1
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.
[VitisAI] Add External EP Loader
Description
This PR introduces a dynamic external execution provider loading mechanism for the VitisAI execution provider, enabling runtime loading of alternative execution providers through a plugin-style architecture.
Key Changes
1. New External EP Library Infrastructure (
global_api.cc)ExternalEpLibarayclass to dynamically load external execution provider libraries at runtimeg_external_ep_libaries) with caching to avoid redundant library loadingCreateExecutionProviderFromAnotherEp()function to instantiate execution providers from external librariesImplementation Details:
GetProvidersymbol (required)CreateEpFactoriesorRyzenAI_SetSessionOptionsEnsure()methodClear()method and proper error handlingLIBRARY_PREFIXandLIBRARY_EXTENSIONmacros2. API Extension (
global_api.h)CreateExecutionProviderFromAnotherEp()core/framework/execution_provider.hforIExecutionProviderinterface<memory>for smart pointer support3. Factory Integration (
vitisai_provider_factory.cc)external_ep_libraykeyexternal_ep_librayoption is specified