Skip to content

Propagate EP session option modifications during provider creation#28154

Closed
KenLagos wants to merge 1 commit intomicrosoft:mainfrom
KenLagos:plugin_session_options_override
Closed

Propagate EP session option modifications during provider creation#28154
KenLagos wants to merge 1 commit intomicrosoft:mainfrom
KenLagos:plugin_session_options_override

Conversation

@KenLagos
Copy link
Copy Markdown

Description

Wrap the session's mutable SessionOptions in an OrtSessionOptions before passing it to IExecutionProviderFactory::CreateProvider. This ensures that any modifications made by an EP during creation (e.g., disabling memory pattern optimization) are reflected in the actual session options used during initialization. Previously, EP-side modifications to session options could be lost.

Motivation and Context

It would be nice to have control over which session options to enable/disable during plugin ep creation. For example, calls like ort_api.DisableMemPattern(const_cast<OrtSessionOptions*>(session_options)); during plugin ep creation were not being reflected in actual session options used during initialization.

passing it to IExecutionProviderFactory::CreateProvider. This ensures that
any modifications made by an EP during creation (e.g., disabling memory
pattern optimization) are reflected in the actual session options used
during initialization. Previously, EP-side modifications to session options
could be lost.
@KenLagos
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="AMD"

@KenLagos KenLagos marked this pull request as ready for review April 21, 2026 15:39
@KenLagos KenLagos marked this pull request as draft April 21, 2026 17:52
@KenLagos KenLagos closed this Apr 28, 2026
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.

1 participant