Vectorizing Recurrences over Semirings
Yihong Zhang, Bala Vinaithirthan, Karima Ma, Zachary Tatlock, Maaz Bin Safeer Ahmad, Andrew Adams
Key points
From the paper's conclusion- We implement the recurrence algebra and the vectorizing transformations in a compiler called VecRec.VecRec compiles recurrence programs to efficient vectorized C++ implementations.
Abstract
Recurrences are ubiquitous in signal and image processing, bioinformatics, numerical computing, combinatorial optimization, and many other domains. Because recurrences seem inherently sequential, they are often implemented serially and thus do not leverage vector instructions in modern hardware. This leaves much of the available, often highly parallel, hardware underutilized. In this paper, we present an algebra of recurrences over semirings and study algebraic identities that enable vectorization. Using our algebraic framework, we present a number of vectorizing transformations that yield efficient, vectorized implementations across various settings. These transformations naturally extend to 2D recurrences and mutual recurrences. We implement the recurrence algebra and the vectorizing transformations in a compiler called VecRec.VecRec compiles recurrence programs to efficient vectorized C++ implementations. The generated kernels can achieve up to an order-of-magnitude speedup over serial implementations across a wide variety of recurrences. A case study in bioinformatics shows that they are competitive with, and in many cases better than, existing libraries with manually-crafted vectorization.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Cyclotron: A Recurrence Language for Expressing Interprocessor CommunicationarXiv · 2026
- Filtr: Compiling Bioinformatics RecurrencesProceedings of the ACM on Programming Languages · 2026
- Ziv: A Language for Correctly Rounded Math LibrariesarXiv · 2026
- Compiling Semi-Ring Dynamic Programming to Tier-Aware 3D-DRAM Processing-in-MemoryarXiv · 2026
- Energy-Efficient SIMD-Accelerated Expression Parsing: A Cross-Architectural Microarchitectural Analysis in Managed EnvironmentsJournal of Low Power Electronics and Applications · 2026
- Rethinking Sparse Formats for RISC-V: A Hierarchical Approach to High-Performance SpMVarXiv · 2026