Skip to content

EPCtx changes for dynamic model with reshape_input provider option #720

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

Open
wants to merge 1 commit into
base: ovep-develop
Choose a base branch
from

Conversation

gupta-pallavi
Copy link

  1. Throw an ErrorMessage when user provide reshape_input with EPctx graph.
  2. Do not Create dynamic_backend for EPctx graph.
    onnxruntime_perf_test.exe -e openvino -m times -r 1 -v -i "device_type|NPU" -C "ep.context_file_path| " -I C:\work\PSO2_model_ctx.onnx

Description

Motivation and Context

Copilot

This comment was marked as outdated.

@gupta-pallavi gupta-pallavi requested a review from Copilot June 25, 2025 19:08
Copy link

@Copilot Copilot AI left a 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 PR updates the OpenVINO backend to handle EPContext graphs dynamically by preventing dynamic backend creation and ensuring unsupported options (reshape_input) trigger an error.

  • Adds a check to throw an error when the reshape_input option is provided for an EPContext graph.
  • Bypasses dynamic backend creation for EPContext graphs by adding an exclusive condition to the dynamic backend selection.
Comments suppressed due to low confidence (1)

onnxruntime/core/providers/openvino/backend_manager.cc:134

  • [nitpick] Consider standardizing the naming convention for EPContext. The diff uses both 'EPContext' and 'EPCtx' – please update for consistency.
        // Do not create dynamic backend for EPCtx graph

@gupta-pallavi gupta-pallavi force-pushed the pallavig/epctx_for_partial_shapes branch from 3ba43da to 2487432 Compare June 25, 2025 19:27
@gupta-pallavi gupta-pallavi force-pushed the pallavig/epctx_for_partial_shapes branch from 2487432 to ef4adf5 Compare June 27, 2025 19:28
1. Throw an ErrorMessage when user provide reshape_input with EPctx graph.
2. Do not Create dynamic_backend for EPctx graph.

Update onnxruntime/core/providers/openvino/backend_manager.cc

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gupta-pallavi gupta-pallavi force-pushed the pallavig/epctx_for_partial_shapes branch from ef4adf5 to fec6e49 Compare June 27, 2025 21:18
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.

2 participants