-
Notifications
You must be signed in to change notification settings - Fork 72
[IR] Handle external initializers in subgraphs #2347
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
Conversation
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 enhances handling of external initializers by traversing subgraphs, enforces unique initializer names, and adjusts test formatting.
- Iterate through all subgraphs in both
load_to_model
andunload_from_model
to process initializers. - Introduce a validation step to ensure initializer names are unique across the entire model.
- Remove a stray blank line in the test file before the
if __name__ == "__main__"
guard.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
onnxscript/ir/external_data.py | Updated loops to include subgraphs, added name uniqueness checks, updated docstrings |
onnxscript/ir/external_data_test.py | Removed extra blank line before the top-level test runner guard |
Comments suppressed due to low confidence (1)
onnxscript/ir/external_data_test.py:500
- [nitpick] Add an extra blank line before the top-level
if __name__ == "__main__"
guard to comply with PEP8 style conventions.
if __name__ == "__main__":
❌ 23 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
I merged prematurely. Will add test cases. |
Support converting external initializers in subgraphs.