arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.05559cs.AR
收藏

稀疏流语义寄存器:一种加速通用稀疏线性代数的轻量级 ISA 扩展

Sparse Stream Semantic Registers: A Lightweight ISA Extension Accelerating General Sparse Linear Algebra

Paul Scheffler, Florian Zaruba, Fabian Schuiki, Torsten Hoefler, Luca Benini

AI总结:

本文提出轻量级 RISC-V ISA 扩展,以流式间接寻址、交集和并集原语支持 CSR/CSF 等格式的单侧与双侧稀疏运算,在极小面积开销下显著提升性能、能效和 FPU 利用率。

摘要:

稀疏线性代数在许多应用领域都至关重要,但无论在软件还是硬件中都难以高效处理,其中单侧和双侧操作数稀疏性通常需要采用不同方法。在本工作中,我们增强了一种现有的内存流式 RISC-V ISA 扩展,通过加速流式间接寻址、交集和并集等底层操作,在压缩稀疏行(CSR)和压缩稀疏纤维(CSF)等广泛使用的稀疏张量格式上同时加速单侧与双侧操作数稀疏性。我们的扩展使单核相对经过优化的 RISC-V 基线在稀疏-稠密乘法、稀疏-稀疏乘法和稀疏-稀疏加法上分别取得最高 7.0 倍、7.7 倍和 9.8 倍加速,并在稀疏-稠密问题上实现最高 80% 的峰值 FPU 利用率。在一个八核集群上,使用真实世界矩阵的稀疏-稠密和稀疏-稀疏矩阵-向量乘法速度最高提升 4.9 倍和 5.9 倍,能效最高提升 2.9 倍和 3.0 倍。我们还探索了该扩展的进一步应用,例如模板代码和图模式匹配。与近期 CPU、GPU 和加速器方法相比,我们的扩展在数据表示、稀疏程度和数据流方面提供了更高灵活性,同时硬件占用极小,仅为计算集群增加 1.8% 的面积。搭载我们扩展并运行 CSR 矩阵-向量乘法的集群,其峰值浮点利用率分别比近期面向 CPU 和 GPU 的高度优化稀疏数据结构与库高 9.9 倍和 1.7 倍;即使考虑片外主存(HBM)以及片上互连的延迟和带宽影响,这一结果仍然成立。

英文摘要:

Sparse linear algebra is crucial in many application domains, but challenging to handle efficiently in both software and hardware, with one- and two-sided operand sparsity handled with distinct approaches. In this work, we enhance an existing memory-streaming RISC-V ISA extension to accelerate both one- and two-sided operand sparsity on widespread sparse tensor formats like compressed sparse row (CSR) and compressed sparse fiber (CSF) by accelerating the underlying operations of streaming indirection, intersection, and union. Our extensions enable single-core speedups over an optimized RISC-V baseline of up to 7.0x, 7.7x, and 9.8x on sparse-dense multiply, sparse-sparse multiply, and sparse-sparse addition, respectively, and peak FPU utilizations of up to 80% on sparse-dense problems. On an eight-core cluster, sparse-dense and sparse-sparse matrix-vector multiply using real-world matrices are up to 4.9x and 5.9x faster and up to 2.9x and 3.0x more energy efficient. We explore further applications for our extensions, such as stencil codes and graph pattern matching. Compared to recent CPU, GPU, and accelerator approaches, our extensions enable higher flexibility on data representation, degree of sparsity, and dataflow at a minimal hardware footprint, adding only 1.8% in area to a compute cluster. A cluster with our extensions running CSR matrix-vector multiplication achieves 9.9x and 1.7x higher peak floating-point utilizations than recent highly optimized sparse data structures and libraries for CPU and GPU, respectively, even when accounting for off-chip main memory (HBM) and on-chip interconnect latency and bandwidth effects.

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

↑