-
Notifications
You must be signed in to change notification settings - Fork 72
[Pass] Fix bugs in LiftConstantsToInitializersPass #2189
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
[Pass] Fix bugs in LiftConstantsToInitializersPass #2189
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2189 +/- ##
==========================================
+ Coverage 74.22% 74.26% +0.03%
==========================================
Files 224 224
Lines 29381 29402 +21
Branches 3415 3418 +3
==========================================
+ Hits 21808 21834 +26
+ Misses 6418 6416 -2
+ Partials 1155 1152 -3 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Co-authored-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.
Thank you!
Fix #2184
(1) Fix the corner case when the constant is the graph output, we don't lift it.
(2) Add an option to the pass controlling lifting all constants to initializers, or only "value". (following ort pass: https://github.com/microsoft/onnxruntime/blob/d7c688e15c1dc40f57140bff08c78e01a88b19fc/onnxruntime/python/tools/transformers/onnx_model.py#L525). Default to False, where we only lift "value".