-
Notifications
You must be signed in to change notification settings - Fork 812
Handle constants without placeholder nodes in convert_constant_dim_order_pass #16841
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16841
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 07846a8 with merge base 61ae2f6 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@GregoryComer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91334285. |
…der_pass (pytorch#16841) Summary: After recent changes to convert_constant_dim_order_pass, there are a few lowering breakages when constant nodes don't have associated placeholders. I didn't realize this could happen, but apparently it does. So just skip placeholder meta updates in this case. Differential Revision: D91334285
cebf3ad to
07846a8
Compare
Gasoonjia
left a comment
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 for update!
My major concern is whether or not that's the target behavior we want to have. In convert_constant_dim_order_pass we make const in contiguous first, then update the placeholder metadata. If in the _update_placeholder_meta we skip the update, will it introduce metadata-mismatch and lead to more issue?
| ) | ||
| if input_spec is None: | ||
| raise RuntimeError(f"Missing input spec for lifted tensor {target}.") | ||
| logger.warning(f"Missing input spec for constant {target}") |
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.
Do you know when the export program may not have input_spec? Doesn't every program have that?
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.
I can track down a better repro. This showed up with an internal CV model. My guess is that there is some pass that is modifying the constant and it hasn't been fully re-lifted at this point. I'll see if I can find an exact case. There are several broken internal tests for export currently.
Summary: After recent changes to convert_constant_dim_order_pass, there are a few lowering breakages when constant nodes don't have associated placeholders. I didn't realize this could happen, but apparently it does. So just skip placeholder meta updates in this case.
Differential Revision: D91334285