-
Notifications
You must be signed in to change notification settings - Fork 48
[355_wip] Let dynamo capture rms/silu_mul+f4gemm pattern #705
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: 355_wip
Are you sure you want to change the base?
Conversation
To enable mxfp4 fusion:
|
empty_fp4(32, 32), # weight_gemm | ||
empty_fp4(32, 1), # scale | ||
empty_fp4(32, 4), # weight_gemm | ||
empty_fp4(1, 1), # scale |
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 do we here empty the dummy tensor for all of arguments of this pattern? And what does the shape here mean?
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.
Just to produce FX GraphModule
: https://github.com/pytorch/pytorch/blob/main/torch/_inductor/pattern_matcher.py#L2115
We registered new pattern-matching logics for integrating

aiter::_fused_rms_mxfp4_quant_kernel
andaiter::act_mul_and_mxfp4_quant