Skip to main content

Crate morok_ir

Crate morok_ir 

Source
Expand description

Intermediate Representation (IR) for the Morok compiler.

This crate defines the core IR data structures and operations used throughout the Morok compiler pipeline.

§Module Organization

  • types - Fundamental type definitions (ConstValue, operation types, etc.)
  • op - Operation enum defining all IR operations
  • uop - UOp (micro-operation) struct and implementation
  • uop::constructors - UOp constructor methods by semantic category
  • indexing - Multi-dimensional indexing support
  • error - Error types and result handling
  • shape - Shape inference utilities
  • sint - Symbolic integers

Re-exports§

pub use error::Error;
pub use error::IndexTypeMismatchSnafu;
pub use error::Result;
pub use indexing::IndexSpec;
pub use op::Op;
pub use sint::IntoShrinkRange;
pub use sint::SInt;
pub use sint::ShrinkRange;
pub use sint::sint_max;
pub use sint::sint_min;
pub use sint::sint_prod;
pub use types::AxisId;
pub use types::AxisType;
pub use types::BinaryOp;
pub use types::BufferizeOpts;
pub use types::ConstValue;
pub use types::ConstValueHash;
pub use types::ContiguousHint;
pub use types::ReduceOp;
pub use types::TernaryOp;
pub use types::UnaryOp;
pub use types::WmmaMetadata;
pub use types::WmmaUpcastAxes;
pub use uop::IntoUOp;
pub use uop::UOp;
pub use uop::UOpKey;
pub use pattern::Matcher;
pub use pattern::RewriteResult;
pub use pattern::TypedPatternMatcher;
pub use rewrite::graph_rewrite;

Modules§

decompositions
UOp decomposition framework.
error
indexing
Multi-dimensional indexing and slicing support.
kernel_info
Kernel metadata for optimized ASTs.
op
Operation enum and implementation.
pattern
Pattern matching infrastructure for UOp graphs.
prelude
Common imports for working with UOp graphs.
provenance
Provenance tracking for UOps.
rewrite
Graph rewrite engine with fixed-point iteration.
shape
Shape utilities for UOps with symbolic shape support.
sint
Symbolic Integer (SInt) - dimensions that can be either concrete or symbolic.
types
Type definitions for IR operations.
uop
UOp (micro-operation) implementation.

Macros§

cached_property
Define a cached property on UOp.
s
Slice macro for creating IndexSpec instances.

Enums§

AddrSpace
Address space for pointer types.
DType
Data type including scalars, vectors, pointers, and images.
DeviceSpec
Device specification parsed from a device string.