AWS details fused MoE kernel optimizations upstreamed to vLLM
An AWS Machine Learning Blog post describes several kernel optimizations AWS implemented for fused Mixture-of-Experts models running on GPUs. It says a swap-AB matrix transposition aligned with NVIDIA Hopper's WGMMA instruction layout produced a 2–4 percent end-to-end throughput improvement for large MoE models on H200, and was upstreamed to vLLM 0.24.0 or later. A second change added do_not_specialize annotations to eliminate repeated Triton JIT recompilation, which AWS says improved time to first token by 9 percent at 8-way tensor parallelism and is available in vLLM 0.22.0 or later. AWS says the optimizations are open sourced, applied in the LMI deep learning container on Amazon SageMaker AI, and together delivered up to 10 percent higher throughput and up to 9 percent faster TTFT; these figures are vendor-reported and not independently verified.
AWS notes that MoE operations account for a large share of total compute time, so inefficiencies there directly raise request latency and cost — which is why it calls kernel engineering the largest opportunity for performance gains.
Mixture-of-Experts (MoE) is a sparsely-activated architecture that scales large language model (LLM) capacity while keeping per-token compute low. Because its operations account for a large share of total compute time, inefficiencies there directly raise request latency and cost. Therefore, optimizing MoE operations through kernel engineering offers the largest opportunity for performance gains.
Fused MoE is a key optimization technique for the MoE architecture. A fused MoE system merges token routing, data shuffling, and specialized network calculations into a single batched operation on the GPU. This replaces executing those routing and expert computations as separate, sequential loop operations. While this provides latency advantages, it also brings complexity in kernel implementations and debugging capability. High GPU utilization for this architecture requires hardware-specific optimizations.
In this post, we describe the different kernel optimizations we implemented for fused MoE models and show you how you can benefit from this work. We used a representative MoE model as our primary example.
Swap-AB for WGMMA utilization
To maximize tensor processing throughput, the NVIDIA Hopper architecture relies on the Warp Group Matrix Multiply Accumulate (WGMMA) instruction protocol, which executes collectively across a cooperative warpgroup of 128 threads. This operand asymmetry is fundamentally an instruction set architecture (ISA)-level property. In the underlying wgmma.mma_async assembly definition, the hardware fixes the matrix row dimension (M) at a constant scale of 64 to define its parallel thread-mapping topology. The column dimension (N) remains highly variable. Operand A strictly maps across this fixed M dimension (using registers or shared memory), and Operand B maps across the variable N dimension (through a shared memory descriptor). These operand slots are therefore structurally non-interchangeable. Consequently, peak hardware tile utilization is governed by these rigid shape encodings, requiring that the M dimension equals or exceeds 64 to prevent compute execution lanes from sitting idle.
#AWS#Amazon SageMaker AI#vLLM#NVIDIA#Hopper#Triton#AWS LMI deep learning container