-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[VitisAI EP] Implement new overload of CreateProvider() called with session options #24445
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
adrianlizarraga
merged 5 commits into
main
from
adrianl/vitisai-create-provider-from-session-options
Apr 18, 2025
Merged
[VitisAI EP] Implement new overload of CreateProvider() called with session options #24445
adrianlizarraga
merged 5 commits into
main
from
adrianl/vitisai-create-provider-from-session-options
Apr 18, 2025
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
Hi @wcy123, Could you please take look at this PR needed for ORT 1.22? Thanks. |
Thank @adrianlizarraga, I read the PR quickly, it looks like it is backward compatible. It looks good to me. please merge it, I would like not to block the next release. |
jywu-msft
previously approved these changes
Apr 17, 2025
jywu-msft
approved these changes
Apr 18, 2025
intbf
pushed a commit
to intbf/onnxruntime
that referenced
this pull request
Apr 25, 2025
…ession options (microsoft#24445) ### Description A new overload of CreateProvider() was added to the to handle the extraction of EP options from the session option configurations. ### Motivation and Context Allows use of new Compile API. Refer to microsoft#24207 Signed-off-by: bfilipek <[email protected]>
HectorSVC
pushed a commit
that referenced
this pull request
May 19, 2025
…el` flow (#24799) ### Description convert all session configs, i.e. key-value pairs into provider options, the key prefixed with `ort_session_config.` ### Motivation and Context #24445 has a bug when `Ort::CompileModel` is used, not all session config are passed to VITISAI EP backend. It is because that the `session_option` which holds a reference to `VitisiAIExectuionProviderFactory` is not as same as the `session_option` used for `Ort::CompileModel`. `Ort::CompileModel` create another `session_option` behind scene. The symptom of this bug is that only the session configs in the first `SessionOptions` object is passed to `VitisiAIExectuionProviderFactory` and session configs in the second `SessionOptions` are not, so that VITISAI EP backend sometimes assumes that ep.cache_context is not enabled, and then ep context cache model is not created properly.
HectorSVC
pushed a commit
that referenced
this pull request
Jul 7, 2025
### Description Add a new ORT API `GetSessionOptionConfigEntries`. ### Motivation and Context #24887 allows plugin-EPs to interface with ORT using a binary stable interface. #24445 allows an EP to handle the extraction of EP options from the session option configurations. For an EP like VitisAI EP to comply with the requirements, it is necessary for a plugin-EPs to access all config entries in a session option. ```c++ OrtKeyValuePairs * kvps = nullptr; auto status = GetSessionOptionConfigEntries(session_option, &kvps); if(status) { throw status; } std::unique_ptr<OrtKeyValuePairs, void (*)(OrtKeyValuePairs*)> config_entries(kvps, ort_api.ReleaseKeyValuePairs); const char* const* keys = nullptr; const char* const* values = nullptr; size_t num_keys = 0; // Get keys and values from the config entries Ort::GetApi().GetKeyValuePairs(config_entries.get(), &keys, &values, &num_keys); for (size_t i = 0; i < num_keys; ++i) { // process keys[i] and values[i] } ```
daijh
pushed a commit
to daijh/onnxruntime
that referenced
this pull request
Jul 10, 2025
### Description Add a new ORT API `GetSessionOptionConfigEntries`. ### Motivation and Context microsoft#24887 allows plugin-EPs to interface with ORT using a binary stable interface. microsoft#24445 allows an EP to handle the extraction of EP options from the session option configurations. For an EP like VitisAI EP to comply with the requirements, it is necessary for a plugin-EPs to access all config entries in a session option. ```c++ OrtKeyValuePairs * kvps = nullptr; auto status = GetSessionOptionConfigEntries(session_option, &kvps); if(status) { throw status; } std::unique_ptr<OrtKeyValuePairs, void (*)(OrtKeyValuePairs*)> config_entries(kvps, ort_api.ReleaseKeyValuePairs); const char* const* keys = nullptr; const char* const* values = nullptr; size_t num_keys = 0; // Get keys and values from the config entries Ort::GetApi().GetKeyValuePairs(config_entries.get(), &keys, &values, &num_keys); for (size_t i = 0; i < num_keys; ++i) { // process keys[i] and values[i] } ```
qti-yuduo
pushed a commit
to CodeLinaro/onnxruntime
that referenced
this pull request
Aug 8, 2025
### Description Add a new ORT API `GetSessionOptionConfigEntries`. ### Motivation and Context microsoft#24887 allows plugin-EPs to interface with ORT using a binary stable interface. microsoft#24445 allows an EP to handle the extraction of EP options from the session option configurations. For an EP like VitisAI EP to comply with the requirements, it is necessary for a plugin-EPs to access all config entries in a session option. ```c++ OrtKeyValuePairs * kvps = nullptr; auto status = GetSessionOptionConfigEntries(session_option, &kvps); if(status) { throw status; } std::unique_ptr<OrtKeyValuePairs, void (*)(OrtKeyValuePairs*)> config_entries(kvps, ort_api.ReleaseKeyValuePairs); const char* const* keys = nullptr; const char* const* values = nullptr; size_t num_keys = 0; // Get keys and values from the config entries Ort::GetApi().GetKeyValuePairs(config_entries.get(), &keys, &values, &num_keys); for (size_t i = 0; i < num_keys; ++i) { // process keys[i] and values[i] } ```
sanketkaleoss
pushed a commit
to sanketkaleoss/onnxruntime
that referenced
this pull request
Aug 11, 2025
### Description Add a new ORT API `GetSessionOptionConfigEntries`. ### Motivation and Context microsoft#24887 allows plugin-EPs to interface with ORT using a binary stable interface. microsoft#24445 allows an EP to handle the extraction of EP options from the session option configurations. For an EP like VitisAI EP to comply with the requirements, it is necessary for a plugin-EPs to access all config entries in a session option. ```c++ OrtKeyValuePairs * kvps = nullptr; auto status = GetSessionOptionConfigEntries(session_option, &kvps); if(status) { throw status; } std::unique_ptr<OrtKeyValuePairs, void (*)(OrtKeyValuePairs*)> config_entries(kvps, ort_api.ReleaseKeyValuePairs); const char* const* keys = nullptr; const char* const* values = nullptr; size_t num_keys = 0; // Get keys and values from the config entries Ort::GetApi().GetKeyValuePairs(config_entries.get(), &keys, &values, &num_keys); for (size_t i = 0; i < num_keys; ++i) { // process keys[i] and values[i] } ```
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
A new overload of CreateProvider() was added to the to handle the extraction of EP options from the session option configurations.
Motivation and Context
Allows use of new Compile API.
Refer to #24207