Dynamic input shapes, common in LLMs due to variable prompt lengths, typically hinder efficient on-device inference on hardware optimized for fixed-size computations. Techniques like constrained dynamic shapes, which pad inputs to hardware-friendly multiples once, can boost prefill throughput by over 23x by ensuring efficient use of fixed-size tensor instructions across the entire network.