MLIR-Forge: A Modular Framework for Language Smiths
Berke Ates, Philipp Schaad, Timo Schneider, Alexandru Calotoiu, Torsten Hoefler

TL;DR
MLIR-Forge is a flexible framework that simplifies the creation of random program generators for compiler IRs, enabling effective testing of compilers across multiple languages with minimal development effort.
Contribution
It introduces a modular, reusable approach to generate random programs for various IRs, reducing complexity and development time for testing compiler correctness.
Findings
Generated MLIR, WebAssembly, and DaCe programs with less than a week each.
Discovered 9 MLIR, 15 WebAssembly, and 774 DaCe bugs through differential testing.
Demonstrated effective bug detection across multiple IRs using the framework.
Abstract
Optimizing compilers are essential for the efficient and correct execution of software across various scientific fields. Domain-specific languages (DSL) typically use higher level intermediate representations (IR) in their compiler pipelines for domain-specific optimizations. As these IRs add to complexity, it is crucial to test them thoroughly. Random program generators have proven to be an effective tool to test compilers through differential and fuzz testing. However, developing specialized program generators for compiler IRs is not straightforward and demands considerable resources. We introduce MLIR-Forge, a novel random program generator framework that leverages the flexibility of MLIR, aiming to simplify the creation of specialized program generators. MLIR-Forge achieves this by splitting the generation process into fundamental building blocks that are language specific, and…
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.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Logic, programming, and type systems · Parallel Computing and Optimization Techniques
