Skip to content

[VitisAI] Add support compiled model compatibility information retrieval and validation - #26699

Merged
yuslepukhin merged 4 commits into
microsoft:mainfrom
mingyueliuh:feature/vitisai-compiled-model-compatibility
Dec 10, 2025
Merged

[VitisAI] Add support compiled model compatibility information retrieval and validation#26699
yuslepukhin merged 4 commits into
microsoft:mainfrom
mingyueliuh:feature/vitisai-compiled-model-compatibility

Conversation

@mingyueliuh

@mingyueliuh mingyueliuh commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

Description

Adds support for compiled model compatibility information retrieval and validation in the VitisAI EP. This enables runtime validation of compiled models against the execution environment to prevent failures and provide clear compatibility feedback.

Key Changes:

  • Implemented GetCompiledModelCompatibilityInfo to collect and serialize compatibility metadata during model compilation
  • Added ValidateCompiledModelCompatibilityInfo to validate compatibility at runtime against the current environment

Motivation and Context

Compiled models may fail at runtime due to missing backend plugins, version mismatches, or hardware platform differences.
The ONNXRuntime add 2 API for support compiled model compatibility validation system . Ref PRs:
#25841
#25749

This PR implements a compatibility validation system for Vitis AI EP that:

  • Detects incompatibilities before model loading to prevent runtime failures
  • Enables cross-version compatibility checking between different EP versions
  • Provides clear feedback through specific compatibility status codes
  • Maintains backward compatibility with legacy EPs

@mingyueliuh
mingyueliuh force-pushed the feature/vitisai-compiled-model-compatibility branch from 1a92998 to 5d64d88 Compare December 3, 2025 06:05
@mingyueliuh

Copy link
Copy Markdown
Contributor Author

@adrianlizarraga @yuslepukhin please help reivew the PR , Thanks

Comment thread onnxruntime/core/providers/vitisai/imp/global_api.cc Outdated
Comment thread onnxruntime/core/providers/vitisai/imp/global_api.cc

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 adds compiled model compatibility validation support to the VitisAI Execution Provider, implementing two key APIs: GetCompiledModelCompatibilityInfo to collect compatibility metadata during compilation, and ValidateCompiledModelCompatibilityInfo to validate compatibility at runtime. This enhancement enables early detection of incompatibilities (e.g., missing plugins, version mismatches, hardware differences) before model loading to prevent runtime failures.

Key Changes:

  • Implemented compatibility info retrieval and validation methods in VitisAI EP
  • Added global API functions that delegate to the underlying VitisAI library
  • Maintained backward compatibility by treating these features as optional (functions may not be present in older libraries)

Reviewed changes

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

File Description
onnxruntime/core/providers/vitisai/vitisai_execution_provider.h Added public method declarations for compatibility info retrieval and validation
onnxruntime/core/providers/vitisai/vitisai_execution_provider.cc Implemented wrapper methods that delegate to global API functions with null checks
onnxruntime/core/providers/vitisai/include/vaip/global_api.h Added function declarations for compatibility operations in the global API
onnxruntime/core/providers/vitisai/imp/global_api.cc Implemented global API functions, added symbol loading for new library functions, and provided fallback behavior when functions are unavailable

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread onnxruntime/core/providers/vitisai/imp/global_api.cc
Comment thread onnxruntime/core/providers/vitisai/vitisai_execution_provider.cc Outdated
Comment thread onnxruntime/core/providers/vitisai/include/vaip/global_api.h Outdated
@yuslepukhin

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI, Windows ARM64 QNN CI Pipeline, Windows GPU CUDA CI Pipeline, Windows GPU DML CI Pipeline, Windows GPU Doc Gen CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows OpenVINO CI Pipeline, Windows x64 QNN CI Pipeline,

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

…ompatibility information retrieval and validation

- Implemented GetCompiledModelCompatibilityInfo to collect compatibility info from execution providers.
- Added ValidateCompiledModelCompatibilityInfo to validate compatibility info against the runtime environment.
- Updated global API to include new functions for compatibility info handling.

Refactor Vitis AI EP API: Update compatibility info functions to return status codes

- Changed return types of get_compiled_model_compatibility_info and validate_compiled_model_compatibility_info to int for better error handling.
- Updated function calls to check status codes before processing compatibility information.
- Adjusted parameters in validate_compiled_model_compatibility_info to accommodate device information handling.
@mingyueliuh
mingyueliuh force-pushed the feature/vitisai-compiled-model-compatibility branch from 9213885 to 7f8ff48 Compare December 9, 2025 03:30
@mingyueliuh

mingyueliuh commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

Just rebase main branch and resolve the copilot reviews.

@yuslepukhin yuslepukhin 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.

:shipit:

