Add OrtModel input support for Compile API#27332
Merged
Conversation
adrastogi
commented
Feb 12, 2026
skottmckay
reviewed
Feb 16, 2026
skottmckay
approved these changes
Feb 25, 2026
Contributor
|
Is the branch sync'd with the latest |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…n isn't explicitly guaranteed; perform more rigorous inference validation)
0fd3bed to
9c127c9
Compare
Contributor
Author
Thanks, that seems to have fixed it. Could you help me get this merged? Seems like I cannot do this directly (not sure if there was a policy change here). [edit] Oh, looks like a required task was cancelled. Trying to rerun now... |
adrastogi
added a commit
that referenced
this pull request
Apr 15, 2026
### Description This change adds a feature to the Compile API, allowing an in-memory OrtModel created via the Model Editor API to be compiled directly without first serializing to a file or buffer. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> The Model Editor API and Compile API are both public C APIs in the ONNX Runtime, but until now there was no way to pass a programmatically constructed model directly to compilation. This change attempts to closes that gap (see #26750) and ensures the new code path behaves identically to the established file and buffer paths. --------- Co-authored-by: Aditya Rastogi <adityar@ntdev.microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
adrastogi
added a commit
that referenced
this pull request
Apr 16, 2026
### Description This change adds a feature to the Compile API, allowing an in-memory OrtModel created via the Model Editor API to be compiled directly without first serializing to a file or buffer. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> The Model Editor API and Compile API are both public C APIs in the ONNX Runtime, but until now there was no way to pass a programmatically constructed model directly to compilation. This change attempts to closes that gap (see #26750) and ensures the new code path behaves identically to the established file and buffer paths. --------- Co-authored-by: Aditya Rastogi <adityar@ntdev.microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
adrastogi
added a commit
that referenced
this pull request
Apr 17, 2026
This cherry-picks the following commits for the release: - #27332 Add OrtModel input support for Compile API - #27815 Fix overflow in DmlGraphFusionHelper::ProcessInputData - #27823 Fix new-delete mismatch in DML EP's QuantizeLinear operator Also took an isolated change to `base_tester.cc` from [here](https://github.com/microsoft/onnxruntime/pull/27547/changes#diff-3550c7a1e5e9ae090180942b353ffba5f4652265efd7515d05242084fbcf0343) to avoid a unit test failure. --------- Co-authored-by: Aditya Rastogi <adityar@ntdev.microsoft.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change adds a feature to the Compile API, allowing an in-memory OrtModel created via the Model Editor API to be compiled directly without first serializing to a file or buffer.
Motivation and Context
The Model Editor API and Compile API are both public C APIs in the ONNX Runtime, but until now there was no way to pass a programmatically constructed model directly to compilation. This change attempts to closes that gap (see #26750) and ensures the new code path behaves identically to the established file and buffer paths.