[Inductor][Quant]Support qconv_pointwise.tensor and qconv2d_pointwise.binary_tensor#166608
[Inductor][Quant]Support qconv_pointwise.tensor and qconv2d_pointwise.binary_tensor#166608jiayisunx wants to merge 12 commits intogh/jiayisunx/87/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/166608
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 9c168c4 with merge base aa504d4 ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| "none", None, "none", [], "" | ||
| ): generate_pattern_with_output_quant( | ||
| get_qconv_pt2e_pattern(1), | ||
| get_qconv_pt2e_pattern(users=1), |
There was a problem hiding this comment.
Why don't we need to consider the tensor variant here?
There was a problem hiding this comment.
These fusions have migrated to torchao, so I will make more changes to this part directly in torchao.
There was a problem hiding this comment.
Then is this change needed? Does it work if we remove this change and depend on torchao's pass?
There was a problem hiding this comment.
This change is needed because _register_quantization_lowerings has not been migrated to torchao, and all changes to this file are to modify _register_quantization_lowerings to support fp8.
| "none", None, "none", [], "" | ||
| ): generate_pattern_with_output_quant( | ||
| get_qconv_pt2e_pattern(1), | ||
| get_qconv_pt2e_pattern(users=1), |
There was a problem hiding this comment.
If we always use the tensor variant now and get_qconv_pt2e_pattern returns the default variant here, will the fusion pass will work?
There was a problem hiding this comment.
For int8, the qconv pattern here is always the qconv_pointwise.default
| qw: "TensorBox", # qw | ||
| w_scale: "TensorBox", | ||
| w_zero_point: "TensorBox", | ||
| w_zero_point, |
There was a problem hiding this comment.
Is this change needed?
There was a problem hiding this comment.
Yes, in order to pass python type checking.
| packed_weight: TensorBox, | ||
| w_scale: TensorBox, | ||
| w_zp: TensorBox, | ||
| w_zp, |
| packed_weight: TensorBox, | ||
| w_scale: TensorBox, | ||
| w_zp: TensorBox, | ||
| w_zp, |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
….binary_tensor (pytorch#166608) Pull Request resolved: pytorch#166608 Approved by: https://github.com/Xia-Weiwen, https://github.com/mingfeima, https://github.com/jansel
….binary_tensor (#166608) Pull Request resolved: #166608 Approved by: https://github.com/Xia-Weiwen, https://github.com/mingfeima, https://github.com/jansel
….binary_tensor (pytorch#166608) Pull Request resolved: pytorch#166608 Approved by: https://github.com/Xia-Weiwen, https://github.com/mingfeima, https://github.com/jansel
….binary_tensor (pytorch#166608) Pull Request resolved: pytorch#166608 Approved by: https://github.com/Xia-Weiwen, https://github.com/mingfeima, https://github.com/jansel
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @mlazos