The MLIR Transform Dialect Your Compiler Is More Powerful Than You Think

Martin Paul Lücke, Oleksandr Zinenko, William S. Moses, Michel Steuwer, Albert Cohen

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

To take full advantage of a specific hardware target, performance engineers need to gain control on compilers in order to leverage their domain knowledge about the program and hardware. Yet, modern compilers are poorly controlled, usually by configuring a sequence of coarse-grained monolithic black-box passes, or by means of predefined compiler annotations/pragmas. These can be effective, but often do not let users precisely optimize their varying compute loads. As a consequence, performance engineers have to resort to implementing custom passes for a specific optimization heuristic, requiring compiler engineering expert knowledge. In this paper, we present a technique that provides fine-grained control of general-purpose compilers by introducing the Transform dialect, a controllable IR-based transformation system implemented in MLIR. The Transform dialect empowers performance engineers to optimize their various compute loads by composing and reusing existing—but currently hidden—compiler features without the need to implement new passes or even rebuilding the compiler. We demonstrate in five case studies that the Transform dialect enables precise, safe composition of compiler transformations and allows for straightforward integration with state-of-the-art search methods.

Original languageEnglish (US)
Title of host publicationCGO 2025 - Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization
EditorsJohannes Doerfert, Tobias Grosser, Hugh Leather, P.. Sadayappan
PublisherAssociation for Computing Machinery
Pages241-254
Number of pages14
ISBN (Electronic)9798400712753
DOIs
StatePublished - Mar 1 2025
Event23rd ACM/IEEE International Symposium on Code Generation and Optimization, CGO 2025 - Las Vegas, United States
Duration: Mar 1 2025Mar 5 2025

Publication series

NameCGO 2025 - Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization

Conference

Conference23rd ACM/IEEE International Symposium on Code Generation and Optimization, CGO 2025
Country/TerritoryUnited States
CityLas Vegas
Period3/1/253/5/25

Keywords

  • Controllable Compiler
  • MLIR
  • Transform Dialect
  • Transform Scripts

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Hardware and Architecture
  • Software
  • Applied Mathematics
  • Control and Optimization

Fingerprint

Dive into the research topics of 'The MLIR Transform Dialect Your Compiler Is More Powerful Than You Think'. Together they form a unique fingerprint.

Cite this