用Exo处理矩阵乘法微核生成

Adrián Castelló, Julian Bellavita, Grace Dinh, Yuka Ikarashi, Héctor Martínez
{"title":"用Exo处理矩阵乘法微核生成","authors":"Adrián Castelló, Julian Bellavita, Grace Dinh, Yuka Ikarashi, Héctor Martínez","doi":"arxiv-2310.17408","DOIUrl":null,"url":null,"abstract":"The optimization of the matrix multiplication (or GEMM) has been a need\nduring the last decades. This operation is considered the flagship of current\nlinear algebra libraries such as BLIS, OpenBLAS, or Intel OneAPI because of its\nwidespread use in a large variety of scientific applications. The GEMM is\nusually implemented following the GotoBLAS philosophy, which tiles the GEMM\noperands and uses a series of nested loops for performance improvement. These\napproaches extract the maximum computational power of the architectures through\nsmall pieces of hardware-oriented, high-performance code called micro-kernel.\nHowever, this approach forces developers to generate, with a non-negligible\neffort, a dedicated micro-kernel for each new hardware. In this work, we present a step-by-step procedure for generating\nmicro-kernels with the Exo compiler that performs close to (or even better\nthan) manually developed microkernels written with intrinsic functions or\nassembly language. Our solution also improves the portability of the generated\ncode, since a hardware target is fully specified by a concise library-based\ndescription of its instructions.","PeriodicalId":501256,"journal":{"name":"arXiv - CS - Mathematical Software","volume":"11 4","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-10-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Tackling the Matrix Multiplication Micro-kernel Generation with Exo\",\"authors\":\"Adrián Castelló, Julian Bellavita, Grace Dinh, Yuka Ikarashi, Héctor Martínez\",\"doi\":\"arxiv-2310.17408\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The optimization of the matrix multiplication (or GEMM) has been a need\\nduring the last decades. This operation is considered the flagship of current\\nlinear algebra libraries such as BLIS, OpenBLAS, or Intel OneAPI because of its\\nwidespread use in a large variety of scientific applications. The GEMM is\\nusually implemented following the GotoBLAS philosophy, which tiles the GEMM\\noperands and uses a series of nested loops for performance improvement. These\\napproaches extract the maximum computational power of the architectures through\\nsmall pieces of hardware-oriented, high-performance code called micro-kernel.\\nHowever, this approach forces developers to generate, with a non-negligible\\neffort, a dedicated micro-kernel for each new hardware. In this work, we present a step-by-step procedure for generating\\nmicro-kernels with the Exo compiler that performs close to (or even better\\nthan) manually developed microkernels written with intrinsic functions or\\nassembly language. Our solution also improves the portability of the generated\\ncode, since a hardware target is fully specified by a concise library-based\\ndescription of its instructions.\",\"PeriodicalId\":501256,\"journal\":{\"name\":\"arXiv - CS - Mathematical Software\",\"volume\":\"11 4\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-10-26\",\"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-2310.17408\",\"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-2310.17408","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

在过去的几十年中,矩阵乘法(GEMM)的优化一直是一种需求。该操作被认为是当前线性代数库(如BLIS、OpenBLAS或Intel OneAPI)的旗舰,因为它在各种科学应用中广泛使用。GEMM通常遵循GotoBLAS理念实现,该理念将gemmooperands进行平装,并使用一系列嵌套循环来提高性能。这些方法通过称为微内核的面向硬件的小块高性能代码提取体系结构的最大计算能力。然而,这种方法迫使开发人员付出不可忽视的努力,为每个新硬件生成一个专用的微内核。在这项工作中,我们提出了一个逐步使用Exo编译器生成微内核的过程,该编译器的性能接近(甚至优于)用内在函数或汇编语言编写的手动开发的微内核。我们的解决方案还提高了生成代码的可移植性,因为硬件目标完全由其指令的简洁的基于库的描述指定。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Tackling the Matrix Multiplication Micro-kernel Generation with Exo
The optimization of the matrix multiplication (or GEMM) has been a need during the last decades. This operation is considered the flagship of current linear algebra libraries such as BLIS, OpenBLAS, or Intel OneAPI because of its widespread use in a large variety of scientific applications. The GEMM is usually implemented following the GotoBLAS philosophy, which tiles the GEMM operands and uses a series of nested loops for performance improvement. These approaches extract the maximum computational power of the architectures through small pieces of hardware-oriented, high-performance code called micro-kernel. However, this approach forces developers to generate, with a non-negligible effort, a dedicated micro-kernel for each new hardware. In this work, we present a step-by-step procedure for generating micro-kernels with the Exo compiler that performs close to (or even better than) manually developed microkernels written with intrinsic functions or assembly language. Our solution also improves the portability of the generated code, since a hardware target is fully specified by a concise library-based description of its instructions.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信