Skip to main content

Crate vyre_foundation

Crate vyre_foundation 

Source
Expand description

vyre-foundation — substrate-neutral compiler foundation.

Defines the vyre IR (Expr, Node, Program), the type system, the memory model, the wire format, visitor traits, and extension resolvers. Every other vyre crate depends on this one; this crate depends only on vyre-spec, vyre-macros, and lightweight third-party data crates. It never knows about concrete driver APIs, a dialect, or a backend.

Re-exports§

pub use algebra::algebraic_law_registry;
pub use algebra::algebraic_law_registry::has_law;
pub use algebra::algebraic_law_registry::is_associative;
pub use algebra::algebraic_law_registry::is_commutative;
pub use algebra::algebraic_law_registry::laws_for_op;
pub use algebra::algebraic_law_registry::AlgebraicLawRegistration;
pub use analysis::graph_view;
pub use dispatch::dialect_lookup;
pub use dispatch::extern_registry;
pub use runtime::memory_model;
pub use runtime::memory_model::MemoryOrdering;
pub use analysis::graph_view::from_graph;
pub use analysis::graph_view::to_graph;
pub use analysis::graph_view::DataEdge;
pub use analysis::graph_view::DataflowKind;
pub use analysis::graph_view::EdgeKind;
pub use analysis::graph_view::GraphNode;
pub use analysis::graph_view::GraphValidateError;
pub use analysis::graph_view::NodeGraph;
pub use dispatch::dialect_lookup::dialect_lookup;
pub use dispatch::dialect_lookup::install_dialect_lookup;
pub use dispatch::dialect_lookup::intern_string;
pub use dispatch::dialect_lookup::AttrSchema;
pub use dispatch::dialect_lookup::AttrType;
pub use dispatch::dialect_lookup::Category;
pub use dispatch::dialect_lookup::DialectLookup;
pub use dispatch::dialect_lookup::InternedOpId;
pub use dispatch::dialect_lookup::LoweringCtx;
pub use dispatch::dialect_lookup::LoweringTable;
pub use dispatch::dialect_lookup::NativeModule;
pub use dispatch::dialect_lookup::NativeModuleBuilder;
pub use dispatch::dialect_lookup::OpDef;
pub use dispatch::dialect_lookup::PrimaryBinaryBuilder;
pub use dispatch::dialect_lookup::PrimaryTextBuilder;
pub use dispatch::dialect_lookup::ReferenceKind;
pub use dispatch::dialect_lookup::SecondaryTextBuilder;
pub use dispatch::dialect_lookup::Signature;
pub use dispatch::dialect_lookup::TextModule;
pub use dispatch::dialect_lookup::TypedParam;
pub use dispatch::extern_registry::all_ops as all_extern_ops;
pub use dispatch::extern_registry::dialects as extern_dialects;
pub use dispatch::extern_registry::ops_in_dialect as extern_ops_in_dialect;
pub use dispatch::extern_registry::verify as verify_extern_registry;
pub use dispatch::extern_registry::ExternDialect;
pub use dispatch::extern_registry::ExternOp;
pub use dispatch::extern_registry::ExternVerifyError;
pub use algebra::composition;
pub use dispatch::extension;
pub use runtime::cpu_op;
pub use runtime::cpu_references;
pub use runtime::match_result;
pub use runtime::match_result::ByteRange;
pub use runtime::perf;
pub use runtime::program_caps;
pub use error::Error;
pub use error::Result;

Modules§

algebra
Algebraic-laws surface (algebraic_law_registry, composition). Algebraic-laws surface — registration of provable algebraic identities + composition machinery the optimizer’s algebraic catalog (optimizer/passes/algebraic/) consumes.
analysis
Static-analysis surface (graph_view). Static-analysis surface — graph views + adjacency analyses over Program::entry().
diagnostics
Structured optimizer diagnostics surfaced to IDEs and CI annotators.
dispatch
Dispatch surface (dialect_lookup, extension, extern_registry). Dispatch surface — dialect lookup, extern op registry, extension hooks.
engine
Host-side IR engine helpers (prefix arrays, token filters). Host-side IR engine helpers that do not depend on a GPU runtime.
error
Unified error type for validation, wire format, lowering, and execution. Error types for IR validation, wire-format decoding, and GPU operations.
execution_plan
Program → substrate-neutral execution planning for fusion, readback, provenance, autotune, and accuracy guard decisions. Substrate-neutral execution planning for performance and accuracy.
ir
The vyre intermediate representation.
lower
Legacy lower helpers (transition surface pending driver-tier extraction). Backend-owned lowering contracts.
opaque_payload
Endian-fixed encode/decode helpers for Expr::Opaque / Node::Opaque payloads. Endian-fixed encode/decode helpers + semantic canonicalisation for opaque extension payloads.
optimizer
Pass-orchestration optimizer framework. Fixpoint optimizer pass framework for vyre IR.
pass_substrate
Self-substrate primitives that the optimizer + scheduler call into. Moved in-tree from vyre-libs to break a cross-workspace dep cycle.
runtime
Runtime / evaluation surface (cpu_op, cpu_references, ir_eval, match_result, memory_model, perf, program_caps). Runtime / evaluation surface — IR-time and dispatch-time machinery.
serial
Binary wire format + canonical text serialization. IR serialization formats.
transform
IR → IR passes: inline, cse, dce, parallelism, compiler primitives. IR transformation passes.
validate
Structural + semantic validation of vyre Programs. Structural and semantic IR validation.
vast
Packed AST (VAST) wire layout + host-side tree walks (docs/parsing-and-frontends.md). VAST — packed AST wire layout (host validator + tree walks).
visit
Visitor traits + blanket adapters routing Expr/Node variants. Visitor traits for traversing and lowering vyre IR.

Macros§

rewrite_rules
Defines a set of declarative rewrite rules that compile into a |&Expr| -> Option<Expr> closure.

Enums§

AlgebraicLaw
An algebraic law that an operation must satisfy in the frozen data contract.