onnxruntime
af4b232f - [EP ABI] Signatures for compatibility info methods (#25454)

Commit
181 days ago
[EP ABI] Signatures for compatibility info methods (#25454) ### Description <!-- Describe your changes. --> This PR proposes two new ABI methods to better support precompiled models. We introduce the concept of a compatibility information string, which is a piece of data produced by an EP implementor to describe the stack that may have been used to compile a model. The `GetCompiledModelCompatibilityInfo` function on the `OrtEp` interface creates this string. ORT will get the compatibility information string when precompiling a model and will store the output in the model's metadata. When creating sessions against any precompiled models, ORT will use the `ValidateCompiledModelCompatibilityInfo` function to confirm that the model is still EP-compatible. The EP implementor decides how compatibility is defined for their stack and communicates this via the possible states in the `OrtCompiledModelCompatibility` enum. The validation API is stored on the `OrtEpFactory` to allow for cases where a model may not be present on the device yet (e.g., perhaps an application is trying to decide on a pre-compiled model to download based on the state of the system). ### Motivation and Context The APIs proposed in this PR address two requirements: 1. Apps that have an already pre-compiled model on device need a way to determine if the pre-compiled app is still valid (given the EPs / drivers / etc. on the system). 2. Apps may have many different pre-compiled versions of a model stored on a remote server, and want to figure out which of those models they should download for the device where they are running. Co-authored-by: Aditya Rastogi <adityar@ntdev.microsoft.com>
Author
Parents
Loading