@yuslepukhin
yuslepukhin enabled auto-merge (squash) December 9, 2025 18:41
@yuslepukhin

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline, Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@yuslepukhin
yuslepukhin merged commit b6d914b into microsoft:main Dec 10, 2025
89 checks passed
@mingyueliuh
mingyueliuh deleted the feature/vitisai-compiled-model-compatibility branch December 10, 2025 01:56
Kevin-Taha pushed a commit that referenced this pull request Dec 11, 2025
…val and validation (#26699)

### Description

Adds support for compiled model compatibility information retrieval and
validation in the VitisAI EP. This enables runtime validation of
compiled models against the execution environment to prevent failures
and provide clear compatibility feedback.

**Key Changes:**
- Implemented `GetCompiledModelCompatibilityInfo` to collect and
serialize compatibility metadata during model compilation
- Added `ValidateCompiledModelCompatibilityInfo` to validate
compatibility at runtime against the current environment

### Motivation and Context
Compiled models may fail at runtime due to missing backend plugins,
version mismatches, or hardware platform differences.
The ONNXRuntime add 2 API for support compiled model compatibility
validation system . Ref PRs:
    #25841
    #25749
    

This PR implements a compatibility validation system for Vitis AI EP
that:

- Detects incompatibilities before model loading to prevent runtime
failures
- Enables cross-version compatibility checking between different EP
versions
- Provides clear feedback through specific compatibility status codes
- Maintains backward compatibility with legacy EPs
Sumit2318 pushed a commit that referenced this pull request Jan 6, 2026
…val and validation (#26699)

### Description

Adds support for compiled model compatibility information retrieval and
validation in the VitisAI EP. This enables runtime validation of
compiled models against the execution environment to prevent failures
and provide clear compatibility feedback.

**Key Changes:**
- Implemented `GetCompiledModelCompatibilityInfo` to collect and
serialize compatibility metadata during model compilation
- Added `ValidateCompiledModelCompatibilityInfo` to validate
compatibility at runtime against the current environment

### Motivation and Context
Compiled models may fail at runtime due to missing backend plugins,
version mismatches, or hardware platform differences.
The ONNXRuntime add 2 API for support compiled model compatibility
validation system . Ref PRs:
    #25841
    #25749
    

This PR implements a compatibility validation system for Vitis AI EP
that:

- Detects incompatibilities before model loading to prevent runtime
failures
- Enables cross-version compatibility checking between different EP
versions
- Provides clear feedback through specific compatibility status codes
- Maintains backward compatibility with legacy EPs
adrastogi pushed a commit that referenced this pull request Mar 17, 2026
…val and validation (#26699)

### Description

Adds support for compiled model compatibility information retrieval and
validation in the VitisAI EP. This enables runtime validation of
compiled models against the execution environment to prevent failures
and provide clear compatibility feedback.

**Key Changes:**
- Implemented `GetCompiledModelCompatibilityInfo` to collect and
serialize compatibility metadata during model compilation
- Added `ValidateCompiledModelCompatibilityInfo` to validate
compatibility at runtime against the current environment

### Motivation and Context
Compiled models may fail at runtime due to missing backend plugins,
version mismatches, or hardware platform differences.
The ONNXRuntime add 2 API for support compiled model compatibility
validation system . Ref PRs:
    #25841
    #25749
    

This PR implements a compatibility validation system for Vitis AI EP
that:

- Detects incompatibilities before model loading to prevent runtime
failures
- Enables cross-version compatibility checking between different EP
versions
- Provides clear feedback through specific compatibility status codes
- Maintains backward compatibility with legacy EPs
adrastogi pushed a commit that referenced this pull request Mar 19, 2026
…val and validation (#26699)

### Description

Adds support for compiled model compatibility information retrieval and
validation in the VitisAI EP. This enables runtime validation of
compiled models against the execution environment to prevent failures
and provide clear compatibility feedback.

**Key Changes:**
- Implemented `GetCompiledModelCompatibilityInfo` to collect and
serialize compatibility metadata during model compilation
- Added `ValidateCompiledModelCompatibilityInfo` to validate
compatibility at runtime against the current environment

### Motivation and Context
Compiled models may fail at runtime due to missing backend plugins,
version mismatches, or hardware platform differences.
The ONNXRuntime add 2 API for support compiled model compatibility
validation system . Ref PRs:
    #25841
    #25749
    

This PR implements a compatibility validation system for Vitis AI EP
that:

- Detects incompatibilities before model loading to prevent runtime
failures
- Enables cross-version compatibility checking between different EP
versions
- Provides clear feedback through specific compatibility status codes
- Maintains backward compatibility with legacy EPs
adrastogi added a commit that referenced this pull request Mar 31, 2026
This cherry-picks the following commits for the release:

- #26434 [VitisAI]add tensor type bool
- #26452 [VitisAI EP] Fix error in graph resolving
- #26487 [VitisAI] Enable ort::logger usage in
compile_onnx_model_vitisai_ep_v4
- #26519 [VitisAI] Remove unused function body handling in graph fusion
- #26627 [VitisAI] Add External EP Loader
- #26699 [VitisAI] Add support compiled model compatibility information
retrieval and validation
- #27295 Remove s_kernel_registry_vitisaiep.reset() in
deinitialize_vitisai_ep()
- #27356 Add/Update telemetry events
- #27626 Add PE version info to onnxruntime_providers_vitisai.dll
- #27693 Fix integer division by zero crash in CPU EP Div operator
- #27815 Fix overflow in DmlGraphFusionHelper::ProcessInputData
- #27823 Fix new-delete mismatch in DML EP's QuantizeLinear operator

---------

Co-authored-by: Yueqing Zhang <yuz75@Pitt.edu>
Co-authored-by: Yueqing Zhang <yueqingz@amd.com>
Co-authored-by: zpye <yezupei92@foxmail.com>
Co-authored-by: Chunye Wang@AMD <chunywan@amd.com>
Co-authored-by: mingyue <131847423+mingyueliuh@users.noreply.github.com>
Co-authored-by: zz002 <zhenzew@amd.com>
Co-authored-by: Darshak Bhatti <47045043+dabhattimsft@users.noreply.github.com>
Co-authored-by: Darshak Bhatti <dabhatti@micorsoft.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Xiaoxi Han <xiha@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Co-authored-by: skottmckay <979079+skottmckay@users.noreply.github.com>
Co-authored-by: Tianlei Wu <tlwu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants