-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Clarify that variable shadowing is not allowed #6955
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
Signed-off-by: Justin Chu <[email protected]>
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 updates the ONNX specification documentation to clarify that variable shadowing is not allowed in nested subgraphs.
- Clarifies that node output names, along with subgraph inputs and initializers, must be unique relative to names in outer scopes.
- Improves the documentation of single static assignment in nested subgraphs.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #6955 +/- ##
=======================================
Coverage 56.49% 56.49%
=======================================
Files 509 509
Lines 32724 32724
Branches 3097 3097
=======================================
Hits 18487 18487
Misses 13379 13379
Partials 858 858 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Justin Chu <[email protected]>
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 clarifies that variable shadowing is disallowed in nested subgraphs per the ONNX specification.
- Explicitly updates the documentation to state that node outputs, inputs, and initializers in nested subgraphs must not conflict with names in outer scopes.
- Addresses issue #2303.
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.
Thanks! But the checker still doesn't check for this, right? Should we do that as a separate PR or in this?
|
Sure! #6980 |
Clarify the ONNX spec and asserts that variable shadowing is not allowed in nested subgraphs. Fixes onnx#2303 --------- Signed-off-by: Justin Chu <[email protected]> Co-authored-by: Copilot <[email protected]>
Clarify the ONNX spec and asserts that variable shadowing is not allowed in nested subgraphs. Fixes #2303