Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@justinchuby
Copy link
Member

Clarify the ONNX spec and asserts that variable shadowing is not allowed in nested subgraphs. Fixes #2303

@justinchuby justinchuby requested review from Copilot and gramalingam May 8, 2025 21:44
@justinchuby justinchuby requested a review from a team as a code owner May 8, 2025 21:44
@justinchuby justinchuby added module: spec topic: spec clarification Clarification of the ONNX spec needed labels May 8, 2025
@github-project-automation github-project-automation bot moved this to In progress in PR Tracker May 8, 2025
Copy link
Contributor

Copilot AI left a 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
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.49%. Comparing base (e446340) to head (99f006b).

✅ 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.
📢 Have feedback on the report? Share it here.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
@justinchuby justinchuby requested a review from Copilot May 8, 2025 21:58
Copy link
Contributor

Copilot AI left a 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.

@justinchuby
Copy link
Member Author

@gramalingam

Copy link
Contributor

@gramalingam gramalingam left a 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?

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in PR Tracker May 19, 2025
@justinchuby
Copy link
Member Author

justinchuby commented May 19, 2025

Sure! #6980

@justinchuby justinchuby added this pull request to the merge queue May 19, 2025
Merged via the queue into main with commit 802714b May 19, 2025
39 checks passed
@justinchuby justinchuby deleted the justinchu/shadowing branch May 19, 2025 18:21
@github-project-automation github-project-automation bot moved this from Reviewer approved to Done in PR Tracker May 19, 2025
geckosecurity pushed a commit to geckosecurity/onnx that referenced this pull request May 29, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: spec topic: spec clarification Clarification of the ONNX spec needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Do subgraph initializer names and input names shadow outer-scope names?

3 participants