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 operationsuop- UOp (micro-operation) struct and implementationuop::constructors- UOp constructor methods by semantic categoryindexing- Multi-dimensional indexing supporterror- Error types and result handlingshape- Shape inference utilitiessint- 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§
- Addr
Space - Address space for pointer types.
- DType
- Data type including scalars, vectors, pointers, and images.
- Device
Spec - Device specification parsed from a device string.