Support of Sparse Tensor Computing for MLIR HLS

Geng-Ming Liang, Chao-Lin Lee, Robert Lai, Jenq-Kuen Lee
{"title":"Support of Sparse Tensor Computing for MLIR HLS","authors":"Geng-Ming Liang, Chao-Lin Lee, Robert Lai, Jenq-Kuen Lee","doi":"10.1145/3605731.3605908","DOIUrl":null,"url":null,"abstract":"Nowadays, sparse tensor computations are widely used in machine learning. Without the multiplications in zero values, sparse tensor computation can significantly reduce the latency and power consumption. Famous frameworks like TensorFlow, PyTorch, Pandas, etc., already have the support of sparse tensor computing. MLIR also integrated this idea and implemented the compilation flow. Integrating sparse tensor computing and MLIR into High-level Synthesis (HLS) can generate more powerful RTL and further implement specified hardware. However, MLIR flow isn’t well done now while translating into LLVM IR and does not fully support HLS tools, which are not supporting MLIR. In this paper, we propose a flow in MLIR to lower sparse tensor computations into HLS-readable LLVM IR, which can then be synthesized into RTL. To demonstrate the effectiveness of our proposed flow, we devise experiments by implementing matrix multiplication operations in the convolution layers, and the data is pruned to maximize the sparsity. Our proposed flow speeds up the latency by about 3.6 times, as demonstrated in our experiment with Xilinx Vitis HLS.","PeriodicalId":102039,"journal":{"name":"Proceedings of the 52nd International Conference on Parallel Processing Workshops","volume":"41 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-08-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 52nd International Conference on Parallel Processing Workshops","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3605731.3605908","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Nowadays, sparse tensor computations are widely used in machine learning. Without the multiplications in zero values, sparse tensor computation can significantly reduce the latency and power consumption. Famous frameworks like TensorFlow, PyTorch, Pandas, etc., already have the support of sparse tensor computing. MLIR also integrated this idea and implemented the compilation flow. Integrating sparse tensor computing and MLIR into High-level Synthesis (HLS) can generate more powerful RTL and further implement specified hardware. However, MLIR flow isn’t well done now while translating into LLVM IR and does not fully support HLS tools, which are not supporting MLIR. In this paper, we propose a flow in MLIR to lower sparse tensor computations into HLS-readable LLVM IR, which can then be synthesized into RTL. To demonstrate the effectiveness of our proposed flow, we devise experiments by implementing matrix multiplication operations in the convolution layers, and the data is pruned to maximize the sparsity. Our proposed flow speeds up the latency by about 3.6 times, as demonstrated in our experiment with Xilinx Vitis HLS.
稀疏张量计算对MLIR HLS的支持
目前,稀疏张量计算在机器学习中得到了广泛的应用。稀疏张量计算无需在零值中进行乘法运算,可以显著降低延迟和功耗。著名的框架,如TensorFlow, PyTorch, Pandas等,已经有了稀疏张量计算的支持。MLIR也整合了这一思想并实现了编译流程。将稀疏张量计算和MLIR集成到高级综合(High-level Synthesis, HLS)中可以生成更强大的RTL,并进一步实现特定的硬件。然而,目前在转换为LLVM IR时,MLIR流并没有很好地完成,并且不完全支持不支持MLIR的HLS工具。在本文中,我们提出了一种MLIR流程,将稀疏张量计算降低到hls可读的LLVM IR中,然后将其合成为RTL。为了证明我们提出的流程的有效性,我们通过在卷积层中实现矩阵乘法操作来设计实验,并对数据进行修剪以最大化稀疏性。正如我们在Xilinx Vitis HLS的实验中所证明的那样,我们提出的流将延迟速度提高了约3.6倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术文献互助群
群 号:604180095
Book学术官方微信
小红书