为低比特矩阵乘法设计高效CPU支持,提升推理速度13倍以上。
ExaGEMM: Exploration Framework for CPU-Driven ML Inference via Associative In-Register Computing for Low-Bit GEMM

- 利用寄存器内查表计算,复用现有指令集优化低比特矩阵乘法。
- 在多种模型上实现13.29倍延迟降低,比纯软件方案快得多。
- 适合关注低比特推理性能优化的芯片设计与编译团队。
低比特矩阵乘法(GEMM)日益成为高效机器学习推理的核心,但极低比特运算对传统CPU仍不友好。实际部署涉及从1/2/4比特权重到不同激活精度的多种场景,其可行性、重用机会与支持成本在固定SIMD和寄存器预算下差异显著,使轻量级CPU支持选择成为关键设计问题。我们提出ExaGEMM,一个面向CPU原生低比特GEMM的工作负载感知协同设计与探索框架,通过寄存器内查找表执行实现。核心洞察是:现有SIMD数据通路已覆盖表生成与累加,仅需新增寄存器内选择/喂入机制,并显式建模开销。ExaGEMM使用解析模型联合探索参数化内核与轻量级SIMD ISA支持,基于寄存器可行性、计算成本、内存流量与硬件开销,模拟前剪枝99.2%候选方案。随后识别非支配支持点,生成ISA规范、gem5补丁与GEMM内核用于验证。在代表性ML模型与CPU目标上,相比纯软件基线,延迟降低13.29倍,且表明工作负载感知的前沿选择对混合精度大语言模型尤为关键。
原文摘要 · Abstract (English)
Low-bit GEMM is increasingly central to efficient ML inference, yet very-low-bit execution remains a poor fit for conventional CPUs. Practical deployment spans fragmented regimes-from 1/2/4-bit weights to varying activation precision-whose feasibility, reuse opportunity, and support cost differ under fixed SIMD and register-file budgets, making lightweight CPU support selection a first-class design problem. We present ExaGEMM, a workload-aware codesign and exploration framework for CPU-native low-bit GEMM via register-resident LUT execution. The key insight is that existing SIMD datapaths already cover table generation and accumulation; the only new hardware is an in-register select/feed mechanism with explicitly modeled cost. ExaGEMM co-explores parameterized kernels and lightweight SIMD ISA support using analytical models of register feasibility, compute cost, memory traffic, and hardware overhead, pruning the candidate space by 99.2% before simulation. It then identifies non-dominated support points and generates ISA specs, gem5 patches, and GEMM kernels for validation. Across representative ML models and CPU targets, ExaGEMM improves latency by 13.29x over software-only baselines, while showing that workload-aware frontier selection is especially important for mixed-precision LLM workloads.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。