Skip to content

Report import failure error code #715

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 5 commits into
base: ovep-develop
Choose a base branch
from

Conversation

javier-intel
Copy link

@javier-intel javier-intel commented Jun 18, 2025

Description

Report invalid binary when context model can't be imported by OV

Motivation and Context

Correctly communicate to ORT core the failure to import EpCtx

https://jira.devtools.intel.com/browse/CVS-167480

@javier-intel javier-intel force-pushed the jemartin/import_failure_error_code branch from 7dbe8e9 to faf1a6e Compare June 18, 2025 08:29
@javier-intel javier-intel requested a review from MayureshV1 June 18, 2025 08:29
Copy link

@MayureshV1 MayureshV1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javier-intel .. DO we have a way to trigger compatibility failure and ensure exception triggered by elf loader and UMD is caught here?

@MayureshV1 MayureshV1 requested a review from Copilot June 18, 2025 17:38
Copilot

This comment was marked as outdated.

Copy link

@MayureshV1 MayureshV1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@MayureshV1 MayureshV1 requested a review from Copilot June 24, 2025 07:59
Copilot

This comment was marked as outdated.

@MayureshV1 MayureshV1 requested a review from Copilot June 24, 2025 17:32
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 introduces a structured exception type to surface import failures with specific error codes and adjusts OpenVINO provider components to catch and convert these exceptions into ORT statuses or trigger CPU fallback.

  • Added ovep_exception to parse OpenVINO errors and map them to common::Status.
  • Updated OVCore::ImportModel to throw ovep_exception on import failures.
  • Wrapped compilation and backend manager logic to catch ovep_exception and handle fallback or status conversion.

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.

File Description
onnxruntime/core/providers/openvino/ov_interface.cc Imported exceptions.h and replaced generic throw with ovep_exception in ImportModel
onnxruntime/core/providers/openvino/openvino_execution_provider.cc Added try/catch around Compile to convert ovep_exception into Status
onnxruntime/core/providers/openvino/exceptions.h New exception class ovep_exception for parsing error codes and mapping to ORT statuses
onnxruntime/core/providers/openvino/backend_manager.cc Switched to catching ovep_exception and refined NPU fallback handling

@javier-intel javier-intel force-pushed the jemartin/import_failure_error_code branch from c75e346 to 64bcdad Compare June 24, 2025 22:27
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