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

Open Access
Authors
  • A. Krasznahorkay
Publication date 2024
Book title ICPE '24
Book subtitle Proceedings of the 15th ACM/SPEC International Conference on Performance Engineering : May 7-11, 2024, London, United Kingdom
ISBN (electronic)
  • 9798400704444
Pages (from-to) 83–94
Publisher New York, NY: Association for Computing Machinery
Organisations
  • Faculty of Science (FNWI) - Informatics Institute (IVI)
Abstract
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.
Document type Conference contribution
Language English
Published at https://doi.org/10.48550/arXiv.2309.07002 https://doi.org/10.1145/3629526.3645034
Downloads
3629526.3645034 (Final published version)
Permalink to this page
Back