-
Notifications
You must be signed in to change notification settings - Fork 322
Port metadata from the linear node onto the reference custom op for int4 #2860
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
Summary: Allow for numerical debugger in ExecuTorch use the from_node info for correlation Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2860
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit aa44ccb with merge base 8669213 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…om op for int4" Summary: Allow for numerical debugger in ExecuTorch use the from_node info for correlation Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
model, | ||
pattern, | ||
replacement, | ||
match_filters=rewrite_info.filter_fn, | ||
ignore_literals=rewrite_info.ignore_literals, | ||
) # type: ignore[arg-type] | ||
if rewrite_info.port_metadata_fn: |
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.
why is this not added to https://github.com/pytorch/ao/blob/main/torchao/quantization/pt2e/quantizer/port_metadata_pass.py?
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.
reference rewrite is an option pass. Or at least thats how I was using it in my debug. In reference rewrite the rules for porting metadata is not as generic, so you have to let each pattern dictate what they want to do
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.
OK, I'm also wondering if we should move reference representation rewrite and port metadata etc. outside of torchao, since it seems that it's not used by most of torchao users, would it make more sense for this to be in ET?
Yeah it could. Not opposed to it. I do think it is useful for debugging especially when doing lowbit quant. Even when doing say fp4 perhaps? But if this doesnt seem of interest in forseeable future than I am find moving it out |
we could add some logging and decide in a few months, my guess is we don't have people using these right now, at least the reference rewrite |
…e reference custom op for int4" Summary: Allow for numerical debugger in ExecuTorch use the from_node info for correlation Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…om op for int4" Summary: Allow for numerical debugger in ExecuTorch use the from_node info for correlation Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…e reference custom op for int4" Summary: Allow for numerical debugger in ExecuTorch use the from_node info for correlation Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
…om op for int4" Summary: Allow for numerical debugger in ExecuTorch use the from_node info for correlation Test Plan: CI Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Stack from ghstack (oldest at bottom):
Summary:
Allow for numerical debugger in ExecuTorch use the from_node info for
correlation
Test Plan:
CI
Reviewers:
Subscribers:
Tasks:
Tags: