-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[EP ABI] Utility to serialize OrtGraph to GraphProto #25292
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
Merged
adrianlizarraga
merged 38 commits into
main
from
adrianl/ep-abi-ort-graph-to-onnx-protobuf
Jul 9, 2025
Merged
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
61af6c8
OrtGraph: use pre-allocated buffers for array apis
adrianlizarraga f51a3a2
Merge branch 'main' into adrianl/ep-abi-revert-ort-array-of-pointers
adrianlizarraga d7265d3
Fix tests to use new Graph_GetInputs
adrianlizarraga 101265a
Remove OrtArrayOfConstObjects
adrianlizarraga 3184633
Try to fix c++ doc gen (broken in main too)
adrianlizarraga e155494
fix c api doc
adrianlizarraga 0759d62
More c doc gen fixes
adrianlizarraga 005ea7f
Fix c doc gen: qnn option mistaken as html tag
adrianlizarraga 3f51dd4
Refactor function that checks validity of the user-provided destinati…
adrianlizarraga 3fe0520
Merge main and fix conflicts
adrianlizarraga deeb7e1
Rename result to dst
adrianlizarraga 757e427
Commit example code that converts OrtGraph to GraphProto
adrianlizarraga b3f4473
Add value_infos to GraphProto
adrianlizarraga 4dc5d24
Merge main and fix conflicts
adrianlizarraga ff3c94c
Handle initializers
adrianlizarraga caca22c
Handle serializing attributes and subgraphs. Update Node_GetSubgraph …
adrianlizarraga 6378c78
Working with mnist, 3nested_subgraphs. Can use external data.
adrianlizarraga 08a1d95
Rename file to ort_graph_to_proto.h/cc
adrianlizarraga 28bf2df
Add static_cast
adrianlizarraga 64cabdc
Simplify
adrianlizarraga c4cbebe
Clarify OrtValueInfo tracking
adrianlizarraga 52340f7
Undo change to cmake file
adrianlizarraga 6c1929f
Merge branch 'main' into adrianl/ep-abi-ort-graph-to-onnx-protobuf
adrianlizarraga caa4366
Keep small initializers inline
adrianlizarraga 721d8f6
Change signature of function that handles weight data
adrianlizarraga 21ee863
Simplify more: remove class that collected and sorted value infos
adrianlizarraga b5c7942
Early out when collecting OrtValueInfos
adrianlizarraga 2a1da5e
Make unit tests compare the output of the serialized model to that of…
adrianlizarraga a4bb7de
Check that output files were actually generated
adrianlizarraga 35cfc92
Add API function: Graph_GetOperatorSets
adrianlizarraga 94611e3
Merge branch 'main' into adrianl/ep-abi-ort-graph-to-onnx-protobuf
adrianlizarraga 1d9bb12
Move header-only utility and add usage documentation
adrianlizarraga 6db79b9
Make example code easier to copy-and-paste by putting it inside /**/ …
adrianlizarraga 753ebd8
Fix typo in example code in documentation
adrianlizarraga fb5a7e4
Update include/onnxruntime/core/providers/utils/ort_graph_to_proto.h
adrianlizarraga c90f9d9
Change include guard name to appease optional linter
adrianlizarraga ce4dd96
Remove 'experimental'
adrianlizarraga 60766e1
Make attribute_names optional
adrianlizarraga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
718 changes: 718 additions & 0 deletions
718
include/onnxruntime/core/providers/utils/ort_graph_to_proto.h
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.