8000 support scaled mm on inductor by shiyang-weng · Pull Request #153602 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

support scaled mm on inductor #153602

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

shiyang-weng
Copy link
Contributor
@shiyang-weng shiyang-weng commented May 15, 2025

Support scaled_mm on inductor
Fuse following pattern to scaled_mm

   #   + - - - - | - - - - - - | - - - - - +
   #   |    dq_per_tensor  dq_per_tensor   |
   #   |         |              |          |
   #   |    OPT(to_bf16)    OPT(to_bf16)   |
   #   |          \             |          |
   #   |                     permute       |
   #   |                     /             |
   #   |             addmm/mm              |
   #   |                |                  |
   #   |      OPT(quant_per_tensor)        |

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

Copy link
pytorch-bot bot commented May 15, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153602

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 0c87280 with merge base 4015166 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@shiyang-weng shiyang-weng marked this pull request as draft May 15, 2025 08:21
Copy link
Contributor

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@shiyang-weng shiyang-weng marked this pull request as ready for review May 16, 2025 07:14
@jerryzh168
Copy link
Contributor
jerryzh168 commented May 16, 2025

how does quantization pattern got produced for this?

we have moved the pt2e flow to torchao recently, would it be better for this to be added in torchao: https://github.com/pytorch/ao/tree/main/torchao/quantization/pt2e/inductor_passes?

@jerryzh168 jerryzh168 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label May 16, 2025
@Xia-Weiwen
Copy link
Collaborator

we have moved the pt2e flow to torchao recently, would it be better for this to be added in torchao: https://github.com/pytorch/ao/tree/main/torchao/quantization/pt2e/inductor_passes?

Yeah I agree. I probably need to move this to Torchao.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: inductor open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0