Sparsity-Aware Autoscheduling for Numpy with Finch and Galley
Multidimensional tensor frameworks like Numpy or Tensorflow have revolutionized how we express computation. Over the last decade, compilers have expanded dense programming interfaces to capture sparse datastructures. Generating code for sparse programs is uniquely challenging, requiring flexible traversal orders, intersection and union algorithms, datastructures, and fused operations. Sparse performance depends on a complex set of factors, including the sparsity patterns of the inputs at runtime. Existing frameworks struggle to support and navigate the wide variety of possible implementations.
In this work, we present Galley, an autoscheduler for the Finch sparse tensor compiler. The user can write ordinary Numpy code over sparse arrays. Galley automatically makes high-level implementation decisions, and Finch translates them to efficient low-level code. Galley uses state-of-the-art database cardinality estimation techniques to estimate the cost of sparse tensor operations based on the observed sparsity patterns. The process starts by evaluating fusion opportunities at the “logical layer,” then moves on to more granular details like loop ordering and format selection in the “physical layer.” Together, Galley and Finch provide a declarative system for sparse tensor programming that achieves high performance on a wide variety of problems including machine learning algorithms, subgraph counting, and iterative graph algorithms.
Willow Ahrens is a Ph.D. student at MIT studying tensor compilers, advised by Saman Amarasinghe and graduating this year. She is the developer of Finch, a productive datastructure-driven array programming language. Willow received her BS in Computer Science with a minor in Mathematics from University of California, Berkeley. Willow is a Department of Energy Computational Science Graduate Fellow, and values scientific applications. Willow is also a glassblower, and teaches first-time glassblowers at the MIT Glass Lab.
Mon 16 JunDisplayed time zone: Seoul change
14:00 - 15:20 | |||
14:00 20mTalk | PyData/Sparse & Finch: extending sparse computing in the Python ecosystem Sparse | ||
14:20 20mTalk | Compiling and Compressing Structured TensorsRecorded Sparse | ||
14:40 20mTalk | Sparsity-Aware Autoscheduling for Numpy with Finch and Galley Sparse Willow Ahrens Massachusetts Institute of Technology | ||
15:00 20mTalk | Panel 3 Sparse Hameer Abbasi Quansight, Emilien Bauer , Willow Ahrens Massachusetts Institute of Technology, Mateusz Sokol Quansight Labs | ||
