-
Notifications
You must be signed in to change notification settings - Fork 13
Create a name fix pass to ensure unique names for all values and nodes #124
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
You should maintain a ir.Value to assigned name dictionary to ensure that a value is only assigned a name once. Alternatively maintain a set of seen values. |
Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
+ Coverage 76.03% 76.40% +0.36%
==========================================
Files 39 40 +1
Lines 4586 4717 +131
Branches 899 929 +30
==========================================
+ Hits 3487 3604 +117
- Misses 818 827 +9
- Partials 281 286 +5 ☔ View full report in Codecov by Sentry. |
…racking Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
I've updated the implementation to use a |
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.
lintrunner found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
This PR implements a
NameFixPass
insrc/onnx_ir/passes/common/naming.py
to ensure that all values and nodes in an ONNX IR model have unique names according to the specified policy:I create the
enter_graph
andexit_graph
callbacks on the RecursiveIterator to allow users to handle getting into and out of graph scopes.