arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2609.04585cs.PLcs.CL

JLIR:一种受MLIR启发的Julia原生中间表示,支持自动JACC内核提取

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

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

首次发表
浏览论文内容

中文总结 AI 辅助

本文针对MLIR难以适配Julia的问题,提出JLIR框架,将MLIR的多级编译优势引入Julia生态,支持自动JACC内核生成,解决了领域库接口脱离编译器优化路径的痛点。

中文摘要 AI 辅助

多级中间表示(MLIR)已使面向领域特定计算的可复用编译器基础设施成为现实。然而,MLIR严格的编译时类型要求及底层(C++)扩展模型,与Julia这类高级、动态特化语言难以适配,在类型系统和抽象层级上存在诸多缺陷,导致非编译器或科学计算用户难以引入新的编程抽象、以自然且可优化的形式表达算法实现,线性代数、网格处理、偏微分方程等领域的库接口常脱离编译器优化路径。为此,本文提出JLIR(Julia原生中间表示),它是一种Julia原生的中间表示框架,将MLIR式多级、面向方言编译的核心优势引入Julia生态,同时可作为普通Julia代码使用。JLIR表示Julia程序在底层降低前的形式,支持通过Julia语言机制实现可扩展操作与变换 passes,允许部分类型化程序在确定具体类型前保持可变换性;框架内置算术、控制流、函数、结构化循环、内存操作等方言,还提供轻量机制添加新领域操作而无需修改核心系统。为验证JLIR的能力,本文将其应用于自动Julia加速器(JACC)内核生成。

英文摘要

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.

发表机构

  • Oak Ridge National Laboratory(橡树岭国家实验室)

机构由 AI 辅助整理,请以论文原文为准。

↑