在英特尔、AMD和富士通处理器上批量、小矩阵和矩形矩阵乘法的缓存优化和性能建模

Sameer Deshmukh, Rio Yokota, George Bosilca
{"title":"在英特尔、AMD和富士通处理器上批量、小矩阵和矩形矩阵乘法的缓存优化和性能建模","authors":"Sameer Deshmukh, Rio Yokota, George Bosilca","doi":"arxiv-2311.07602","DOIUrl":null,"url":null,"abstract":"Factorization and multiplication of dense matrices and tensors are critical,\nyet extremely expensive pieces of the scientific toolbox. Careful use of low\nrank approximation can drastically reduce the computation and memory\nrequirements of these operations. In addition to a lower arithmetic complexity,\nsuch methods can, by their structure, be designed to efficiently exploit modern\nhardware architectures. The majority of existing work relies on batched BLAS\nlibraries to handle the computation of many small dense matrices. We show that\nthrough careful analysis of the cache utilization, register accumulation using\nSIMD registers and a redesign of the implementation, one can achieve\nsignificantly higher throughput for these types of batched low-rank matrices\nacross a large range of block and batch sizes. We test our algorithm on 3 CPUs\nusing diverse ISAs -- the Fujitsu A64FX using ARM SVE, the Intel Xeon 6148\nusing AVX-512 and AMD EPYC 7502 using AVX-2, and show that our new batching\nmethodology is able to obtain more than twice the throughput of vendor\noptimized libraries for all CPU architectures and problem sizes.","PeriodicalId":501256,"journal":{"name":"arXiv - CS - Mathematical Software","volume":"10 4","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-11-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Cache Optimization and Performance Modeling of Batched, Small, and Rectangular Matrix Multiplication on Intel, AMD, and Fujitsu Processors\",\"authors\":\"Sameer Deshmukh, Rio Yokota, George Bosilca\",\"doi\":\"arxiv-2311.07602\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Factorization and multiplication of dense matrices and tensors are critical,\\nyet extremely expensive pieces of the scientific toolbox. Careful use of low\\nrank approximation can drastically reduce the computation and memory\\nrequirements of these operations. In addition to a lower arithmetic complexity,\\nsuch methods can, by their structure, be designed to efficiently exploit modern\\nhardware architectures. The majority of existing work relies on batched BLAS\\nlibraries to handle the computation of many small dense matrices. We show that\\nthrough careful analysis of the cache utilization, register accumulation using\\nSIMD registers and a redesign of the implementation, one can achieve\\nsignificantly higher throughput for these types of batched low-rank matrices\\nacross a large range of block and batch sizes. We test our algorithm on 3 CPUs\\nusing diverse ISAs -- the Fujitsu A64FX using ARM SVE, the Intel Xeon 6148\\nusing AVX-512 and AMD EPYC 7502 using AVX-2, and show that our new batching\\nmethodology is able to obtain more than twice the throughput of vendor\\noptimized libraries for all CPU architectures and problem sizes.\",\"PeriodicalId\":501256,\"journal\":{\"name\":\"arXiv - CS - Mathematical Software\",\"volume\":\"10 4\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-11-11\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Mathematical Software\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2311.07602\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Mathematical Software","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2311.07602","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

密集矩阵和张量的因式分解和乘法是科学工具箱中至关重要但又极其昂贵的部分。仔细使用低秩近似可以大大减少这些操作的计算和内存需求。除了较低的算术复杂度外,这些方法还可以通过其结构设计来有效地利用现代硬件体系结构。现有的大部分工作依赖于批处理的BLASlibraries来处理许多小的密集矩阵的计算。我们表明,通过仔细分析缓存利用率、使用simd寄存器的寄存器积累和重新设计实现,可以在大范围的块和批大小中实现这些类型的批处理低秩矩阵的显着更高的吞吐量。我们使用不同的isa在3个CPU上测试我们的算法-使用ARM SVE的富士通A64FX,使用AVX-512的英特尔至强6148和使用AVX-2的AMD EPYC 7502,并表明我们的新批处理方法能够获得超过两倍的吞吐量供应商优化库对于所有CPU架构和问题大小。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Cache Optimization and Performance Modeling of Batched, Small, and Rectangular Matrix Multiplication on Intel, AMD, and Fujitsu Processors
Factorization and multiplication of dense matrices and tensors are critical, yet extremely expensive pieces of the scientific toolbox. Careful use of low rank approximation can drastically reduce the computation and memory requirements of these operations. In addition to a lower arithmetic complexity, such methods can, by their structure, be designed to efficiently exploit modern hardware architectures. The majority of existing work relies on batched BLAS libraries to handle the computation of many small dense matrices. We show that through careful analysis of the cache utilization, register accumulation using SIMD registers and a redesign of the implementation, one can achieve significantly higher throughput for these types of batched low-rank matrices across a large range of block and batch sizes. We test our algorithm on 3 CPUs using diverse ISAs -- the Fujitsu A64FX using ARM SVE, the Intel Xeon 6148 using AVX-512 and AMD EPYC 7502 using AVX-2, and show that our new batching methodology is able to obtain more than twice the throughput of vendor optimized libraries for all CPU architectures and problem sizes.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A prony method variant which surpasses the Adaptive LMS filter in the output signal's representation of input TorchDA: A Python package for performing data assimilation with deep learning forward and transformation functions HOBOTAN: Efficient Higher Order Binary Optimization Solver with Tensor Networks and PyTorch MPAT: Modular Petri Net Assembly Toolkit Enabling MPI communication within Numba/LLVM JIT-compiled Python code using numba-mpi v1.0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1