A Priori Loop Nest Normalization: Automatic Loop Scheduling in Complex Applications

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Trümper, Lukas, Schaad, Philipp, Ates, Berke, Calotoiu, Alexandru, Copik, Marcin, Hoefler, Torsten
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929651287326720
author Trümper, Lukas
Schaad, Philipp
Ates, Berke
Calotoiu, Alexandru
Copik, Marcin
Hoefler, Torsten
author_facet Trümper, Lukas
Schaad, Philipp
Ates, Berke
Calotoiu, Alexandru
Copik, Marcin
Hoefler, Torsten
contents The same computations are often expressed differently across software projects and programming languages. In particular, how computations involving loops are expressed varies due to the many possibilities to permute and compose loops. Since each variant may have unique performance properties, automatic approaches to loop scheduling must support many different optimization recipes. In this paper, we propose a priori loop nest normalization to align loop nests and reduce the variation before the optimization. Specifically, we define and apply normalization criteria, mapping loop nests with different memory access patterns to the same canonical form. Since the memory access pattern is susceptible to loop variations and critical for performance, this normalization allows many loop nests to be optimized by the same optimization recipe. To evaluate our approach, we apply the normalization with optimizations designed for only the canonical form, improving the performance of many different loop nest variants. Across multiple implementations of 15 benchmarks using different languages, we outperform a baseline compiler in C on average by a factor of $21.13$, state-of-the-art auto-schedulers such as Polly and the Tiramisu auto-scheduler by $2.31$ and $2.89$, as well as performance-oriented Python-based frameworks such as NumPy, Numba, and DaCe by $9.04$, $3.92$, and $1.47$. Furthermore, we apply the concept to the CLOUDSC cloud microphysics scheme, an actively used component of the Integrated Forecasting System, achieving a 10% speedup over the highly-tuned Fortran code.
format Preprint
id arxiv_https___arxiv_org_abs_2412_20179
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle A Priori Loop Nest Normalization: Automatic Loop Scheduling in Complex Applications
Trümper, Lukas
Schaad, Philipp
Ates, Berke
Calotoiu, Alexandru
Copik, Marcin
Hoefler, Torsten
Performance
The same computations are often expressed differently across software projects and programming languages. In particular, how computations involving loops are expressed varies due to the many possibilities to permute and compose loops. Since each variant may have unique performance properties, automatic approaches to loop scheduling must support many different optimization recipes. In this paper, we propose a priori loop nest normalization to align loop nests and reduce the variation before the optimization. Specifically, we define and apply normalization criteria, mapping loop nests with different memory access patterns to the same canonical form. Since the memory access pattern is susceptible to loop variations and critical for performance, this normalization allows many loop nests to be optimized by the same optimization recipe. To evaluate our approach, we apply the normalization with optimizations designed for only the canonical form, improving the performance of many different loop nest variants. Across multiple implementations of 15 benchmarks using different languages, we outperform a baseline compiler in C on average by a factor of $21.13$, state-of-the-art auto-schedulers such as Polly and the Tiramisu auto-scheduler by $2.31$ and $2.89$, as well as performance-oriented Python-based frameworks such as NumPy, Numba, and DaCe by $9.04$, $3.92$, and $1.47$. Furthermore, we apply the concept to the CLOUDSC cloud microphysics scheme, an actively used component of the Integrated Forecasting System, achieving a 10% speedup over the highly-tuned Fortran code.
title A Priori Loop Nest Normalization: Automatic Loop Scheduling in Complex Applications
topic Performance
url https://arxiv.org/abs/2412.20179