skip to main content
10.1145/3192366.3192401acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Polyhedral auto-transformation with no integer linear programming

Published: 11 June 2018 Publication History

Abstract

State-of-the-art algorithms used in automatic polyhedral transformation for parallelization and locality optimization typically rely on Integer Linear Programming (ILP). This poses a scalability issue when scaling to tens or hundreds of statements, and may be disconcerting in production compiler settings. In this work, we consider relaxing integrality in the ILP formulation of the Pluto algorithm, a popular algorithm used to find good affine transformations. We show that the rational solutions obtained from the relaxed LP formulation can easily be scaled to valid integral ones to obtain desired solutions, although with some caveats. We first present formal results connecting the solution of the relaxed LP to the original Pluto ILP. We then show that there are difficulties in realizing the above theoretical results in practice, and propose an alternate approach to overcome those while still leveraging linear programming. Our new approach obtains dramatic compile-time speedups for a range of large benchmarks. While achieving these compile-time improvements, we show that the performance of the transformed code is not sacrificed. Our approach to automatic transformation provides a mean compilation time improvement of 5.6× over state-of-the-art on relevant challenging benchmarks from the NAS PB, SPEC CPU 2006, and PolyBench suites. We also came across situations where prior frameworks failed to find a transformation in a reasonable amount of time, while our new approach did so instantaneously.

Supplementary Material

WEBM File (p529-acharya.webm)

References

[1]
Aravind Acharya, Uday Bondhugula, and Albert Cohen. 2018. An Approach for Finding Permutations Quickly: Fusion and Dimension matching. CoRR abs/1803.10726 (2018). arXiv: 1312.1070 http://arxiv.org/abs/1803.10726
[2]
Mohamed Riyadh Baghdadi. 2015. Improving tiling, reducing compilation time, and extending the scope of polyhedral compilation. Ph.D. Dissertation. Université Pierre et Marie Curie - Paris VI. https://tel.archives-ouvertes.fr/tel-01270558
[3]
Cédric Bastoul. 2004. Clan: The Chunky Loop Analyzer. (2004). The Clan user guide.
[4]
Uday Bondhugula, Aravind Acharya, and Albert Cohen. 2016. The Pluto+ Algorithm: A Practical Approach for Parallelization and Locality Optimization of Affine Loop Nests. ACM Trans. Program. Lang. Syst. 38, 3, Article 12 (April 2016), 32 pages.
[5]
Uday Bondhugula, M. Baskaran, Sriram Krishnamoorthy, J. Ramanujam, A. Rountev, and P. Sadayappan. 2008. Automatic Transformations for Communication-Minimized Parallelization and Locality Optimization in the Polyhedral Model. In International conference on Compiler Construction (ETAPS CC).
[6]
Uday Bondhugula, Albert Hartono, J. Ramanujam, and P. Sadayappan. 2008. A practical automatic polyhedral parallelizer and locality optimizer. In ACM SIGPLAN symposium on Programming Languages Design and Implementation (PLDI). 101–113.
[7]
P. Feautrier. 1992. Some efficient solutions to the affine scheduling problem: Part I, One-dimensional time. International Journal of Parallel Programming 21, 5 (1992), 313–348.
[8]
P. Feautrier. 1992. Some efficient solutions to the affine scheduling problem: part II, multidimensional time. International Journal of Parallel Programming 21, 6 (1992), 389–420.
[9]
GNU. 2000. GLPK (GNU Linear Programming Kit). (2000). https://www.gnu.org/software/glpk/.
[10]
Tobias Grosser, Armin Groesslinger, and Christian Lengauer. 2012. Polly: Performing Polyhedral optimizations on a low-level intermediate representation. Parallel Processing Letters 22, 04 (2012).
[11]
Inc. Gurobi Optimization. 2016. Gurobi Optimizer Reference Manual. (2016). http://www.gurobi.com
[12]
Martin Kong, Richard Veras, Kevin Stock, Franz Franchetti, LouisNoël Pouchet, and P. Sadayappan. 2013. When Polyhedral Transformations Meet SIMD Code Generation. In ACM SIGPLAN conference on Programming Language Design and Implementation (PLDI).
[13]
A. Lim, Gerald I. Cheong, and Monica S. Lam. 1999. An Affine Partitioning Algorithm to Maximize Parallelism and Minimize Communication. In ACM International Conference on Supercomputing (ICS). 228–237.
[14]
A. Lim and Monica S. Lam. 1998. Maximizing parallelism and minimizing synchronization with affine partitions. Parallel Comput. 24, 3-4 (1998), 445–475.
[15]
Sanyam Mehta and Pen-Chung Yew. 2015. Improving Compiler Scalability: Optimizing Large Programs at Small Price. In ACM SIGPLAN Conference on Programming Language Design and Implementation. 143–152.
[16]
Sanyam Mehta and Pen-Chung Yew. 2016. Variable Liberalization. ACM Transactions on Archititecture and Code Optimizations 13, 3, Article 23 (Aug. 2016), 25 pages.
[17]
Benoît Meister, Nicolas Vasilache, David Wohlford, Muthu Baskaran, Allen Leung, and Richard Lethin. 2011. R-Stream Compiler. In Encyclopedia of Parallel Computing. 1756–1765.
[18]
Ravi Teja Mullapudi, Vinay Vasista, and Uday. Bondhugula. 2015. PolyMage: Automatic Optimization for Image Processing Pipelines. In International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS).
[19]
Pluto 2008. PLUTO: A polyhedral automatic parallelizer and locality optimizer for multicores. (2008). http://plutocompiler.sourceforge.net.
[20]
Pluto. 2008. Pluto: An automatic polyhedral parallelizer and locality optimzer. (2008). https://github.com/bondhugula/pluto commit:b5eedac65a8614b74168c27e578ecc780d84bd98, Dec 18, 2017.
[21]
Polybench v4.2 2016. Polybench suite. (2016). http://polybench.sourceforge.net.
[22]
B. Pradelle, B. Meister, M. Baskaran, A. Konstantinidis, T. Henretty, and R. Lethin. 2016. Scalable Hierarchical Polyhedral Compilation. In 2016 45th International Conference on Parallel Processing (ICPP). 432– 441.
[23]
Jun Shirako, Louis-Noël Pouchet, and Vivek Sarkar. 2014. Oil and Water Can Mix: An Integration of Polyhedral and AST-based Transformations. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (Supercomputing). 287–298.
[24]
SNU. 2011. SNU NPB Suite. (2011). http://aces.snu.ac.kr/software/snunpb/.
[25]
Ramakrishna Upadrasta and Albert Cohen. 2013. Sub-Polyhedral Scheduling Using (Unit-)Two-Variable-Per-Inequality Polyhedra. In ACM SIGPLAN-SIGACT Symposium on Programming Languages (POPL). Rome, Italy.
[26]
Nicolas Vasilache, Benoit Meister, Muthu Baskaran, and Richard Lethin. 2012. Joint Scheduling and Layout Optimization to Enable Multi-Level Vectorization. In International workshop on Polyhedral Compilation Techniques (IMPACT).
[27]
Sven Verdoolaege. 2010. ISL: An Integer Set Library for the Polyhedral Model. In Mathematical Software - ICMS 2010, Komei Fukuda, Joris Hoeven, Michael Joswig, and Nobuki Takayama (Eds.). Vol. 6327. Springer, 299–302.
[28]
Sven Verdoolaege and Tobias Grosser. 2012. Polyhedral Extraction Tool. In International workshop on Polyhedral Compilation Techniques (IMPACT).
[29]
Oleksandr Zinenko, Sven Verdoolaege, Chandan Reddy, Jun Shirako, Tobias Grosser, Vivek Sarkar, and Albert Cohen. 2017. Unified Polyhedral Modeling of Temporal and Spatial Locality. Research Report RR-9110. Inria Paris. 41 pages. https://hal.inria.fr/hal-01628798

