{"title":"芬奇稀疏和结构化数组编程与控制流","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":"{\"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}","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}
Finch: Sparse and Structured Array Programming with Control Flow
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.