-
Notifications
You must be signed in to change notification settings - Fork 56
Fix failing case where input onnx model is used with shared context e… #776
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request fixes a bug in the OpenVINO execution provider where ONNX source models fail when compiled with shared context enabled. The issue was identified in Intel's tracking system and involves incorrect handling of EP context models during compilation.
- Added logic to detect EP context models using
CheckForOVEPCtxNodeInGraph() - Modified the conditional check to use
is_epctx_modelinstead of!session_context_.so_context_enable - Added explanatory comments about the OVIR wrapped in epctx corner case
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| graph_body_viewer_0.DomainToVersionMap().at(kOnnxDomain); | ||
|
|
||
| // OVIR wrapped in epctx should be treated as source but this code does not | ||
| // This corner case is not in use and will be addressed in a future commit |
Copilot
AI
Aug 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is incomplete and unclear. It should explain what 'OVIR' stands for and provide a complete explanation of the issue and planned resolution.
| // This corner case is not in use and will be addressed in a future commit | |
| // OVIR (OpenVINO Intermediate Representation) models that are wrapped within an EP (Execution Provider) context (epctx) | |
| // should be treated as source models. However, the current implementation does not handle this case correctly. | |
| // This is a known corner case that is not currently encountered in practice, but it will be properly addressed in a future commit. |
| graph_body_viewer_0.DomainToVersionMap().at(kOnnxDomain); | ||
|
|
||
| // OVIR wrapped in epctx should be treated as source but this code does not | ||
| // This corner case is not in use and will be addressed in a future commit |
Copilot
AI
Aug 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding a TODO comment or tracking issue reference to make this technical debt more actionable and trackable.
| // This corner case is not in use and will be addressed in a future commit | |
| // TODO: Handle the corner case where OVIR is wrapped in epctx as source. This is not currently in use. Consider tracking in a GitHub issue. |
…r.cc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
eaaade6 to
1f3aa94
Compare
vthaniel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the EP Context scenarios on the perf_test app available on ovep-develop
and no issues were found
#776) * Fix failing case where input onnx model is used with shared context enabled * Update onnxruntime/core/providers/openvino/openvino_execution_provider.cc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: MayureshV1 <47039074+MayureshV1@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
#776) * Fix failing case where input onnx model is used with shared context enabled * Update onnxruntime/core/providers/openvino/openvino_execution_provider.cc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: MayureshV1 <47039074+MayureshV1@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix for https://hsdes.intel.com/appstore/article-one/#/article/22021483243 that happened when an onnx source model is compiled with shared context enabled without saving model to ep context.