Introduction
Deep Neural Network (DNN) optimization often relies on reducing FLOPs (floating-point operations) as a proxy for speed. However, this research reveals a significant gap between theoretical FLOPs reduction and actual hardware execution. On parallel architectures like GPUs, latency does not decrease linearly with model size; instead, it follows a "staircase" pattern. This paper identifies the GPU tail effect as the primary cause and proposes a hardware-aware optimization methodology to eliminate under-utilized cycles.
The Latency Staircase and GPU Tail Effect
Traditional model compression techniques like filter pruning and Neural Architecture Search (NAS) aim for linear FLOPs reduction. However, actual GPU runtime latency decreases in discrete, jagged steps. This phenomenon occurs because GPUs execute workloads in parallel "waves" across Streaming Multiprocessors (SMs).
If the final wave of a workload doesn't fully occupy all SMs—the GPU tail effect—that partially empty wave still takes the same amount of time to process as a fully packed one. Consequently, pruning a model might reduce FLOPs by emptying a few SMs in the last wave without actually reducing the total number of waves, yielding zero speedup. As shown in the figure above, these "steps" in latency coincide with sharp drops in GPU core utilization and throughput.
Hardware-Aware Optimization Methodology
To overcome the limitations of black-box profiling, the authors conduct a "full-stack" analysis of how DNN threads map to GPU hardware resources.
By mathematically modeling the latency staircase based on thread blocks and SM capacity (as illustrated in the hierarchy above), the authors propose a GPU-aware model optimization algorithm. This algorithm uses a two-pronged adjustment strategy for each layer:
- Scale Down (for Latency): Slightly reduce the layer width to completely eliminate an under-utilized GPU tail wave, directly reducing latency.
- Scale Up (for Accuracy): If a layer has a GPU tail, slightly increase the layer width to fully pack the existing wave. Since the wave takes the same time regardless of occupancy, this adds model capacity and accuracy for "free."
Key Results
The authors evaluated their methodology using standard benchmarks (CIFAR-10, ImageNet) across diverse hardware, including high-end Titan-V GPUs and resource-constrained Jetson Nano devices.
- Pruning Enhancements: When applied to state-of-the-art pruning methods like HRank, the proposed method achieved 11.3% to 17.7% lower latency on VGG16 and ResNet56 with negligible accuracy loss.
- NAS Enhancements: For the EfficientNet series (B0-B2) on ImageNet, GPU-aware models achieved 2.14% to 3.97% higher accuracy than baseline models under identical latency constraints.
- Throughput Maximization: Optimized models drastically improved hardware utilization. For example, an optimized VGG16 achieved 3.90 TFLOPs, a 1.6x throughput increase compared to baseline pruning (2.41 TFLOPs).
Conclusion
This work demonstrates that relying solely on FLOPs to guide model optimization on parallel hardware is fundamentally flawed. By accounting for the discrete nature of GPU execution waves, researchers can achieve significantly better accuracy-latency trade-offs. While currently focused on GPUs, the underlying principle of the tailing effect is applicable to other highly parallel computing platforms like TPUs and FPGAs.
Summary updated