JLIR: A Julia-Native MLIR-Inspired Intermediate Representation with Automatic JACC Kernel Extraction
Narasinga Rao Miniskar, Seyong Lee, Keita Teranishi, Jeffrey S Vetter
Abstract
The Multi-Level Intermediate Representation (MLIR) has made reusable compiler infrastructure practical for domain-specific computation. However, MLIR's strong compile-time type requirements and low-level (C++) extension model can be a poor match for high-level, dynamically specialized languages such as Julia. MLIR has several drawbacks for dynamic programming languages in terms of the type system and level of abstraction. It is thus extremely challenging for non-compiler or scientific computing users to introduce new programming abstractions and express algorithm implementations in a form that remains both natural and optimizable. As a result, library interfaces for linear algebra, mesh processing, partial differential equations, and related domains often sit outside the compiler optimization path. We present JLIR (Julia-native Level Intermediate Representation), a Julia-native intermediate representation framework that brings the main benefits of MLIR-style multi-level, dialect-oriented compilation into the Julia ecosystem while remaining usable as ordinary Julia code. JLIR represents Julia programs before low-level lowering, supports extensible operations and transformation passes through Julia's language mechanisms, and allows partially typed programs to remain transformable until concrete types are known. The framework includes built-in dialects for arithmetic, control flow, functions, structured loops, and memory operations, and it also includes a lightweight mechanism for adding new domain operations without modifying the core system. To demonstrate JLIR's capabilities, we applied it to automatic Julia for Accelerators (JACC) kernel generation.
Create a lesson
Metadata
- Categories
- cs.PL, cs.CL
Related papers
A Dynamic Intermediate Representation for Hybrid Quantum-Classical Programs
Shared title terminologycs.PLAlex Rice, Chris Heunen, Tobias Grosser
TensorRace: Verifying Data-Race Freedom of Modern GPU Kernels
Shared title terminologycs.PLGanxiang Yang, Yi Rong, Wei Qiang et al.
Probabilistic Loop Kernels: Exact Inference and Equivalence
Shared title terminologycs.PLBohan Ma, Mingqi Yang, Mingshuai Chen et al.
SALTyRN: An End-to-End Tool for Verified and Optimized Neon-to-RVV Kernel Translation
Shared title terminologycs.PLKeagan Chern, Charles Hong, Yakun Sophia Shao et al.
Teal: Verifiable Kernel Compilation through Instruction-Centric Lifting
Shared title terminologycs.PLShriram Chandran, Alexandru Calotoiu, Marcin Copik et al.
A View from the Bridge: Detecting Boundary Type Errors in Native Extensions of Dynamic Languages
Shared title terminologycs.PLThodoris Sotiropoulos, Georgios Alexopoulos, Dimitris Mitropoulos