-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[VitisAI] Add support compiled model compatibility information retrieval and validation #26699
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
base: main
Are you sure you want to change the base?
[VitisAI] Add support compiled model compatibility information retrieval and validation #26699
Conversation
1a92998 to
5d64d88
Compare
|
@adrianlizarraga @yuslepukhin please help reivew the PR , Thanks |
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 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.
onnxruntime/core/providers/vitisai/vitisai_execution_provider.cc
Outdated
Show resolved
Hide resolved
|
/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 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.
…onst char* update
9213885 to
7f8ff48
Compare
|
Just rebase main branch and resolve the copilot reviews. |
yuslepukhin
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.
![]()
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:
GetCompiledModelCompatibilityInfoto collect and serialize compatibility metadata during model compilationValidateCompiledModelCompatibilityInfoto validate compatibility at runtime against the current environmentMotivation 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: