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 LengarXiv 2026

Imagine a high-end restaurant where the menu changes every few seconds based on what the customers order. This is the chaotic reality of Mixture-of-Experts (MoE) models, the architecture behind giants like DeepSeek and Qwen. In these models, only a few "experts" (specialized neural network layers) are activated for any given word or "token."

The problem? Because routing is dynamic, we never know which GPU will be slammed with work and which will be waiting for data. A new paper, "Weave: Routing-Adaptive Runtime Warp Scheduling for MoE Megakernels," introduces a clever way to manage this chaos by turning the GPU's internal "workers" into a flexible, multi-tasking workforce.

TL;DR

Weave is a runtime scheduler for MoE models that dynamically reassigns GPU "warps" (tiny groups of parallel threads) between communication and computation tasks based on real-time demand. By eliminating idle "bubbles" in the execution flow, it speeds up MoE layers by up to 2.87× over state-of-the-art baselines across NVIDIA and AMD hardware.

What Problem Does This Paper Address?

In large-scale MoE deployments, we use Expert Parallelism (EP), where different experts live on different GPUs. When a token needs a specific expert, it has to be "dispatched" to the correct GPU, processed, and then the result is "scattered" back.

Fig. 1. Execution of one MoE layer under EP.

Current systems use "megakernels"—massive, fused blocks of code—to handle this. But they have a major flaw: they are rigid. They decide how many workers (warps) focus on "talking" (communication) versus "crunching" (computation) at compile time.

Because token routing is unpredictable, this rigidity leads to bubbles: periods where computation warps sit idle waiting for data to arrive, or communication warps do nothing while the math is being done. The authors found that these bubbles can waste over 30% of a GPU's potential performance.

Methods

Weave introduces three key innovations to make the GPU more "elastic":

  1. Spatial Scheduling (The Warp Ratio): Instead of dedicating entire Streaming Multiprocessors (SMs) to communication—which leaves their powerful Tensor Cores idle—Weave splits warps within each SM. It chooses a specific ratio of "comm" warps to "compute" warps for each GPU at launch time to match that GPU's specific workload.
  2. Temporal Scheduling (Role Switching): Weave doesn't keep warps locked in one role. In the "head" phase, all warps help pull data from other GPUs to get the math started faster. In the "tail" phase, everyone chips in to reduce the final results.
  3. Fused Cost Model: To make these decisions, Weave uses a lightweight mathematical model that runs on the GPU itself. In just a few microseconds, it analyzes the routing statistics for the current batch and picks the optimal spatial and temporal plan.
Fig. 2. Load dynamism (top) and hardware-resource scheduling across spatial granularity and decision time (bottom).

Datasets

The researchers evaluated Weave using routing distributions from real-world datasets and model configurations:

  • Models: Qwen (2.4T to 397B), MiniMax-M3, and DeepSeek-V4.
  • Routing: Real traces from the ShareGPT dataset to simulate authentic user interactions.
  • Hardware: NVIDIA H100 (SM103), H800 (SM90), and AMD MI300X (CDNA3).

Key Insights and Ideas

  • Granularity is King: Scheduling at the SM level is too coarse; scheduling at the instruction level is too complex. The "warp" is the Goldilocks zone for MoE scheduling.
  • The Cost of Silence: Static schedules are particularly bad at the beginning and end of a layer. By enlisting "compute" warps to help with the initial data "pull," Weave slashes the "head bubble" significantly.
  • Hardware Sensitivity: The "bottleneck" shifts depending on the chip. On the NVIDIA H100, the system is often bound by NVLink bandwidth, while on the H800, it's more about raw math throughput. Weave’s cost model adapts to these hardware-specific quirks automatically.
The "bubbles" (idle time) in traditional static scheduling (MegaMoE) across different sequence lengths.

Key Results

Weave consistently outperformed the strongest existing baselines:

  • NVIDIA H100 (SM103): 1.30× faster on average than DeepGEMM-MegaMoE, with peaks up to 1.97×.
  • NVIDIA H800 (SM90): 1.24× faster on average than MegaMoE.
  • AMD MI300X (CDNA3): 1.44× faster than the official RCCL+AITER baseline, reaching up to 2.87× speedup in specific scenarios.
  • End-to-End: For full model inference (decoding), Weave provided an 8% total speedup for Qwen models on H800 clusters.

Limitations and Future Work

While Weave is a significant step forward, the authors note a few areas for growth:

  • Hardware Scope: The current implementation is optimized for NVIDIA and AMD GPUs. Adapting it to other AI accelerators (like TPUs or custom NPUs) would require re-calibrating the cost models for different memory and DMA hierarchies.
  • Expert Replication: Weave is "orthogonal" to expert load balancing (like EPLB). While they work well together, future work could more deeply integrate scheduling with how experts are placed across a cluster.

In short, Weave proves that in the world of MoE, being a "jack of all trades" (a flexible warp) is much better than being a master of only one.

Summary updated

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).
BibTeX
@misc{huang2026weave,
  author = {Ziyu Huang and Yangjie Zhou and Chenhao Zhu and Hongzhe Yan and Tianwei Qiao and Sicheng He and Zihan Liu and Peng Yu and Shulai Zhang and Xingxun Tang and Xinhao Luo and Minyi Guo and Xiu Lin and Yinghao Yu and Guodong Yang and Liping Zhang and Shixuan Sun and Qingyun Chen and Jingwen Leng},
  title = {{Weave: Routing-Adaptive Runtime Warp Scheduling for MoE Megakernels}},
  year = {2026},
  eprint = {2611.27765},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27765},
}
Figure