arXiv:2609.04585cs.PLSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.04585

JLIR: A Julia-Native MLIR-Inspired Intermediate Representation with Automatic JACC Kernel Extraction

Narasinga Rao Miniskar, Seyong Lee, Keita Teranishi, Jeffrey S Vetter

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Journal Title XX(X):1–19 ©The Author(s) 2016 Reprints and permission: sagepub.co.uk/journalsPermissions.nav DOI: 10.1177/ToBeAssigned www.sagepub.com/

SAGE

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/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. JLIR detects parallel and reduction loop patterns and lowers them to JACC kernels, producing portable CPU and GPU code from serial Julia programs without user annotations. Across matrix multiplication, a two-dimensional Jacobi stencil, Black–Scholes option pricing, and transformer model kernels on an NVIDIA A100 GPU, generated kernels achieved up to 3,023 GB/s effective bandwidth, 96% of a hand-written Julia accelerator baseline, and an 85× speedup over serial Julia, with transformation overhead below 1.5 ms. These results show that a dynamic language can host practical, extensible compiler infrastructure while preserving a high-level programming model.

Keywords

Julia, JACC, HPC, LLVM, MLIR, JLIR, Intermediate representation, Compiler

References (26)