Cited By

View all
  • (2025)Optimizing Data Reuse for Loop Mapping on CGRAs With Joint Affine and Nonaffine TransformationsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2024.345197844:3(989-1002)Online publication date: Mar-2025
  • (2024)Modeling the Interplay between Loop Tiling and Fusion in Optimizing Compilers Using Affine RelationsACM Transactions on Computer Systems10.1145/363530541:1-4(1-45)Online publication date: 15-Jan-2024
  • (2024)A Holistic Approach to Automatic Mixed-Precision Code Generation and Tuning for Affine ProgramsProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638484(55-67)Online publication date: 2-Mar-2024
  • Show More Cited By

Index Terms

  1. Polyhedral auto-transformation with no integer linear programming

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PLDI 2018: Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation
    June 2018
    825 pages
    ISBN:9781450356985
    DOI:10.1145/3192366
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 11 June 2018

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Pluto algorithm
    2. Polyhedral transformation

    Qualifiers

    • Research-article

    Conference

    PLDI '18
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 406 of 2,067 submissions, 20%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)72
    • Downloads (Last 6 weeks)11
    Reflects downloads up to 20 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2025)Optimizing Data Reuse for Loop Mapping on CGRAs With Joint Affine and Nonaffine TransformationsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2024.345197844:3(989-1002)Online publication date: Mar-2025
    • (2024)Modeling the Interplay between Loop Tiling and Fusion in Optimizing Compilers Using Affine RelationsACM Transactions on Computer Systems10.1145/363530541:1-4(1-45)Online publication date: 15-Jan-2024
    • (2024)A Holistic Approach to Automatic Mixed-Precision Code Generation and Tuning for Affine ProgramsProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638484(55-67)Online publication date: 2-Mar-2024
    • (2024)Optimizing Deep Learning Inference via Global Analysis and Tensor ExpressionsProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624858(286-301)Online publication date: 27-Apr-2024
    • (2021)Program transformations as the base for optimizing parallelizing compilersProgram Systems: Theory and ApplicationsПрограммные системы: теория и приложения10.25209/2079-3316-2021-12-1-21-11312:1(21-113)Online publication date: 2021
    • (2021)DNNFusion: accelerating deep neural networks execution with advanced operator fusionProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454083(883-898)Online publication date: 19-Jun-2021
    • (2021)Exploring Affine Abstractions for Qubit Mapping2021 IEEE/ACM Second International Workshop on Quantum Computing Software (QCS)10.1109/QCS54837.2021.00009(43-54)Online publication date: Nov-2021
    • (2021)CoSAProceedings of the 48th Annual International Symposium on Computer Architecture10.1109/ISCA52012.2021.00050(554-566)Online publication date: 14-Jun-2021
    • (2021)Towards parallelism detection of sequential programs with graph neural networkFuture Generation Computer Systems10.1016/j.future.2021.07.001125:C(515-525)Online publication date: 1-Dec-2021
    • (2020)Effective Loop Fusion in Polyhedral Compilation Using Fusion Conflict GraphsACM Transactions on Architecture and Code Optimization10.1145/341651017:4(1-26)Online publication date: 30-Sep-2020
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media