Using Evolutionary Algorithms to Find Cache-Friendly Generalized Morton Layouts for Arrays

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Swatman, Stephen Nicholas, Varbanescu, Ana-Lucia, Pimentel, Andy D., Salzburger, Andreas, Krasznahorkay, Attila
Format: Preprint
Veröffentlicht: 2023
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866913222693486592
author Swatman, Stephen Nicholas
Varbanescu, Ana-Lucia
Pimentel, Andy D.
Salzburger, Andreas
Krasznahorkay, Attila
author_facet Swatman, Stephen Nicholas
Varbanescu, Ana-Lucia
Pimentel, Andy D.
Salzburger, Andreas
Krasznahorkay, Attila
contents The layout of multi-dimensional data can have a significant impact on the efficacy of hardware caches and, by extension, the performance of applications. Common multi-dimensional layouts include the canonical row-major and column-major layouts as well as the Morton curve layout. In this paper, we describe how the Morton layout can be generalized to a very large family of multi-dimensional data layouts with widely varying performance characteristics. We posit that this design space can be efficiently explored using a combinatorial evolutionary methodology based on genetic algorithms. To this end, we propose a chromosomal representation for such layouts as well as a methodology for estimating the fitness of array layouts using cache simulation. We show that our fitness function correlates to kernel running time in real hardware, and that our evolutionary strategy allows us to find candidates with favorable simulated cache properties in four out of the eight real-world applications under consideration in a small number of generations. Finally, we demonstrate that the array layouts found using our evolutionary method perform well not only in simulated environments but that they can effect significant performance gains -- up to a factor ten in extreme cases -- in real hardware.
format Preprint
id arxiv_https___arxiv_org_abs_2309_07002
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Using Evolutionary Algorithms to Find Cache-Friendly Generalized Morton Layouts for Arrays
Swatman, Stephen Nicholas
Varbanescu, Ana-Lucia
Pimentel, Andy D.
Salzburger, Andreas
Krasznahorkay, Attila
Neural and Evolutionary Computing
Performance
The layout of multi-dimensional data can have a significant impact on the efficacy of hardware caches and, by extension, the performance of applications. Common multi-dimensional layouts include the canonical row-major and column-major layouts as well as the Morton curve layout. In this paper, we describe how the Morton layout can be generalized to a very large family of multi-dimensional data layouts with widely varying performance characteristics. We posit that this design space can be efficiently explored using a combinatorial evolutionary methodology based on genetic algorithms. To this end, we propose a chromosomal representation for such layouts as well as a methodology for estimating the fitness of array layouts using cache simulation. We show that our fitness function correlates to kernel running time in real hardware, and that our evolutionary strategy allows us to find candidates with favorable simulated cache properties in four out of the eight real-world applications under consideration in a small number of generations. Finally, we demonstrate that the array layouts found using our evolutionary method perform well not only in simulated environments but that they can effect significant performance gains -- up to a factor ten in extreme cases -- in real hardware.
title Using Evolutionary Algorithms to Find Cache-Friendly Generalized Morton Layouts for Arrays
topic Neural and Evolutionary Computing
Performance
url https://arxiv.org/abs/2309.07002