[论文解读] Accelerating BLAS on Custom Architecture through Algorithm-Architecture Co-design
本文提出了一种在粗粒度可重构架构(REDEFINE CGRA)上加速基础线性代数子程序(BLAS)的协同设计方法,通过为Level-1、-2和-3 BLAS操作定制优化处理单元(PE),实现了高达74%理论峰值性能的双精度GEMM、40%的GEMV和20%的点积运算,相较于Intel、Nvidia GPU和FPGA平台实现了3–140×的加速比,同时达到35.7 Gflops/watt的能效,展示了通过算法-架构协同设计实现可扩展性能的潜力。
Basic Linear Algebra Subprograms (BLAS) play key role in high performance and scientific computing applications. Experimentally, yesteryear multicore and General Purpose Graphics Processing Units (GPGPUs) are capable of achieving up to 15 to 57% of the theoretical peak performance at 65W to 240W respectively for compute bound operations like Double/Single Precision General Matrix Multiplication (XGEMM). For bandwidth bound operations like Single/Double precision Matrix-vector Multiplication (XGEMV) the performance is merely 5 to 7% of the theoretical peak performance in multicores and GPGPUs respectively. Achieving performance in BLAS requires moving away from conventional wisdom and evolving towards customized accelerator tailored for BLAS through algorithm-architecture co-design. In this paper, we present acceleration of Level-1 (vector operations), Level-2 (matrix-vector operations), and Level-3 (matrix-matrix operations) BLAS through algorithm architecture co-design on a Coarse-grained Reconfigurable Architecture (CGRA). We choose REDEFINE CGRA as a platform for our experiments since REDEFINE can be adapted to support domain of interest through tailor-made Custom Function Units (CFUs). For efficient sequential realization of BLAS, we present design of a Processing Element (PE) and perform micro-architectural enhancements in the PE to achieve up-to 74% of the theoretical peak performance of PE in DGEMM, 40% in DGEMV and 20% in double precision inner product (DDOT). We attach this PE to REDEFINE CGRA as a CFU and show the scalability of our solution. Finally, we show performance improvement of 3-140x in PE over commercially available Intel micro-architectures, ClearSpeed CSX700, FPGA, and Nvidia GPGPUs.
研究动机与目标
- 为解决传统多核和GPGPU平台在BLAS实现中性能饱和的问题,这些平台仅能达到理论峰值性能的15–57%。
- 克服传统架构在计算密集型和带宽受限的BLAS核函数中计算与内存资源利用效率低下的问题。
- 通过微架构增强,设计一种面向BLAS操作的领域专用、能效高效的处理单元(PE)。
- 将优化后的PE作为自定义功能单元(CFU)集成到REDEFINE CGRA中,并评估其在不同矩阵尺寸下的可扩展性与性能表现。
提出的方法
- 设计一种具备微架构增强的专用处理单元(PE),以高效执行Level-1、-2和-3 BLAS例程。
- 在REDEFINE粗粒度可重构架构(CGRA)上实现该PE,利用其可自定义自定义功能单元(CFUs)以适配特定计算领域的能力。
- 使用有向无环图(DAG)分析来建模数据流并识别BLAS核函数中的并行性,从而实现对PE的高效映射。
- 将大矩阵划分为块(如10×10或20×20),并在分块阵列中的多个PE之间分配计算任务,以利用并行性。
- 采用分块算法方法平衡计算与通信,最小化数据移动开销。
- 使用CPI和Gflops/watt指标,将该PE与CGRA配置在Intel、AMD、Nvidia GPU、FPGA和ClearSpeed CSX700平台上进行公平对比。
实验结果
研究问题
- RQ1算法-架构协同设计能否突破传统多核和GPGPU平台在BLAS运算中观察到的性能饱和点?
- RQ2在定制PE中引入微架构增强,能在多大程度上提升DGEMM、DGEMV和DDOT等BLAS核函数的性能与能效?
- RQ3在REDEFINE CGRA上,基于PE的解决方案在矩阵尺寸和tile数量增加时,其可扩展性如何变化?
- RQ4与通用处理器和专用加速器相比,该方案在BLAS工作负载中可实现的Gflops/watt和加速比提升有多大?
- RQ5领域专用PE能否在保持能效的同时,实现优于现成通用处理器和GPU的性能表现?
主要发现
- 定制PE在双精度GEMM(DGEMM)中达到理论峰值性能的74%,在GEMV中为40%,在点积(DDOT)中为20%,显著优于通用处理器。
- 该PE实现35.7 Gflops/watt的能效,远超Intel/AMD处理器(0.02–0.25 Gflops/watt)和Nvidia GPU。
- 与Intel Core微架构相比,PE实现3–140×的加速比;与Nvidia GPU相比,实现7–139×的加速比;与Altera FPGA相比,实现10×加速比;与ClearSpeed CSX700相比,实现3×加速比,均以Gflops/watt为衡量标准。
- 在REDEFINE CGRA上采用2×2、3×3和4×4分块阵列实现并行计算,相较于单PE实现,分别实现最高4×、9×和16×的加速比,且在大矩阵尺寸下加速比趋于饱和。
- 随着矩阵尺寸增大,计算与通信比提高(如20×20时为10:1,60×60时为20:1),表明大问题中通信开销减少。
- 通过使用tile数量成比例的稳定加速比增益,验证了该方案的可扩展性,证实了协同设计方法的有效性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。