arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.34914cs.DCcs.AI
收藏

Waypoint:针对CPU的通用矩阵乘法(GEMM)的分析建模

Waypoint: Analytically Modeling GEMM for CPUs

Advanced Micro Devices, Inc.(超威半导体公司)

Srinidhi N, Sunanda Somwase, Hemant Kumar Chandrakant Chandavar, Eashan Dash, Varun Agrawal, Prakash Raghavendra

AI总结:

Waypoint是针对CPU的GEMM分析模型,可自动识别最优分块大小,构建的OPAM库实现与顶尖GEMM库相当的性能,助力CPU上LLM推理获1.36-1.98倍加速。

摘要:

高性能通用矩阵乘法(GEMM)实现依赖于将GEMM分解为精心选择的分块以达到峰值性能。我们提出Waypoint,一种新的分析模型,用于针对给定硬件和输入矩阵形状自动识别最优分块大小。Waypoint通过捕捉所有架构效应(包括与内存层次结构的交互、指令级并行性和多线程)来估计给定分块选择的可实现性能。我们将这些估计作为代理,在可能的分块大小空间中搜索以识别最大化性能的分块。此外,Waypoint帮助硬件设计师估计实验性硬件优化上的实际性能。我们构建了新的CPU GEMM库OPAM,它使用Waypoint自动分解GEMM,达到与最先进GEMM库相当的性能,并助力CPU上的大语言模型(LLM)推理加速,实现1.36至1.98倍的加速比。

英文摘要:

High-performance General Matrix Multiplication (GEMM) implementations rely on breaking down GEMM into carefully selected tiles to achieve peak performance. We present Waypoint, a new analytical model to automatically identify the optimal tile size for a given hardware and input matrix shape. Waypoint estimates the achievable performance for a given tile choice by capturing all the architectural effects including interactions with memory hierarchy, instruction-level parallelism, and multi-threading. Using the estimates as a proxy, we search through the space of possible tile sizes to identify the one that maximizes performance. Additionally, Waypoint helps hardware designers estimate realistic performance on experimental hardware optimizations. We build a new GEMM library OPAM for CPUs that uses Waypoint to automatically break down GEMM and achieve performance that matches state-of-the-art GEMM libraries and helps accelerate LLM inference on CPUs achieving $1.36 - 1.98 \times$ speedups.

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

↑