-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Fix Fused MoE LoRA Triton kernel bug #28450
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
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.
Code Review
This PR correctly fixes two bugs in the Fused MoE LoRA Triton kernel: one preventing a pointer overflow by specifying dtype=torch.uint64, and another fixing a TypeError by removing launch_pdl from the kernel's compile-time configuration. My review includes suggestions to move the launch_pdl parameter to the kernel launch call to ensure the intended performance optimizations from Programmatic Dependent Launch are not lost.
| "num_stages": num_stages, | ||
| "SPLIT_K": split_k, # Set split_k = 1 for expand calls | ||
| "USE_GDC": use_gdc, | ||
| "launch_pdl": use_gdc, # triton kernel metadata |
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.
Similar to the _fused_moe_lora_shrink function, removing launch_pdl from this configuration dictionary is the correct way to fix the TypeError. To complete the fix and ensure the Programmatic Dependent Launch (PDL) optimization is still active, please add launch_pdl=use_gdc to the _fused_moe_lora_kernel launch call at line 345.
c4eaac0 to
ea81e4b
Compare
Signed-off-by: chaojun-zhang <[email protected]>
ea81e4b to
6af984a
Compare
Signed-off-by: chaojun-zhang <[email protected]> Signed-off-by: xuebwang-amd <[email protected]>
Signed-off-by: chaojun-zhang <[email protected]>
Purpose
Test Plan
pytest -s -v tests/lora/test_fused_moe_lora_kernel.py
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.