nelli: a lightweight frontend for MLIR

Abstract

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 nelli, a lightweight, Python-embedded, domain-specific, language for generating MLIR code. nelli leverages existing MLIR infrastructure to develop Pythonic syntax and semantics for various MLIR features. We describe nelli's design goals, discuss key details of our implementation, and demonstrate how nelli enables easily defining and lowering compute kernels to diverse hardware platforms.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…