# Towards an Achievable Performance for the Loop Nests

**Authors:** Aniket Shivam, Neftali Watkinson, Alexandru Nicolau, David Padua,, Alexander V. Veidenbaum

arXiv: 1902.00603 · 2019-11-27

## TL;DR

This paper analyzes the potential performance improvements of loop nests across multiple compilers and introduces a machine learning approach to predict the fastest compiler for a given loop nest, revealing significant headroom for optimization.

## Contribution

It provides a comparative analysis of loop optimization headroom across compilers and proposes a machine learning method to predict the best compiler for loop nests based on hardware performance counters.

## Key findings

- Headroom ranges from 1.10x to 1.42x for serial code.
- Headroom ranges from 1.30x to 1.71x for auto-parallelized code.
- ML predictions effectively estimate potential performance gains.

## Abstract

Numerous code optimization techniques, including loop nest optimizations, have been developed over the last four decades. Loop optimization techniques transform loop nests to improve the performance of the code on a target architecture, including exposing parallelism. Finding and evaluating an optimal, semantic-preserving sequence of transformations is a complex problem. The sequence is guided using heuristics and/or analytical models and there is no way of knowing how close it gets to optimal performance or if there is any headroom for improvement. This paper makes two contributions. First, it uses a comparative analysis of loop optimizations/transformations across multiple compilers to determine how much headroom may exist for each compiler. And second, it presents an approach to characterize the loop nests based on their hardware performance counter values and a Machine Learning approach that predicts which compiler will generate the fastest code for a loop nest. The prediction is made for both auto-vectorized, serial compilation and for auto-parallelization. The results show that the headroom for state-of-the-art compilers ranges from 1.10x to 1.42x for the serial code and from 1.30x to 1.71x for the auto-parallelized code. These results are based on the Machine Learning predictions.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1902.00603/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/1902.00603/full.md

## References

26 references — full list in the complete paper: https://tomesphere.com/paper/1902.00603/full.md

---
Source: https://tomesphere.com/paper/1902.00603