-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Revert "[Kernel] Integrate CUTLASS MoE kernel with PPLX (#18762)" #19512
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
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
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.
Summary of Changes
Hello @bnellnm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request reverts a previous change that integrated a specific CUTLASS Mixture-of-Experts (MoE) kernel with PPLX. The changes involve removing PPLX-specific code paths, simplifying the interface of the core CUTLASS MoE kernel, and adjusting how data like strides are handled. It also removes related logic and parameters from various fused MoE layer implementations and tests. Curiously, it also adds new testing infrastructure specifically for PPLX.
Highlights
- Revert PPLX Integration: This PR primarily reverts the integration of a specific CUTLASS MoE kernel with PPLX, removing PPLX-specific data generation functions and kernels from the codebase.
- CUTLASS MoE Kernel Interface Changes: The
cutlass_moe_mm
C++ function and its Python binding (_custom_ops.cutlass_moe_mm
) have been simplified by removing theper_act_token
andper_out_ch
boolean parameters. This logic is now derived internally within the kernel implementation based on scale tensor shapes. - Explicit Stride Handling: The CUTLASS MoE kernel (
run_cutlass_moe_fp8
) and its Python wrapper (cutlass_moe_fp8
) now explicitly accept stride tensors (ab_strides1
,c_strides1
,ab_strides2
,c_strides2
) as parameters, rather than calculating them internally or relying on implicit batching logic. - Removal of Batched Format Logic: PPLX integration introduced a 'batched format' for handling MoE data. This PR removes the conditional logic related to this batched format from the CUTLASS MoE kernel implementation (
run_cutlass_moe_fp8
,CutlassExpertsFp8
) and related tests/benchmarks, standardizing on the non-batched approach. - Quantization Parameter Simplification: The
workspace_shapes
method in several fused MoE layer implementations (DeepGemm, Triton, Batched variants) has been simplified by removing theaq
(quantized input) parameter, suggesting a change in how workspace requirements are determined. - PPLX Testing Infrastructure Added (Unexpected): Despite being a revert of PPLX integration, this PR adds new parallel launch helper functions (
_worker_parallel_launch
,parallel_launch
,parallel_launch_from_env
) and arequires_pplx
pytest marker intests/kernels/moe/test_pplx_moe.py
. This seems contradictory to the revert's stated purpose.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configureGemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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 pull request reverts commit 84166fe, which integrated a CUTLASS MoE kernel with PPLX. The changes primarily involve removing PPLX-specific code, adjusting function signatures in both C++/CUDA and Python for MoE kernels, and updating data preparation in benchmarks and tests to align with the reverted interfaces.
Overall, the revert appears to be implemented correctly across the affected files. I've pointed out a minor typo in cutlass_moe.py
and a new activation constraint for one of the MoE methods that might warrant confirmation. Additionally, a type change for topk_ids
in CUDA kernels was noted, which seems acceptable.
elif (quant_config._is_fp8_w8a8_sm90(weight_quant, input_quant) | ||
and layer.activation == "silu"): |
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.
The condition for using CompressedTensorsW8A8Fp8MoECutlassMethod
now includes layer.activation == "silu"
. This implies that the reverted CUTLASS MoE kernel might only support SiLU activation for this quantization method. Could you confirm if this is the intended behavior or if support for other activations with this method was inadvertently removed/restricted by the revert?
Signed-off-by: Bill Nell <bnell@redhat.com>
Signed-off-by: Bill Nell <bnell@redhat.com>
thanks! it's no longer needed as regression is fixed post #19168. |
This reverts commit 84166fe. This commit was causing per regressions in
meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
I couldn't repro the slowdown on main but I'll leave this PR up just in case.
cc @ElizaWszola
Testing done:
SAFETENSORS_FAST_GPU=1 python3 benchmarks/benchmark_latency.py --model meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8 --tensor-parallel-size 8 --trust-remote-code
before and after.meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8
Benchmark results as of
42f52cc95
Benchmark results for this PR
lm-eval results this PR