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

MX:增强 RISC-V 向量 ISA 以实现超低开销、高能效的矩阵乘法

MX: Enhancing RISC-V's Vector ISA for Ultra-Low Overhead, Energy-Efficient Matrix Multiplication

Matteo Perotti, Yichao Zhang, Matheus Cavalcante, Enis Mustafa, Luca Benini

AI总结:

提出基于 RISC-V 向量 ISA 的轻量级矩阵扩展 MX,复用现有向量寄存器堆和功能单元构建混合引擎,在面积开销 < 3% 的条件下显著提升双核与 64 核集群的矩阵乘法能效与性能。

摘要:

稠密矩阵乘法(MatMul)可以说是最无处不在的计算密集型内核之一,涵盖线性代数、DSP、图形和机器学习应用。因此,MatMul 优化不仅在高性能处理器中至关重要,在嵌入式低功耗平台中同样关键。近期,一些指令集架构(ISA)引入了矩阵扩展,以提升 MatMul 性能和效率,代价是增加了矩阵寄存器堆和矩阵单元。本文提出 Matrix eXtension(MX),这是一种基于开源 RISC-V Vector(RVV)ISA 的轻量级方法,旨在提升 MatMul 能效。MX 不添加昂贵的专用硬件,而是利用现有的向量寄存器堆和功能单元,以可忽略的面积开销(< 3%)构建混合向量/矩阵引擎,该开销来自用于提高数据复用的紧凑型近 FPU 缓冲区,且无时钟频率开销。我们在紧凑且高度能效优化的 RVV 处理器上实现 MX,并在 12nm 工艺节点下对双核和 64 核集群进行评估。在双核上,对于双精度 64x64x64 矩阵乘法,在相同 FPU 利用率(约 97%)下,MX 将能效提升 10%;在 64 核集群上,对相同基准测试在 32 位数据上能效提升 25%,性能提升 56%。

英文摘要:

Dense Matrix Multiplication (MatMul) is arguably one of the most ubiquitous compute-intensive kernels, spanning linear algebra, DSP, graphics, and machine learning applications. Thus, MatMul optimization is crucial not only in high-performance processors but also in embedded low-power platforms. Several Instruction Set Architectures (ISAs) have recently included matrix extensions to improve MatMul performance and efficiency at the cost of added matrix register files and units. In this paper, we propose Matrix eXtension (MX), a lightweight approach that builds upon the open-source RISC-V Vector (RVV) ISA to boost MatMul energy efficiency. Instead of adding expensive dedicated hardware, MX uses the pre-existing vector register file and functional units to create a hybrid vector/matrix engine at a negligible area cost (< 3%), which comes from a compact near-FPU tile buffer for higher data reuse, and no clock frequency overhead. We implement MX on a compact and highly energy-optimized RVV processor and evaluate it in both a Dual- and 64-Core cluster in a 12-nm technology node. MX boosts the Dual-Core's energy efficiency by 10% for a double-precision 64x64x64 matrix multiplication with the same FPU utilization (~97%) and by 25% on the 64-Core cluster for the same benchmark on 32-bit data, with a 56% performance gain.

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

↑