内存带宽,而非FLOPs:在边缘GPU上分析并加速基于查询的分割解码器
Memory Bandwidth, Not FLOPs: Profiling and Accelerating Query-Based Segmentation Decoders on Edge GPUs
AI总结:
该研究发现边缘GPU上基于查询的分割解码器的瓶颈是内存带宽而非FLOPs,提出CompactInst方法,在保持精度的同时大幅提升解码器及模型速度,证实解码器字节决定延迟。
摘要:
基于查询的分割模型即使在工作站GPU上进行实时推理也能取得出色性能。然而在边缘设备上,我们发现其Transformer解码器受内存带宽瓶颈的严重制约,这一瓶颈在标准FLOPs分析中无法被察觉,且会随输入分辨率提升和DRAM带宽受限而加剧。通过激活张量核心GEMM的FP16屋顶线分析及硬件DRAM计数器显示,FastInst和Mask2Former的非张量核心聚合仅达到CUDA核心峰值的2.5%至6%,却占解码器时间的53%至70%、解码器字节数的61%至71%;最大的单个内核可持续达到标称峰值DRAM带宽的90%,有效饱和内存总线。因此瓶颈并非主要源于低GEMM强度,而是跨内核激活流量。CompactInst通过4倍无参数空间池化解决该瓶颈,减少Transformer解码器内的移动字节,同时采用双卷积细化头恢复空间细节。在Jetson Orin Nano上使用TensorRT FP16时,随输入分辨率提升,CompactInst的解码器加速比达2.35倍至4.74倍,模型加速比达1.57倍至2.62倍,且精度接近(COCO val2017上AP下降0.4,Cityscapes test上AP上升0.2);解码器FLOPs多2.57倍的更重变体,在带宽最受限的设备上解码器仍快1.74倍,从部署层面证实解码器字节而非FLOPs决定延迟。
英文摘要:
Query-based segmentation models achieve strong performance even under real-time inference on workstation GPUs. On edge devices, however, we show their transformer decoders are deeply memory-bandwidth-bound, a bottleneck invisible to standard FLOP analysis that worsens with input resolution and limited DRAM bandwidth. An FP16 roofline analysis with tensor-core GEMMs active and hardware DRAM counters shows that the non-tensor-core aggregates of FastInst and Mask2Former reach only $2.5\%$ to $6\%$ of the CUDA-core ridge yet account for $53\%$ to $70\%$ of decoder time and $61\%$ to $71\%$ of decoder bytes. The largest individual kernels sustain up to $90\%$ of nominal peak DRAM bandwidth, effectively saturating the memory bus. The bottleneck is therefore not primarily low GEMM intensity, but cross-kernel activation traffic. CompactInst addresses this bottleneck using parameter-free spatial pooling at $4{\times}$, which reduces the bytes moved within the transformer decoder, while a two-convolution refinement head recovers spatial detail. Under TensorRT FP16 on Jetson Orin Nano, CompactInst delivers decoder speedups from $2.35{\times}$ to $4.74{\times}$ and model speedups from $1.57{\times}$ to $2.62{\times}$ as input resolution grows, while closely matching accuracy ($-0.4$ AP on COCO val2017, $+0.2$ AP on Cityscapes test). A heavier variant with $2.57{\times}$ more decoder FLOPs still runs its decoder $1.74{\times}$ faster on the most bandwidth-constrained device, confirming at the deployment level that decoder bytes, not FLOPs, govern latency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。