利用存内计算实现GEMV加速的均衡数据放置
Balanced Data Placement for GEMV Acceleration with Processing-In-Memory
AI总结:
本文针对存内计算加速GEMV时数据放置不优的问题,提出PIMnast方法以均衡多种因素确定最优数据放置,在GenAI模型上实现高达6.86倍GEMV加速和5倍每token延迟加速。
摘要:
随着生成式人工智能(GenAI)推理的空前需求,主导GenAI的基元运算如通用矩阵-向量乘法(GEMV)的加速正受到广泛关注。GEMV面临的一个挑战是该基元运算所要求的高内存带宽。多家内存厂商已经提出了商业上可行的存内计算(PIM)原型,通过为内存存储体增加计算能力并向所有存储体广播相同命令,在处理器之上获得带宽提升。虽然所提出的PIM设计有望加速GEMV,但我们在本工作中观察到,真正利用PIM加速的一个关键障碍是推导出将矩阵放置到内存存储体中的最优数据放置方案。为此,我们梳理出影响数据放置的若干因素,并提出PIMnast方法,该方法如同体操运动员一样平衡这些因素,以识别能够带来GEMV加速的数据放置方案。在一系列GenAI模型上,我们提出的PIMnast方法以及我们所识别的额外编排调节手段,为GEMV带来了高达6.86$\ imes$的加速(相对于可用的7$\ imes$屋顶线加速),从而使每token延迟获得高达5$\ imes$的加速。
英文摘要:
With unprecedented demand for generative AI (GenAI) inference, acceleration of primitives that dominate GenAI such as general matrix-vector multiplication (GEMV) is receiving considerable attention. A challenge with GEMVs is the high memory bandwidth this primitive demands. Multiple memory vendors have proposed commercially viable processing-in-memory (PIM) prototypes that attain bandwidth boost over processor via augmenting memory banks with compute capabilities and broadcasting same command to all banks. While proposed PIM designs stand to accelerate GEMV, we observe in this work that a key impediment to truly harness PIM acceleration is deducing optimal data-placement to place the matrix in memory banks. To this end, we tease out several factors that impact data-placement and propose PIMnast methodology which, like a gymnast, balances these factors to identify data-placements that deliver GEMV acceleration. Across a spectrum of GenAI models, our proposed PIMnast methodology along with additional orchestration knobs we identify delivers up to 6.86$\times$ speedup for GEMVs (of the available 7$\times$ roofline speedup) leading to up to 5$\times$ speedup for per-token latencies.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。