Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ stdir Public

An MLIR dialect for a unified type system.

sdgunaa/stdir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Stdir Dialect (stdir) for MLIR

stdir is a new general-purpose dialect for MLIR that introduces a modern type system and reusable operations for building compilers and domain-specific languages (DSLs).

Note: This is not the deprecated Standard dialect. stdir is built from scratch using modern MLIR design principles. It is extensible, type-rich, and designed to lower cleanly to existing MLIR dialects.


Goals

  • Provide a standardized, modern type system for MLIR
  • Define a core set of reusable operations: control flow, arithmetic, tensors, memory, etc.
  • Support lowering to existing dialects like SCF, Arith, LLVM, and others
  • Enable Python integration for machine learning workflows and compiler tooling

Types

The stdir dialect includes a wide range of types:

  • Scalars: iN, fN, bool
  • Tensors: shaped and shape-polymorphic
  • Vectors: parametric width and element types
  • Structs: named, nested fields
  • Tuples: positional types
  • Optionals: null-safe values
  • Generic Containers: arrays, maps, sets
  • Parametric & Opaque Types: for abstraction and generality

Core Operations

Basic reusable operations provided by the dialect include:

  • Control Flow: stdir.if, stdir.for, stdir.while

  • Arithmetic: stdir.add, stdir.sub, stdir.mul, stdir.div

  • Memory Management: stdir.alloc, stdir.load, stdir.store

  • Asynchronous Execution: stdir.async_execute, stdir.await

  • Utilities: stdir.print, stdir.assert, stdir.cast


Lowering Targets

stdir is designed to lower to a wide range of existing MLIR dialects:

  • SCF, CF – structured and conventional control flow
  • Arith, Math – scalar and numeric operations
  • Tensor, MemRef – data structure manipulation
  • Linalg, Vector – loop nests, matrix ops, and vectorization
  • Async – asynchronous and concurrent execution
  • LLVM – low-level backend lowering
  • PDL, PDLInterp – pattern-driven transformations

About

An MLIR dialect for a unified type system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published