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

使用FPGA的快速且实用的Strassen矩阵乘法

Fast and Practical Strassen's Matrix Multiplication using FPGAs

Afzal Ahmad, Linfeng Du, Wei Zhang

AI总结:

本文提出一种基于FPGA的Strassen矩阵乘法实现,通过优化设计克服了传统算法在中小矩阵上的实用性限制,在Alveo U50和U280等加速器上测试表明,对于小至n=256的矩阵,其性能超越或匹配了优化的GeMM基线。

摘要:

矩阵乘法是机器学习和计算机图形学等众多科学领域的基础运算。对于$n\times n$矩阵,标准矩阵乘法算法的复杂度为$\mathcal{O}(n^3)$。Strassen算法将其改进至$\mathcal{O}(n^{2.807})$,但由于引入了大量加法运算,其在中小型矩阵尺寸下的实用性受限。本文提出了一种基于FPGA的Strassen算法新实现,对于小至$n=256$的矩阵,其速度优于优化的通用矩阵乘法(GeMM)实现。我们的设计在两款高性能FPGA加速器(Alveo U50和U280)上进行了广泛测试,涵盖多种数据类型,在多种矩阵尺寸下匹配或超越了高度优化的基线性能。

英文摘要:

Matrix multiplication is a cornerstone operation in a wide array of scientific fields, including machine learning and computer graphics. The standard algorithm for matrix multiplication has a complexity of $\mathcal{O}(n^3)$ for $n\times n$ matrices. Strassen's algorithm improves this to $\mathcal{O}(n^{2.807})$, but its practicality is limited for small to medium matrix sizes due to the large number of additions it introduces. This paper presents a novel FPGA-based implementation of Strassen's algorithm that achieves superior speed over an optimized General Matrix Multiply (GeMM) implementation for matrices as small as $n=256$. Our design, tested extensively on two high-performance FPGA accelerators (Alveo U50 and U280) across various data types, matches or surpasses the performance of a highly optimized baseline across a range of matrix sizes.

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

↑