Fortran performance optimisation and auto-parallelisation by leveraging MLIR-based domain specific abstractions in Flang
Nick Brown, Maurice Jamieson, Anton Lydike, Emilien Bauer, Tobias, Grosser

TL;DR
This paper enhances Fortran compiler performance and auto-parallelisation by integrating MLIR-based domain-specific dialects, achieving significant speedups and parallel execution on supercomputers without altering source code.
Contribution
It introduces a novel approach combining MLIR dialects with Flang for optimized Fortran compilation and auto-parallelisation, leveraging domain-specific transformations for performance gains.
Findings
Achieved 2 to 10 times performance improvement on benchmarks.
Developed auto-parallelisation targeting multi-threaded, distributed, and GPU execution.
Enabled parallel execution without modifying original Fortran source code.
Abstract
MLIR has become popular since it was open sourced in 2019. A sub-project of LLVM, the flexibility provided by MLIR to represent Intermediate Representations (IR) as dialects at different abstraction levels, to mix these, and to leverage transformations between dialects provides opportunities for automated program optimisation and parallelisation. In addition to general purpose compilers built upon MLIR, domain specific abstractions have also been developed. In this paper we explore complimenting the Flang MLIR general purpose compiler by combining with the domain specific Open Earth Compiler's MLIR stencil dialect. Developing transformations to discover and extracts stencils from Fortran, this specialisation delivers between a 2 and 10 times performance improvement for our benchmarks on a Cray supercomputer compared to using Flang alone. Furthermore, by leveraging existing MLIR…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
