TL;DR
Training a neural network on a GPU isn’t one giant math problem; it’s a sprawling, interconnected web of thousands of tiny matrix operations, and the exact order you run them dictates whether your GPU flies or stalls waiting on memory. Instead of relying on rigid rules of thumb or massive "black-box" AI schedulers, the authors introduce MoSAIC-X—a framework that learns near-perfect, cache-aware GPU schedules using a simple linear equation with just five interpretable numbers. It proves that with the right structural features, five well-tuned parameters can beat a 417-parameter neural network and come within a fraction of a percent of mathematical perfection.
What Problem Does This Paper Address?
When you train a Transformer on a GPU, huge matrix multiplications are chopped into smaller "tiles" so they can fit into the chip's ultra-fast, tiny shared memory (e.g., 48 KB per multiprocessor). These tiles form a Directed Acyclic Graph (DAG)—a dependency chart of hundreds or thousands of tasks.
Deciding which task runs when to minimize total execution time (the makespan) is a notoriously hard puzzle, complicated by the GPU's memory hierarchy. If Task B immediately follows Task A, it might catch Task A's output sitting warmly in the fast L2 cache. Wait too long, and that data gets evicted to slow global DRAM, tanking performance.
Existing schedulers force an uncomfortable three-way compromise:
- Classical heuristics (like HEFT, Heterogeneous Earliest Finish Time) are fast, but use rigid, fixed rules that completely ignore memory hierarchies and cache behavior.
- Exact mathematical solvers (like Google's CP-SAT) find provably optimal schedules, but choke once graphs grow beyond ~1,000 tasks.
- Deep learning schedulers adapt to complex workloads, but require hundreds of opaque parameters and expensive retraining, leaving engineers with zero insight into why a schedule was chosen.
Methods
MoSAIC-X bridges this gap by keeping the fast execution of a standard list scheduler, but replacing its rigid priority rule with a learnable, 5-parameter linear equation combined with a GPU memory model.
Every task in a graph is summarized by five scale-invariant structural features:
- Upward rank: Longest weighted path to the end of the graph (estimating critical-path urgency).
- Depth: Longest path from the start.
- Fanout & Indegree: Number of immediate successors and predecessors, implicitly capturing parallel forks and synchronization bottlenecks without expensive subgraph mining.
- Communication cost: Outgoing data size normalized by memory bandwidth.
To find the five priority weights ($\theta \in \mathbb{R}^5$), MoSAIC-X uses an offline staged stochastic search (1,700 fast simulations narrowing from broad Gaussian exploration to local fine-tuning) to directly minimize makespan. An exact CP-SAT solver computes true optimal makespans on tractable graphs, serving purely as a "quality ceiling" to calibrate how close the learned heuristic gets to perfection.
What makes MoSAIC-X architecture-aware are two additions over prior work:
- Hard Shared-Memory Tiling: Tile sizes are strictly constrained during DAG creation so operands never exceed the 48 KB on-chip shared memory limit.
- L2 Cache Simulation (MoSAIC-X-L2): During scheduling, the system tracks a global First-In-First-Out (FIFO) buffer modeling the GPU's 16 MB L2 cache, rewarding task orderings that consume intermediate data before it gets evicted to DRAM.
At deployment, these five learned weights schedule thousands of tasks in milliseconds—and can even be transferred "zero-shot" to larger, unseen graphs from similar workload families.
Datasets
The authors evaluate MoSAIC-X across a 20-DAG corpus plus custom neural network workloads:
- Synthetic Benchmarks: Standard Task Graph (STG) and TGFF-generated graphs covering fork-join, layered, and random topologies.
- Community Kernels: 8 real-world compute graphs from PolyBench and MachSuite (e.g., GEMM, FFT, CONV2D, AES, STENCIL).
- Newly Constructed Neural Training DAGs: Custom architecture-aware tiled DAGs for Transformer layers (78 to 1,024 tasks) and 2-layer MLP MatMul training iterations (Small, 1X, and 2X scales, spanning 588 to 3,333 simulation tasks).
Key Insights and Ideas
- Simplicity beats parameter bloat: DAG scheduling has enough inherent structure that deep neural networks are overkill. Because MoSAIC-X's five features are scale-invariant, its 5-parameter linear rule generalizes cleanly to larger graphs where a 417-parameter Graph Neural Network (DeepSoCS) collapses.
- Adaptive weights shine when data movement hurts: On uniform, compute-heavy graphs, almost any sensible task order works. MoSAIC-X's biggest wins happen in communication-heavy regimes, where it automatically shifts weight onto communication and connectivity features to prevent memory bottlenecks.
- Temporal locality trumps processor binding: Because modern GPUs share a unified L2 cache across all Streaming Multiprocessors, when you run a consumer task matters far more than where (which processor) you run it.
Key Results
- Near-Optimal Quality: Across verified Transformer and synthetic DAGs (up to 960 tasks), MoSAIC-X stays within 0.5% of CP-SAT's provably optimal makespans (hitting a 0.01% gap on Transformer-Base), and wins or ties on 7 of 8 PolyBench/MachSuite benchmarks.
- Communication-Heavy Gains: When communication costs dominate computation (CCR $\ge 5.0$), MoSAIC-X cuts simulated makespan by up to 11.74% (~12%) over HEFT.
- Cache-Aware Wins: Under L2 cache eviction pressure (Tiny Transformer, 78 tasks), MoSAIC-X-L2 beats locality-aware HEFT by 4.70%.
- Crushing Neural Baselines: On 200-task graphs, MoSAIC-X beats HEFT by 2.05%, whereas the 417-parameter neural scheduler DeepSoCS degrades by 48.65%.
- Real Silicon Speedup: Executing PyTorch CUDA kernels on an NVIDIA RTX 500 Ada GPU, MoSAIC-X's task ordering yields a measured 1.015$\times$ speedup over HEFT on a 901-kernel MLP workload.
Limitations and Future Work
- Compute Budget Asymmetry: MoSAIC-X uses 1,700 candidate evaluations per graph offline, giving it a hefty compute advantage over single-shot heuristics like HEFT. Comparing against other search algorithms under equal budgets is left for future work.
- Limited Cross-Family Transfer: While zero-shot weight transfer works well within the same graph family, transferring across wildly different topologies performs roughly on par with HEFT—meaning per-workload tuning is still best.
- Hardware Scope & Feature Ablation: Real GPU tests were limited to two configurations on a single GPU without direct SM-binding control or hardware cache-profiler verification (e.g., Nsight Compute), and the individual impact of each of the five features hasn't yet been isolated via ablation studies.
Summary updated