Skip to main content

Crate vyre_spec

Crate vyre_spec 

Source
Expand description

vyre-spec is the machine-checkable frozen data contract for the vyre GPU compute IR. Any backend may depend on vyre-spec alone to prove conformance without depending on vyre itself.

This crate is intentionally data-only. It has no dependency on vyre or vyre; backend vendors can use these types as the stable contract for conformance proofs. Example: a conformance runner can read an OpSignature and verify the byte width expected by a backend primitive.

Re-exports§

pub use adversarial_input::AdversarialInput;
pub use algebraic_law::AlgebraicLaw;
pub use algebraic_law::LawCheckFn;
pub use all_algebraic_laws::all_algebraic_laws;
pub use atomic_op::AtomicOp;
pub use bin_op::BinOp;
pub use buffer_access::BufferAccess;
pub use by_category::by_category;
pub use by_id::by_id;
pub use catalog_is_complete::catalog_is_complete;
pub use category::BackendAvailability;
pub use category::BackendAvailabilityPredicate;
pub use category::Category;
pub use convention::Convention;
pub use data_type::DataType;
pub use engine_invariant::EngineInvariant;
pub use engine_invariant::InvariantId;
pub use expr_variant::expr_variants;
pub use float_type::FloatType;
pub use golden_sample::GoldenSample;
pub use intrinsic_table::IntrinsicLowering;
pub use intrinsic_table::IntrinsicTable;
pub use invariant::Invariant;
pub use invariant_category::InvariantCategory;
pub use invariants::empty_test_family;
pub use invariants::invariants;
pub use kat_vector::KatVector;
pub use law_catalog::law_catalog;
pub use layer::Layer;
pub use metadata_category::MetadataCategory;
pub use monotonic_direction::MonotonicDirection;
pub use op_contract::CapabilityId;
pub use op_contract::CostHint;
pub use op_contract::DeterminismClass;
pub use op_contract::OperationContract;
pub use op_contract::SideEffectClass;
pub use op_metadata::OpMetadata;
pub use op_signature::OpSignature;
pub use pg_node_kind::PgNodeKind;
pub use ternary_op::TernaryOp;
pub use test_descriptor::TestDescriptor;
pub use un_op::UnOp;
pub use verification::Verification;
pub use intrinsic_descriptor::Backend;
pub use intrinsic_descriptor::BackendId;
pub use intrinsic_descriptor::CpuFn;
pub use intrinsic_descriptor::IntrinsicDescriptor;

Modules§

