Simplifying dependent reductions in the polyhedral model

Author:

Yang Cambridge1,Atkinson Eric1,Carbin Michael1

Affiliation:

1. Massachusetts Institute of Technology, USA

Abstract

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 sums, 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 dependent statements. In such cases, existing approaches can generate incorrect code that violates the data dependences of the original, unoptimized program. In this work, we identify and formalize the optimization of dependent reductions as an integer bilinear program. We present a heuristic optimization algorithm that uses an affine sequential schedule of the program to determine how to simplfy reductions yet still preserve the program’s dependences. 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. 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 speedups in wall-clock time that range from 1.1x to over 10 6 x.

Funder

Office of Naval Research

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference69 articles.

1. Multi-dimensional Rankings, Program Termination, and Complexity Bounds of Flowchart Programs

2. Eric Atkinson Cambridge Yang and Michael Carbin. 2018. Verifying Handcoded Probabilistic Inference Procedures. In arXiv e-prints. Eric Atkinson Cambridge Yang and Michael Carbin. 2018. Verifying Handcoded Probabilistic Inference Procedures. In arXiv e-prints.

3. Cython: The Best of Both Worlds

4. The Polyhedral Model Is More Widely Applicable Than You Think

5. Pyro: Deep Universal Probabilistic Programming;Bingham Eli;Journal of Machine Learning Research,2019

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. (De/Re)-Composition of Data-Parallel Computations via Multi-Dimensional Homomorphisms;ACM Transactions on Programming Languages and Systems;2024-05-22

2. Compiling Recurrences over Dense and Sparse Arrays;Proceedings of the ACM on Programming Languages;2024-04-29

3. mlirSynth: Automatic, Retargetable Program Raising in Multi-Level IR Using Program Synthesis;2023 32nd International Conference on Parallel Architectures and Compilation Techniques (PACT);2023-10-21

4. (De/Re)-Compositions Expressed Systematically via MDH-Based Schedules;Proceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction;2023-02-17

5. Parallelizing Neural Network Models Effectively on GPU by Implementing Reductions Atomically;Proceedings of the International Conference on Parallel Architectures and Compilation Techniques;2022-10-08

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3