Simplifying Multiple-Statement Reductions with the Polyhedral Model

07/22/2020
by   Cambridge Yang, et al.
0

A Reduction – an accumulation over a set of values, using an associative and commutative operator – is a common computation in many numerical computations, including scientific computations, machine learning, computer vision, and financial analytics. Contemporary polyhedral-based compilation techniques make it possible to optimize reductions, such as prefix sum, in which each component of the reduction's output potentially shares computation with another component in the reduction. Therefore an optimizing compiler can identify the computation shared between multiple components and generate code that computes the shared computation only once. These techniques, however, do not support reductions that – when phrased in the language of the polyhedral model – span multiple statements. In such cases, existing approaches can generate incorrect code that violates the data dependencies of the original, unoptimized program. In this work, we identify and formalize the multiple­/statement reduction problem as a bilinear optimization problem. We present a heuristic optimization algorithm for these reductions, and we demonstrate that the algorithm provides optimal complexity for a set of benchmark programs from the literature on probabilistic inference algorithms, whose performance critically relies on simplifying these reductions. Specifically, the complexities for 10 of the 11 programs improve siginifcantly by factors at least of the sizes of the input data, which are in the range of 10^4 to 10^6 for typical real application inputs. We also confirm the significance of the improvement by showing that the speedups in wall-clock time range from 1.1x to over 10^7x.

READ FULL TEXT
research
01/18/2018

Scheduling and Tiling Reductions on Realistic Machines

Computations, where the number of results is much smaller than the input...
research
09/21/2023

Maximal Simplification of Polyhedral Reductions

Reductions combine multiple input values with an associative operator to...
research
10/06/2020

On Simplifying Dependent Polyhedral Reductions

Reductions combine collections of input values with an associative (and ...
research
04/14/2021

Dimension-Preserving Reductions Between SVP and CVP in Different p-Norms

We show a number of reductions between the Shortest Vector Problem and t...
research
11/19/2017

Verification of PCP-Related Computational Reductions in Coq

We formally verify several computational reductions concerning the Post ...
research
01/27/2023

Exact linear reductions of dynamical models

Dynamical models described by ordinary differential equations (ODEs) are...
research
03/17/2016

Optimal Black-Box Reductions Between Optimization Objectives

The diverse world of machine learning applications has given rise to a p...

Please sign up or login with your details

Forgot password? Click here to reset