adversarial_input
Adversarial input descriptors — hostile payloads every op must reject or handle. Specification element. Specification element. Frozen adversarial-input records shared by operation catalogs and test generators.
algebraic_law
Algebraic law primitives — associativity, identity, commutativity declarations. Specification element. Specification element. Frozen algebraic-law declarations that conformance engines verify per operation.
all_algebraic_laws
Canonical catalog of every algebraic law tagged to operations. Specification element. Specification element. Frozen representative set used to keep the algebraic-law catalog complete.
atomic_op
Atomic operation enum — the bounded set of read-modify-write primitives. Specification element. Specification element. Frozen atomic-operation discriminants for backend intrinsic metadata.
bin_op
Binary operator enum — all element-wise two-operand primitives. Specification element. Specification element. Frozen binary-operation discriminants for primitive operation metadata.
buffer_access
Buffer access mode (ReadOnly / WriteOnly / ReadWrite) + enforcement helpers. Specification element. Specification element. Frozen buffer-access tags used by operation and program metadata.
by_category
Iterator returning op ids grouped by their Category. Specification element. Specification element. Category lookup helpers for the frozen invariant catalog.
by_id
Reverse index from op id string to its canonical descriptor. Specification element. Specification element. Identifier lookup helpers for the frozen invariant catalog.
catalog_is_complete
Conformance invariant: the op catalog enumerates every known id. Specification element. Specification element. Completeness check for the frozen invariant catalog.
category
Category enum (A/B/C) + backend-availability predicates. Specification element. Specification element. Frozen operation-category records used to separate composition from intrinsics.
convention
Calling conventions between CPU host and GPU kernels. Specification element. Specification element. Frozen calling-convention versions for generated operation entrypoints.
data_type
Primitive data-type enum (U32/F32/Bool/etc.) + size helpers. Specification element. Specification element. Frozen IR data-type tags shared by signatures, validators, and wire metadata.
engine_invariant
Invariants the engine itself must preserve (wire round-trip, CSE stability, …). Specification element. Specification element. Frozen engine-invariant identifiers used by conformance certificates.
expr_variant
Frozen catalog of core Expr variant names used by coverage tests. Specification element. Specification element. Frozen catalog of core Expr variant names.
extension
Dialect extension descriptor — marks non-core ops carried by extensions. Specification element. Specification element. Extension contracts for open IR.
float_type
Floating-point type subset (F16/F32/F64) with associated properties. Specification element. Specification element. Frozen floating-point format tags used by verification evidence.
golden_sample
Golden reference samples — tiny fixtures every backend must reproduce exactly. Specification element. Specification element. Frozen golden-sample records shared by operation catalogs and conformance tests.
intrinsic_descriptor
Intrinsic descriptors. Specification element. Specification element. Descriptor for a Category C hardware intrinsic.
intrinsic_table
Table of hardware intrinsics exposed by vyre-intrinsics. Specification element. Specification element. Frozen backend intrinsic-name tables for Category C operations.
invariant
Abstract invariant type + provenance tracking. Specification element. Specification element. Frozen invariant catalog entries used by conformance tooling.
invariant_category
Classification buckets grouping related invariants (numeric, memory, …). Specification element. Specification element. Frozen invariant-category tags used for catalog grouping and reporting.
invariants
Catalog of invariants every registered op is checked against. Specification element. Specification element. Frozen catalog of engine invariants required for vyre conformance.
kat_vector
Known-answer test vector type — deterministic input/output pairs. Specification element. Specification element. Frozen known-answer vector records for bit-exact operation checks.
law_catalog
Canonical catalog of algebraic laws exposed via law_catalog(). Specification element. Specification element. Frozen algebraic-law fingerprint strings used by catalog completeness tests.
layer
Layer enum (IR / backend / runtime) — coarse module placement. Specification element. Specification element. Frozen conformance-layer tags used by operation metadata.
metadata_category
Metadata classification for OpMetadata entries. Specification element. Specification element. Frozen metadata category tags emitted into generated operation catalogs.
monotonic_direction
Monotonicity direction (increasing / decreasing / none) for op outputs. Specification element. Specification element. Frozen monotonic-direction tags attached to monotonic algebraic laws.
op_contract
Operation contract: capability requirements, determinism, cost hints. Specification element. Specification element. Optional operation-contract metadata shared by signatures and catalogs.
op_metadata
Op metadata struct — human-facing description and discoverability hooks. Specification element. Specification element. Frozen operation metadata records consumed by catalogs and docs generators.
op_signature
Op signature — stable type profile every backend lowers against. Specification element. Specification element. Frozen operation type signatures used by validators and catalogs.
pg_node_kind
Packed graph node kinds for language-agnostic analysis. Specification element. Specification element. Canonical node kinds for the Performance Graph (PG) layout.
ternary_op
Ternary operator enum — select, FMA, mask-merge. Specification element. Specification element. Frozen ternary-operation discriminants for operation signature metadata.
test_descriptor
Structured test descriptor — op id, input sampler, expected shape. Specification element. Specification element. Frozen generated-test descriptors tied to specific engine invariants.
un_op
Unary operator enum — single-operand element-wise primitives. Specification element. Specification element. Frozen unary-operation discriminants for primitive operation metadata.
verification
Conformance verification driver — runs the law + invariant battery. Specification element. Specification element. Frozen verification-evidence records attached to declared algebraic laws.