Matrix extensions have emerged as an essential feature in modern CPUs to address the surging demands of AI workloads. However, existing designs often incur substantial hardware and software design overhead. Tight coupling with the CPU pipeline complicates integration across diverse CPUs, while fine-grained synchronous instructions hinder the development of high-performance kernels. This paper proposes a unified and configurable CPU matrix extension architecture. By decoupling matrix units from the CPU pipeline, the design enables low-overhead integration while maintaining close coordination with existing compute and memory resources. The configurable matrix unit supports mixed-precision operations and adapts to diverse compute demands and memory bandwidth constraints. An asynchronous matrix multiplication abstraction with flexible granularity conceals hardware details, simplifies matrix-vector overlap, and supports a unified software stack. The architecture is integrated into four open-source CPU RTL platforms and evaluated on representative AI models. Matrix unit utilization under GEMM workloads exceeds 90% across all platforms. When configured with compute throughput and memory bandwidth comparable to Intel AMX, our design achieves speedups of 1.57x, 1.57x, and 2.31x on ResNet, BERT, and Llama3, with over 30% of the gains attributed to overlapped matrix-vector execution. A 4 TOPS@2GHz matrix unit occupies only 0.53 mm\textsuperscript{2} in 14nm CMOS. These results demonstrate strong cross-platform adaptability and effective hardware-software co-optimization, offering a practical matrix extension for the open-source community.


翻译:矩阵扩展已成为现代CPU中应对AI工作负载激增需求的关键特性。然而,现有设计往往带来显著的硬件与软件设计开销。与CPU流水线的紧耦合方式增加了跨不同CPU架构集成的复杂性,而细粒度同步指令则阻碍了高性能计算核心的开发。本文提出了一种统一且可配置的CPU矩阵扩展架构。通过将矩阵单元与CPU流水线解耦,该设计在保持与现有计算及存储资源紧密协同的同时,实现了低开销集成。可配置矩阵单元支持混合精度运算,可适应多样化的计算需求与内存带宽约束。一种具有灵活粒度的异步矩阵乘法抽象机制隐藏了硬件细节,简化了矩阵-向量重叠执行,并支持统一的软件栈。该架构已在四个开源CPU RTL平台上完成集成,并在代表性AI模型上进行了评估。在GEMM工作负载下,所有平台的矩阵单元利用率均超过90%。当配置为与Intel AMX相当的计算吞吐量与内存带宽时,我们的设计在ResNet、BERT和Llama3上分别实现了1.57倍、1.57倍和2.31倍的加速比,其中超过30%的性能提升归因于矩阵-向量重叠执行。在14nm CMOS工艺下,一个4 TOPS@2GHz的矩阵单元仅占用0.53 mm\textsuperscript{2}面积。这些结果证明了该架构强大的跨平台适应能力与有效的软硬件协同优化效果,为开源社区提供了一种实用的矩阵扩展方案。

0
下载
关闭预览

相关内容

《面向大规模决策的分布式优化架构》247页
专知会员服务
24+阅读 · 5月12日
【NeurIPS2023】矩阵压缩通过随机低秩和低精度分解
专知会员服务
31+阅读 · 2023年10月22日
专知会员服务
19+阅读 · 2021年6月29日
专知会员服务
66+阅读 · 2021年5月2日
FPGA加速系统开发工具设计:综述与实践
专知会员服务
69+阅读 · 2020年6月24日
综述:军事应用中使用的一些重要算法
专知
13+阅读 · 2022年7月3日
盘点来自工业界的GPU共享方案
计算机视觉life
12+阅读 · 2021年9月2日
如何设计基于深度学习的图像压缩算法
论智
41+阅读 · 2018年4月26日
Spark机器学习:矩阵及推荐算法
LibRec智能推荐
16+阅读 · 2017年8月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
重新思考无人机时代的生存能力
专知会员服务
0+阅读 · 今天7:44
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
0+阅读 · 今天7:28
在人工智能加速决策环境中拓展OODA循环
专知会员服务
1+阅读 · 今天7:18
军事欺骗:供作战战术指挥官使用的工具
专知会员服务
1+阅读 · 今天7:03
综述 | 世界动作模型:少做梦,多行动
专知会员服务
4+阅读 · 6月23日
美以伊冲突:无人机与人工智能的运用
专知会员服务
7+阅读 · 6月23日
《特种部队在透明战场中的生存力》最新报告
专知会员服务
4+阅读 · 6月23日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员