Finch: Sparse and Structured Array Programming with Control Flow

Willow Ahrens, Teodoro Fields Collin, Radha Patel, Kyle Deeds, Changwan Hong, Saman Amarasinghe
{"title":"Finch: Sparse and Structured Array Programming with Control Flow","authors":"Willow Ahrens, Teodoro Fields Collin, Radha Patel, Kyle Deeds, Changwan Hong, Saman Amarasinghe","doi":"arxiv-2404.16730","DOIUrl":null,"url":null,"abstract":"From FORTRAN to NumPy, arrays have revolutionized how we express computation.\nHowever, arrays in these, and almost all prominent systems, can only handle\ndense rectilinear integer grids. Real world arrays often contain underlying\nstructure, such as sparsity, runs of repeated values, or symmetry. Support for\nstructured data is fragmented and incomplete. Existing frameworks limit the\narray structures and program control flow they support to better simplify the\nproblem. In this work, we propose a new programming language, Finch, which supports\nboth flexible control flow and diverse data structures. Finch facilitates a\nprogramming model which resolves the challenges of computing over structured\narrays by combining control flow and data structures into a common\nrepresentation where they can be co-optimized. Finch automatically specializes\ncontrol flow to data so that performance engineers can focus on experimenting\nwith many algorithms. Finch supports a familiar programming language of loops,\nstatements, ifs, breaks, etc., over a wide variety of array structures, such as\nsparsity, run-length-encoding, symmetry, triangles, padding, or blocks. Finch\nreliably utilizes the key properties of structure, such as structural zeros,\nrepeated values, or clustered non-zeros. We show that this leads to dramatic\nspeedups in operations such as SpMV and SpGEMM, image processing, graph\nanalytics, and a high-level tensor operator fusion interface.","PeriodicalId":501256,"journal":{"name":"arXiv - CS - Mathematical Software","volume":"50 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-04-25","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-2404.16730","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

From FORTRAN to NumPy, arrays have revolutionized how we express computation. However, arrays in these, and almost all prominent systems, can only handle dense rectilinear integer grids. Real world arrays often contain underlying structure, such as sparsity, runs of repeated values, or symmetry. Support for structured data is fragmented and incomplete. Existing frameworks limit the array structures and program control flow they support to better simplify the problem. In this work, we propose a new programming language, Finch, which supports both flexible control flow and diverse data structures. Finch facilitates a programming model which resolves the challenges of computing over structured arrays by combining control flow and data structures into a common representation where they can be co-optimized. Finch automatically specializes control flow to data so that performance engineers can focus on experimenting with many algorithms. Finch supports a familiar programming language of loops, statements, ifs, breaks, etc., over a wide variety of array structures, such as sparsity, run-length-encoding, symmetry, triangles, padding, or blocks. Finch reliably utilizes the key properties of structure, such as structural zeros, repeated values, or clustered non-zeros. We show that this leads to dramatic speedups in operations such as SpMV and SpGEMM, image processing, graph analytics, and a high-level tensor operator fusion interface.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
芬奇稀疏和结构化数组编程与控制流
从 FORTRAN 到 NumPy,数组彻底改变了我们表达计算的方式。然而,这些系统以及几乎所有著名系统中的数组只能处理直线整数网格。现实世界中的数组通常包含底层结构,例如稀疏性、重复值运行或对称性。对结构化数据的支持既零散又不完整。为了更好地简化问题,现有框架限制了所支持的数组结构和程序控制流。在这项工作中,我们提出了一种新的编程语言 Finch,它同时支持灵活的控制流和多样化的数据结构。Finch 将控制流和数据结构结合到一个共同的表示形式中,从而解决了在结构化数组上进行计算所面临的挑战。Finch 自动将控制流专门化为数据,这样性能工程师就可以专注于试验多种算法。Finch 支持由循环、语句、ifs、断点等组成的熟悉编程语言,并支持多种数组结构,如稀疏性、运行长度编码、对称性、三角形、填充或块。Finch 能可靠地利用结构的关键属性,如结构零、重复值或聚类非零。我们的研究表明,这极大地加快了 SpMV 和 SpGEMM、图像处理、图形分析以及高级张量算子融合界面等操作的速度。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
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