Compilation of Shape Operators on Sparse Arrays

We show how to build a compiler for a sparse array language that supports shape operators such as reshaping or concatenating arrays, in addition to compute operators. Existing sparse array programming systems implement generic shape operators for only some sparse data structures, reduce shape operators on other data structures to those, and do not support fusion. Our system compiles sparse array expressions to code that efficiently iterates over reshaped views of irregular sparse data structures, without needing to materialize temporary storage for intermediates. Our evaluation shows that our approach generates sparse array code competitive with popular sparse array libraries: our generated shape operators achieve geometric mean speed-ups of 1.66×–15.3× when compared to hand-written kernels in scipy.sparse and 1.67×–651× when compared to generic implementations in pydata/sparse . For operators that require data structure conversions in these libraries, our generated code achieves geometric mean speed-ups of 7.29×–13.0× when compared to scipy.sparse and 21.3×–511× when compared to pydata/sparse . Finally, our evaluation demonstrates that fusing shape and compute operators improves the performance of several expressions by geometric mean speed-ups of 1.22×–2.23×.

Authors

Institutions

Publication Details

Journal
Proceedings of the ACM on Programming Languages
Published
2024-10-08
DOI
https://doi.org/10.1145/3689752
Citations
1
Primary Topic
Advanced Data Compression Techniques
Type
article
Field-Weighted Citation Impact
0.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Compilation of Shape Operators on Sparse Arrays

Bobby Yan, Peiming Liu, Alexander J Root, Fredrik Kjølstad et al.
1 citations
Proceedings of the ACM on Programming Languages
Advanced Data Compression Techniques
0.25
article

Compilation of Shape Operators on Sparse Arrays

Bobby Yan, Peiming Liu, Alexander J Root, Fredrik Kjølstad, Aart J. C. Bik, Christophe Gyurgyik
article en
1 citations

Abstract

We show how to build a compiler for a sparse array language that supports shape operators such as reshaping or concatenating arrays, in addition to compute operators. Existing sparse array programming systems implement generic shape operators for only some sparse data structures, reduce shape operators on other data structures to those, and do not support fusion. Our system compiles sparse array expressions to code that efficiently iterates over reshaped views of irregular sparse data structures, without needing to materialize temporary storage for intermediates. Our evaluation shows that our approach generates sparse array code competitive with popular sparse array libraries: our generated shape operators achieve geometric mean speed-ups of 1.66×–15.3× when compared to hand-written kernels in scipy.sparse and 1.67×–651× when compared to generic implementations in pydata/sparse . For operators that require data structure conversions in these libraries, our generated code achieves geometric mean speed-ups of 7.29×–13.0× when compared to scipy.sparse and 21.3×–511× when compared to pydata/sparse . Finally, our evaluation demonstrates that fusing shape and compute operators improves the performance of several expressions by geometric mean speed-ups of 1.22×–2.23×.

Proceedings of the ACM on Programming LanguagesVol. 8(OOPSLA2)
Google (United States) (US), Seattle University (US), Stanford University (US)
Openalex Percentile: Top 46%
Advanced Data Compression Techniques
0.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Compilation of Shape Operators on Sparse Arrays — Bobby Yan, Peiming Liu, et al. · Proceedings of the ACM on Programming Languages (2024) | TGRS Research Map | TGRS