arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.16080cs.PL
收藏

nelli:一个面向 MLIR 的轻量级前端

nelli: a lightweight frontend for MLIR

Maksim Levental, Alok Kamatar, Ryan Chard, Kyle Chard, Ian Foster

AI总结:

本文提出嵌入 Python 的轻量级领域特定语言 nelli,以 Pythonic 语法生成 MLIR 代码,从而简化 MLIR 基本变换的研究与运用,并支持将计算内核降低到多种硬件平台。

摘要:

多级中间表示(MLIR)是一种新颖的编译器基础设施,旨在提供模块化和可扩展的组件,以促进构建领域特定编译器。然而,由于 MLIR 在中间抽象层次上对程序进行建模,而大多数现有前端都处于非常高的抽象层次,因此 MLIR 中可用的基本变换的语义和机制本身难以研究和运用。为了应对这些挑战,我们开发了 nelli,一种轻量级、嵌入 Python 的领域特定语言,用于生成 MLIR 代码。nelli 利用现有的 MLIR 基础设施,为各种 MLIR 特性开发 Python 风格的语法和语义。我们描述了 nelli 的设计目标,讨论了我们实现中的关键细节,并展示了 nelli 如何能够轻松定义计算内核并将其降低到多样化的硬件平台上。

英文摘要:

Multi-Level Intermediate Representation (MLIR) is a novel compiler infrastructure that aims to provide modular and extensible components to facilitate building domain specific compilers. However, since MLIR models programs at an intermediate level of abstraction, and most extant frontends are at a very high level of abstraction, the semantics and mechanics of the fundamental transformations available in MLIR are difficult to investigate and employ in and of themselves. To address these challenges, we have developed \texttt{nelli}, a lightweight, Python-embedded, domain-specific, language for generating MLIR code. \texttt{nelli} leverages existing MLIR infrastructure to develop Pythonic syntax and semantics for various MLIR features. We describe \texttt{nelli}'s design goals, discuss key details of our implementation, and demonstrate how \texttt{nelli} enables easily defining and lowering compute kernels to diverse hardware platforms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