Skip to content

[Hardware][Power] Unqualized MoE Backend for Power (VSX) - #51624

Merged
bigPYJ1151 merged 25 commits into
vllm-project:mainfrom
Akashcodes732:feat/unquant_moe_power
Aug 13, 2026
Merged

bigPYJ1151 merged 25 commits into
vllm-project:mainfrom
Akashcodes732:feat/unquant_moe_power

Conversation

@Akashcodes732

@Akashcodes732 Akashcodes732 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This PR adds PowerPC specific unquantized backend support for fused MoE using Power10 VSX MMA instructions.

Purpose

Currently, grouped GEMM is not supported for Power architecture in vLLM. This PR introduces a Power/VSX specific unquantized CPU backend for Fused MoE.
Key features include:

  • Addition of csrc/cpu/micro_gemm/cpu_micro_gemm_vsx.hpp to support grouped GEMM on Power architectures.
  • Use of Power10 MMA instructions for optimized BF16 matrix multiplication.

Test Plan

  • Verified mathematical correctness across all unaligned and aligned MoE kernel test cases using:
    pytest tests/kernels/moe/test_cpu_fused_moe.py -v
  • Performance benchmarking using vllm bench with google/gemma-4-26B-A4B-it to compare against the main branch.

Test Result

The unquantized Power10 MMA implementation yields massive speedups in the prefill phase (TTFT), and provides strong throughput gains at higher batch sizes compared to the main branch.

Concurrency TTFT Mean (Prefill) vs Main Total Tok/s (Throughput) vs Main TPOT Mean (Decode) vs Main
C=1 35.5% faster 1.1% faster same as main
C=4 35.6% faster same as main same as main
C=8 37.0% faster same as main same as main
C=64 35.4% faster 15.7% faster 9.9% faster
C=128 35.1% faster 13.9% faster 10.2% faster

Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Akash kaothalkar and others added 22 commits August 3, 2026 16:33
Co-authored-by: Antigravity <antigravity@google.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Co-authored-by: Antigravity <antigravity@google.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Co-authored-by: Antigravity <antigravity@google.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
…ar loads

Use explicit unrolled constexpr branches for scalar vector initialization
to eliminate zero-padding memory overhead during decode (M=1) while
maintaining maximum L1 pipeline utilization during prefill (M=8).

Co-authored-by: Antigravity <antigravity@google.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
When actual_token_num == 1 (Decode phase) and PackA == false, the
input row is already contiguous. Bypass the unnecessary INT8Vec64
gather phase and pass the global input pointer directly to the
GEMM kernel to eliminate 28KB of RAM-to-RAM copying per token.

Co-authored-by: Antigravity <antigravity@google.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
…erge tree in favor of scalar loads

Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
…mbly loops to fully restore main TPOT performance

Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
…ain TPOT

Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
…on Power10

Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
…and fix Gemma 4 26B crash

Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
The unrolled M>=4 loop incorrectly used 16-bit vec_merge instructions which scrambled the A matrix rows and columns before feeding them to xvbf16ger2pp, causing math errors for K>=8. This fixes it to use 32-bit and 64-bit merges to construct the correct 4x4 transposed layout for the A registers.

Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the cpu Related to CPU backends label Aug 10, 2026
Signed-off-by: Akash kaothalkar <akash.kaothalkar@ibm.com>
@Akashcodes732

Copy link
Copy Markdown
Contributor Author

Hi @bigPYJ1151, can you please take a look at the changes made in this PR ?

Comment thread vllm/model_executor/layers/fused_moe/experts/cpu_moe.py
Akash kaothalkar added 2 commits August 11, 2026 12:58
@bigPYJ1151

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83342 for commit 8298754ac9bd.

@Akashcodes732

Copy link
Copy Markdown
Contributor Author

Hi @bigPYJ1151 , all the checks have passed, can we go ahead with the merge ?

@bigPYJ1151
bigPYJ1151 merged commit 61826c1 into vllm-project:main Aug 13, 2026
119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpu Related to CPU backends

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants