Fusing the Polyhedral and Tensor Compilers to Accelerate Scientific Computing Kernels

IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Qingzhi Liu, Changbo Chen, Hanwen Dai
{"title":"Fusing the Polyhedral and Tensor Compilers to Accelerate Scientific Computing Kernels","authors":"Qingzhi Liu,&nbsp;Changbo Chen,&nbsp;Hanwen Dai","doi":"10.1002/cpe.70164","DOIUrl":null,"url":null,"abstract":"<div>\n \n <p>Polyhedral compilers and tensor compilers have achieved great success on accelerating scientific computing kernels and deep learning networks, respectively. Although much work has been done to integrate techniques of the polyhedral model to tensor compilers for accelerating deep learning, leveraging the powerful auto-tuning ability of modern tensor compilers to accelerate more general scientific computing kernels is challenging and is still at its dawn. In this work, we introduce a method to accelerate a family of basic scientific computing kernels by fusing the polyhedral compiler Pluto and the tensor compiler Tensor Virtual Machine (TVM) to generate efficient implementations targeting the heterogeneous CPU/GPU platform. The fusion is done in four steps: building a polyhedral model for the loop description of a given scientific kernel; designing schedules to transform the polyhedral model to new ones to enable rectangular tiling and expose explicit parallelism; selecting a new polyhedral model and converting it to the tensor compute representation; auto-tuning the tensor compute to generate efficient implementations on both CPUs and GPUs. Shifting and padding optimizations are also considered to avoid conditionals. Experiments on 30 typical scientific computing kernels show that our method achieves <span></span><math>\n <semantics>\n <mrow>\n <mn>3</mn>\n <mo>.</mo>\n <mn>31</mn>\n <mo>×</mo>\n </mrow>\n <annotation>$$ 3.31\\times $$</annotation>\n </semantics></math> speedup on average over a typical polyhedral compiler PPCG on GPU.</p>\n </div>","PeriodicalId":55214,"journal":{"name":"Concurrency and Computation-Practice & Experience","volume":"37 15-17","pages":""},"PeriodicalIF":1.5000,"publicationDate":"2025-06-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Concurrency and Computation-Practice & Experience","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/cpe.70164","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Polyhedral compilers and tensor compilers have achieved great success on accelerating scientific computing kernels and deep learning networks, respectively. Although much work has been done to integrate techniques of the polyhedral model to tensor compilers for accelerating deep learning, leveraging the powerful auto-tuning ability of modern tensor compilers to accelerate more general scientific computing kernels is challenging and is still at its dawn. In this work, we introduce a method to accelerate a family of basic scientific computing kernels by fusing the polyhedral compiler Pluto and the tensor compiler Tensor Virtual Machine (TVM) to generate efficient implementations targeting the heterogeneous CPU/GPU platform. The fusion is done in four steps: building a polyhedral model for the loop description of a given scientific kernel; designing schedules to transform the polyhedral model to new ones to enable rectangular tiling and expose explicit parallelism; selecting a new polyhedral model and converting it to the tensor compute representation; auto-tuning the tensor compute to generate efficient implementations on both CPUs and GPUs. Shifting and padding optimizations are also considered to avoid conditionals. Experiments on 30 typical scientific computing kernels show that our method achieves 3 . 31 × $$ 3.31\times $$ speedup on average over a typical polyhedral compiler PPCG on GPU.

融合多面体和张量编译器加速科学计算内核
多面体编译器和张量编译器分别在加速科学计算内核和深度学习网络方面取得了巨大成功。尽管在将多面体模型技术集成到张量编译器中以加速深度学习方面已经做了很多工作,但利用现代张量编译器强大的自动调优能力来加速更通用的科学计算内核是具有挑战性的,而且仍处于起步阶段。在这项工作中,我们介绍了一种方法,通过融合多面体编译器Pluto和张量编译器tensor Virtual Machine (TVM)来加速一系列基础科学计算内核,以生成针对异构CPU/GPU平台的高效实现。该融合分为四个步骤:为给定科学核的循环描述建立多面体模型;设计时间表,将多面体模型转换为新的模型,使矩形平铺和暴露明确的并行性;选择一个新的多面体模型并将其转换为张量计算表示;自动调整张量计算以在cpu和gpu上生成高效的实现。移位和填充优化也被认为可以避免条件。在30个典型的科学计算核上的实验表明,我们的方法达到了3。在GPU上,比典型的多面体编译器PPCG平均加速31倍$$ 3.31\times $$。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Concurrency and Computation-Practice & Experience
Concurrency and Computation-Practice & Experience 工程技术-计算机:理论方法
CiteScore
5.00
自引率
10.00%
发文量
664
审稿时长
9.6 months
期刊介绍: Concurrency and Computation: Practice and Experience (CCPE) publishes high-quality, original research papers, and authoritative research review papers, in the overlapping fields of: Parallel and distributed computing; High-performance computing; Computational and data science; Artificial intelligence and machine learning; Big data applications, algorithms, and systems; Network science; Ontologies and semantics; Security and privacy; Cloud/edge/fog computing; Green computing; and Quantum computing.
×
引用
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学术文献互助群
群 号:604180095
Book学术官方微信