Constrained Dynamic Shapes for 23x Throughput Boost
Roofline AI achieves up to 23 times higher LLM prefill throughput by implementing 'constrained dynamic shapes,' which involves padding prompt tokens only once at the input to hardware-friendly multiples, ensuring global divisibility for efficient fixed-size tensor instructions.
The top 3
- Constrained Dynamic Shapes: Top 3 Techniques for 23x Boost: Achieving a 23x prefill throughput boost with constrained dynamic shapes often relies on techniques like shape specialization, dynamic batching with compiler-driven control, and efficient memory management, all working to bridge the gap between variable LLM inputs and fixed hardware capabilities.
- Prefill Throughput: Constrained vs. Padded Dynamic Shapes: Constrained dynamic shapes significantly outperform traditional padding methods for dynamic LLM inputs, with reported prefill throughput improvements up to 23x. Padding often leads to wasted computation and memory, whereas constrained shapes allow compilers to adapt more efficiently to varying input lengths.
- Hardware Mismatch: How Constrained Shapes Resolve LLM Input Challenges: The 23x throughput boost from constrained dynamic shapes directly addresses the fundamental mismatch between LLMs' variable input lengths and GPUs' fixed-size processing units. By providing compilers with more information about input shape ranges, it enables better kernel fusion and memory allocation, minimizing idle hardware cycles.
Sources
Open the full topic