DEFA:通过剪枝辅助网格采样和多尺度并行处理实现高效可变形注意力加速
DEFA: Efficient Deformable Attention Acceleration via Pruning-Assisted Grid-Sampling and Multi-Scale Parallel Processing
AI总结:
针对多尺度可变形注意力(MSDeformAttn)的内存和效率问题,提出算法-架构协同设计DEFA,通过剪枝和多尺度并行实现10.1-31.9倍加速及20.3-37.7倍能效提升。
摘要:
多尺度可变形注意力(MSDeformAttn)已成为各种视觉任务中的关键机制,展现出归因于多尺度网格采样的显著优越性。然而,这一新引入的算子导致不规则的数据访问和巨大的内存需求,造成严重的处理单元(PE)利用率不足。同时,现有的注意力加速方法由于缺乏对此独特流程的支持,无法直接应用于MSDeformAttn。因此,我们提出了一种专用的算法-架构协同设计,命名为DEFA,这是首个用于MSDeformAttn加速的方法。在算法层面,DEFA分别对特征图和采样点采用频率加权剪枝和概率感知剪枝,将内存占用减少超过80%。在架构层面,它探索多尺度并行性以显著提高吞吐量,并通过细粒度层融合和特征图重用进一步减少内存访问。在代表性基准上的广泛评估表明,与强大的GPU相比,DEFA实现了10.1-31.9倍的加速和20.3-37.7倍的能效提升。它还比相关加速器在能效上提高2.2-3.7倍,同时为MSDeformAttn提供了开创性的支持。
英文摘要:
Multi-scale deformable attention (MSDeformAttn) has emerged as a key mechanism in various vision tasks, demonstrating explicit superiority attributed to multi-scale grid-sampling. However, this newly introduced operator incurs irregular data access and enormous memory requirement, leading to severe PE underutilization. Meanwhile, existing approaches for attention acceleration cannot be directly applied to MSDeformAttn due to lack of support for this distinct procedure. Therefore, we propose a dedicated algorithm-architecture co-design dubbed DEFA, the first-of-its-kind method for MSDeformAttn acceleration. At the algorithm level, DEFA adopts frequency-weighted pruning and probability-aware pruning for feature maps and sampling points respectively, alleviating the memory footprint by over 80%. At the architecture level, it explores the multi-scale parallelism to boost the throughput significantly and further reduces the memory access via fine-grained layer fusion and feature map reusing. Extensively evaluated on representative benchmarks, DEFA achieves 10.1-31.9x speedup and 20.3-37.7x energy efficiency boost compared to powerful GPUs. It also rivals the related accelerators by 2.2-3.7x energy efficiency improvement while providing pioneering support for MSDeformAttn.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。