-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[EP ABI] Get EP compiled model compatibility #25331
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
Changes from 1 commit
1667e6a
144cc1e
a963870
0beed66
66a547e
6e2b8e4
ed62236
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -560,6 +560,27 @@ struct OrtEp { | |||||||||||||
| OrtStatus*(ORT_API_CALL* GetCompiledModelCompatibility)(_In_ OrtEp* this_ptr, | ||||||||||||||
| _In_ const OrtGraph* graph, | ||||||||||||||
| _Out_ OrtCompiledModelCompatibility* model_compatibility); | ||||||||||||||
|
|
||||||||||||||
| /** \brief Generate a string with details about the EP stack used to produce a compiled model. | ||||||||||||||
| * | ||||||||||||||
| * This function generates a compatibility information string that contains details about the execution provider | ||||||||||||||
| * used to compile a given model. This string can later be used with ValidateCompiledModelCompatibilityInfo | ||||||||||||||
| * to determine if a compiled model is compatible with the EP. | ||||||||||||||
| * | ||||||||||||||
| * The returned string should be a null-terminated, UTF-8 encoded string. ORT will copy it. | ||||||||||||||
| * | ||||||||||||||
| * \param[in] this_ptr The OrtEp instance. | ||||||||||||||
| * \param[in] graph The OrtGraph instance for which to generate compatibility information. | ||||||||||||||
| * \param[in] model_metadata The OrtModelMetadata instance containing model metadata. | ||||||||||||||
| * \return the compatibility information string produced by the EP | ||||||||||||||
| * | ||||||||||||||
| * \snippet{doc} snippets.dox OrtStatus Return Value | ||||||||||||||
| * | ||||||||||||||
| * \since Version 1.23. | ||||||||||||||
| */ | ||||||||||||||
| const char*(ORT_API_CALL* GenerateCompiledModelCompatibilityInfoString)(_In_ OrtEp* this_ptr, | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @skottmckay I pushed a commit with some interface candidates based on my interpretation of the other comment thread- do these look reasonable to you? |
||||||||||||||
| _In_ const OrtGraph* graph, | ||||||||||||||
| _In_ const OrtModelMetadata* model_metadata); | ||||||||||||||
|
||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| /** \brief The function signature that ORT will call to create OrtEpFactory instances. | ||||||||||||||
|
|
@@ -710,6 +731,24 @@ struct OrtEpFactory { | |||||||||||||
| */ | ||||||||||||||
| const char*(ORT_API_CALL* GetVersion)(_In_ const OrtEpFactory* this_ptr); | ||||||||||||||
|
|
||||||||||||||
| /** \brief Validate the compatibility of a compiled model with the execution provider. | ||||||||||||||
| * | ||||||||||||||
| * This function validates if a model produced with the supplied compatibility info string is supported by the underlying EP. | ||||||||||||||
| * The EP should check if a compiled model is compatible with the EP and set the model_compatibility parameter accordingly. | ||||||||||||||
| * | ||||||||||||||
| * \param[in] this_ptr The OrtEpFactory instance. | ||||||||||||||
| * \param[in] compatibility_info The compatibility information string that will be used | ||||||||||||||
| * \param[out] model_compatibility Output parameter set to the OrtCompiledModelCompatibility enum value that | ||||||||||||||
|
Comment on lines
+736
to
+738
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| * describes the compatibility of the model with the EP. | ||||||||||||||
| * | ||||||||||||||
| * \snippet{doc} snippets.dox OrtStatus Return Value | ||||||||||||||
| * | ||||||||||||||
| * \since Version 1.23. | ||||||||||||||
| */ | ||||||||||||||
| OrtStatus*(ORT_API_CALL* ValidateCompiledModelCompatibilityInfoString)(_In_ OrtEpFactory* this_ptr, | ||||||||||||||
| _In_ const char* compatibility_info, | ||||||||||||||
| _Out_ OrtCompiledModelCompatibility* model_compatibility); | ||||||||||||||
|
|
||||||||||||||
| /** \brief Create an OrtAllocator for the given OrtMemoryInfo. | ||||||||||||||
| * | ||||||||||||||
| * This is used to create an allocator that an execution provider requires. The factory that creates the EP is | ||||||||||||||
|
|
||||||||||||||
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.