Skip to content

Add reference examples and guidance (especially for multi-device scenarios) for ValidateCompiledModelCompatibilityInfo #29168

Open
adrastogi wants to merge 4 commits into
mainfrom
adrastogi/improve-compat-guidance
Open

Add reference examples and guidance (especially for multi-device scenarios) for ValidateCompiledModelCompatibilityInfo #29168
adrastogi wants to merge 4 commits into
mainfrom
adrastogi/improve-compat-guidance

Conversation

@adrastogi

Copy link
Copy Markdown
Contributor

Description

ValidateCompiledModelCompatibilityInfo is underspecified in that it does not provide enough guidance for EP implementors on how to handle multi-device cases. This change attempts to fill that gap by defining the intended prioritization of the various compatibility states. It also updates the reference implementation in the test plugin EP.

Motivation and Context

This change is being made in response to customer feedback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 clarifies the intended semantics of OrtEpFactory::ValidateCompiledModelCompatibilityInfo—especially for multi-device EP scenarios—by documenting the required “per-device verdict then worst-of fold” behavior, and updates the example plugin EP + tests to match that guidance.

Changes:

  • Expanded ValidateCompiledModelCompatibilityInfo documentation to define multi-device interpretation and required verdict folding rules (with guidance for “no opinion” vs “bad artifact” cases).
  • Updated the example plugin EP’s compatibility validation to compute per-device compatibility and combine results using the documented reduction.
  • Added end-to-end and unit tests covering single-device, “no opinion”, and multi-device folding behavior.
Show a summary per file
File Description
onnxruntime/test/autoep/test_model_package.cc Adds tests that exercise the public compatibility API against the example plugin EP, including multi-device folding behavior.
onnxruntime/test/autoep/library/example_plugin_ep/ep_factory.cc Refactors the example EP factory’s compatibility validation to evaluate per-device and combine verdicts per the documented rules.
onnxruntime/test/autoep/library/example_plugin_ep/compatibility_combine.h Introduces a shared helper to combine per-device compatibility verdicts using the documented identity + worst-of rule.
include/onnxruntime/core/session/onnxruntime_ep_c_api.h Adds detailed guidance and a normative algorithm for multi-device compatibility validation and result combination.

Copilot's findings

  • Files reviewed: 4/4 changed files
  • Comments generated: 3

Comment thread onnxruntime/test/autoep/library/example_plugin_ep/ep_factory.cc
Comment thread onnxruntime/test/autoep/library/example_plugin_ep/ep_factory.cc Outdated
Comment thread onnxruntime/test/autoep/library/example_plugin_ep/ep_factory.cc Outdated
adrastogi and others added 3 commits June 19, 2026 16:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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