arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.04708cs.AR
收藏

面向机器学习推理的高效稀疏存内处理架构(ESPIM)

Efficient Sparse Processing-in-Memory Architecture (ESPIM) for Machine Learning Inference

Mingxuan He, Mithuna Thottethodi, T. N. Vijaykumar

AI总结:

本文提出 ESPIM 稀疏存内处理架构,通过细粒度交错、SDDS、索引/数值解耦预取和简化交换结构,解决非结构化稀疏推理的不规则与负载不均衡问题。

摘要:

新兴机器学习(ML)模型(例如 transformer)在推理中包含受存储器引脚带宽限制的矩阵-向量(MV)计算。通过避免跨越引脚,存内处理(PIM)能够提升受引脚限制工作负载的性能和能效,近期在(数字)PIM 方面的商业成果已经证明了这一点。稀疏模型可以在几乎不损失精度的情况下提升推理性能和能效。然而,非结构化稀疏推理给密集型 PIM 跨所有 bank 的运行带来了不确定性、不规则性和负载不均衡等关键挑战。密集型 PIM 利用 DRAM 组织结构,从每个 bank 读取矩阵单元,并将向量元素广播到所有 bank。为高效解决这些挑战,我们提出 ESPIM,其具有四项贡献:(1)由于矩阵稀疏性增加了每次矩阵列读取对应的向量广播带宽需求,ESPIM 对矩阵单元采用细粒度交错,使每次向量广播可在每个 bank 内的多个行之间共享,从而降低带宽需求。(2)尽管稀疏性存在不确定性,ESPIM 利用“稀疏性依赖于数据,但在推理之前是静态且已知的”这一观察,基本避免了片上控制所需的面积和能耗。因此,ESPIM 采用静态依赖数据调度(SDDS)。(3)ESPIM 将矩阵单元值及其索引解耦,把索引放在数值之前,以实现向量元素的预取。我们通过解耦预取扩展 SDDS,以提升性能并保证正确性。(4)最后,我们简化了选择与矩阵单元匹配的向量元素所需的交换结构。我们扩展 SDDS,通过减少简化交换结构中的冲突来提升性能。在我们的仿真中,与 Newton 相比,ESPIM 实现了平均 2 倍(最高 4.2 倍)的加速,能耗平均降低 34%(最高 63%),而面积开销低于 5%。

英文摘要:

Emerging machine learning (ML) models (e.g., transformers) involve memory pin bandwidth-bound matrix-vector (MV) computation in inference. By avoiding pin crossings, processing in memory (PIM) can improve performance and energy for pin-bound workloads, as evidenced by recent commercial efforts in (digital) PIM. Sparse models can improve performance and energy of inference without losing much accuracy. However, unstructured sparse inference injects the key challenges of uncertainty, irregularity, and load imbalance into a dense PIM's operation across all the banks. The dense PIM reads the matrix cells from each bank and broadcasts the vector elements to all the banks exploiting DRAM organization. To address these challenges efficiently, we propose ESPIM which makes four contributions: (1) Because matrix sparsity increases the vector broadcast bandwidth demand per matrix column-read, ESPIM employs a fine-grained interleaving of the matrix cells so that each vector broadcast is shared among multiple rows in each bank, cutting the bandwidth demand. (2) ESPIM mostly avoids on-chip control's area and energy despite sparsity's uncertainties by exploiting the observation that the sparsity is data-dependent but static and known before inference. Accordingly, ESPIM employs static data-dependent scheduling (SDDS) (3) ESPIM decouples the matrix cell values and their indices, placing the indices ahead of the values to enable prefetching of the vector elements. We extend SDDS for performance and correctness with the decoupled prefetching. (4) Finally, we simplify the switch required to select the vector elements that match the matrix cells. We extend SDDS to improve performance by reducing conflicts in the simplified switch. In our simulations, ESPIM achieves 2x average (up to 4.2x) speedup over and 34% average (up to 63%) lower energy than Newton while incurring under 5% area.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