Weave: Routing-Adaptive Runtime Warp Scheduling for MoE Megakernels
Ziyu Huang, Yangjie Zhou, Chenhao Zhu, Hongzhe Yan, Tianwei Qiao, Sicheng He, Zihan Liu, Peng Yu, Shulai Zhang, Xingxun Tang, Xinhao Luo, Minyi Guo, Xiu Lin, Yinghao Yu, Guodong Yang, Liping Zhang, Shixuan Sun, Qingyun Chen, Jingwen Leng
Abstract
The Mixture-of-Experts (MoE) architecture is widely used in mainstream large language models. Under expert parallelism (EP), state-of-the-art systems fuse each MoE layer into a persistent megakernel for high performance. By the nature of EP, each GPU's communication and computation volumes vary with the routing result. However, prior work either fixes how GPU resources are divided between communication and computation at compile time (e.g., MegaMoE), or adapts to runtime dynamism only at coarse-grained SM granularity (e.g., mKernel), dedicating whole SMs to communication and leaving their Tensor Cores idle. At the finer warp granularity within each SM, static warp schedules can neither match routing-dependent loads nor prevent warps from idling while waiting for inputs or after finishing their assigned work. Therefore, we propose Weave, an MoE megakernel with three key designs. First, a spatial schedule allocates resources between communication and computation at both SM and warp granularities to match each GPU's load. Second, a temporal schedule switches warp roles as execution progresses, enlisting all warps at the start and end of a layer and selectively handing output scatter to idle communication warps. Third, a fused cost model jointly selects both schedules per GPU at launch from runtime routing statistics. Across all evaluated platforms, Weave outperforms the strongest baselines: under EP8 over DeepGEMM-MegaMoE, it speeds up the MoE layer by 1.30x geomean and up to 1.97x on SM103, and by 1.24x geomean and up to 1.72x on SM90; under EP16 on CDNA3, it beats the fastest official RCCL+AITER baseline by 1.44x geomean (up to 2.87x; 1.67x over vLLM).
Create a lesson
Related papers
Accelerating Mixture of Block Attention via Dynamic Routing, KV-Centric Execution and Runtime Pipelining
Shared title terminology · Yingqi Shi, Junru Lu, Yun Liu et al.
CCAMoE: Cache-Conditioned Adaptive Inference for Offloaded MoE
Shared title terminology · Xuan Zhang, Haisheng Tan, Han Tian et al.
Adaptive Warm-State Retention for Serverless Cold-Start Mitigation: Treating Keep-Alive Time as an Online Control Parameter
Shared title terminology · Sanjeet Raj Pandey, Axel Küpper
AceVLN: Asynchronous Cloud Edge Deployment of VLNs via Latent Scheduling and Compensation
Shared title terminology · Zihao Zheng, Hangyu Cao, Yulong Han et al.
Contexture: Runtime Context Eviction for High-Throughput Agent Serving
Shared title terminology · Colin Hong, Bryan Shan, Wei Siong Pang et al.
GDNShift: Live Migration and Joint State Scheduling for Gated DeltaNet Inference
Shared title terminology · Hanqing Yu, Jiaqi Yang, Si Wu et al.