Polyhedral AST Generation Is More Than Scanning Polyhedra

Author:

Grosser Tobias1,Verdoolaege Sven2,Cohen Albert1

Affiliation:

1. INRIA and ÉCOLE NORMALE SUPÉRIEURE, Paris, France

2. INRIA, ÉCOLE NORMALE SUPÉRIEURE and KU Leuven, Paris, France

Abstract

Abstract mathematical representations such as integer polyhedra have been shown to be useful to precisely analyze computational kernels and to express complex loop transformations. Such transformations rely on abstract syntax tree (AST) generators to convert the mathematical representation back to an imperative program. Such generic AST generators avoid the need to resort to transformation-specific code generators, which may be very costly or technically difficult to develop as transformations become more complex. Existing AST generators have proven their effectiveness, but they hit limitations in more complex scenarios. Specifically, (1) they do not support or may fail to generate control flow for complex transformations using piecewise schedules or mappings involving modulo arithmetic; (2) they offer limited support for the specialization of the generated code exposing compact, straightline, vectorizable kernels with high arithmetic intensity necessary to exploit the peak performance of modern hardware; (3) they offer no support for memory layout transformations; and (4) they provide insufficient control over the AST generation strategy, preventing their application to complex domain-specific optimizations. We present a new AST generation approach that extends classical polyhedral scanning to the full generality of Presburger arithmetic, including existentially quantified variables and piecewise schedules, and introduce new optimizations for the detection of components and shifted strides. Not limiting ourselves to control flow generation, we expose functionality to generate AST expressions from arbitrary piecewise quasi-affine expressions, which enables the use of our AST generator for data-layout transformations. We complement this with support for specialization by polyhedral unrolling, user-directed versioning, and specialization of AST expressions according to the location at which they are generated, and we complete this work with fine-grained user control over the AST generation strategies used. Using this generalized idea of AST generation, we present how to implement complex domain-specific transformations without the need to write specialized code generators, but instead relying on a generic AST generator parametrized to a specific problem domain.

Funder

ARTEMIS project

Swissuniversities through the Platform for Advanced Computing Initiative

LIACS from Intel Corporation

Google Europe Fellowship in Efficient Computing

European FP7 project

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Cited by 43 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. A Holistic Approach to Automatic Mixed-Precision Code Generation and Tuning for Affine Programs;Proceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming;2024-02-20

3. Modeling the Interplay between Loop Tiling and Fusion in Optimizing Compilers Using Affine Relations;ACM Transactions on Computer Systems;2023-11-30

4. Autotuning Convolutions Is Easier Than You Think;ACM Transactions on Architecture and Code Optimization;2023-03

5. Polyhedral Specification and Code Generation of Sparse Tensor Contraction with Co-iteration;ACM Transactions on Architecture and Code Optimization;2022-12-16

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

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

www.globalauthorid.com

TOP

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