vyre 0.7.2

GPU compute intermediate representation with a standard operation library
Documentation

vyre

Stable facade for Vyre frontend IR, whole-program compiler artifacts, and authenticated runtime sessions.

Install

cargo add vyre

Compile a graph

use std::collections::BTreeMap;
use vyre::compiler::{compile, CompileRequest, Digest, ExternalFacts, SearchBudget};
use vyre::ir::{
    BufferAccess, BufferDecl, DataType, Program, ProgramGraph, ShapeDim,
    ValueContract, ValueLifetime,
};

let mut graph = ProgramGraph::new();
graph.add_external_value(
    "out",
    ValueContract {
        dtype: DataType::U32,
        shape: vec![ShapeDim::Known(1)],
        access: BufferAccess::WriteOnly,
        lifetime: ValueLifetime::Output,
    },
)?;
graph.add_node(
    "main",
    Program::wrapped(
        vec![BufferDecl::output("out", 0, DataType::U32).with_count(1)],
        [1, 1, 1],
        Vec::new(),
    ),
    Vec::new(),
    Vec::new(),
)?;
let request = CompileRequest::new(
    graph,
    ExternalFacts::new(Digest([0; 32]), BTreeMap::new()),
    SearchBudget::new(1, 1, 1, 0, 1_000_000),
    1_000_000,
)
.validate()?;
let artifact = compile(&request)?;
# Ok::<(), Box<dyn std::error::Error>>(())

Attach a payload through a registered target compiler, serialize the resulting ArtifactEnvelope, and construct ArtifactSession with the matching backend registration. Submission uses BindingSet; completion returns outputs keyed by canonical artifact value IDs.

Public surface

Path Owner Purpose
vyre::ir vyre-foundation Frontend Program, ProgramGraph, contracts, and validation
vyre::compiler vyre-megakernel Compile requests, bounded schedule selection, artifacts, payloads, and target compiler facets
vyre::ArtifactSession vyre-runtime Authenticated admission, materialization, submission, and recovery
vyre::PersistentExecutor vyre-runtime Retained artifact-backed resident queue execution
vyre::BindingSet vyre-driver Typed resource bindings keyed by artifact value identity

Concrete drivers own target compilation, device acquisition, native materialization, and submission. The facade does not select a concrete backend or lower directly to target text.

Conformance

Pair vyre with vyre-reference and backend KAT parity tests for a binary verdict on backend correctness. Reference execution is an explicit oracle, not a production fallback.

The book

Documentation and tutorials live in docs/. Build the mdBook for the complete rendered guide.

License

MIT OR Apache-2.0.

Crate contract

This section is generated by python3 scripts/crate_readmes.py --write from the crate manifest, release train, ownership registry, and crate-guide metadata.

Purpose

Expose canonical frontend IR, compiler artifact, runtime submission, and scan product entry points without re-owning backend contracts.

Boundaries

The public-facade owner maintains this facade crate at vyre. Its allowed internal production dependencies are: vyre-driver, vyre-driver-cuda, vyre-driver-wgpu, vyre-foundation, vyre-megakernel, vyre-runtime, vyre-spec. Any other normal or build dependency requires an ownership-registry change.

Minimal real example

Run the checked-in behavior from vyre/examples/vyre_release_surface.rs:

CARGO_BUILD_JOBS=1 ./cargo_full run -p vyre --example vyre_release_surface

Features

  • Manifest features: cpu-parity, cuda, default, wgpu
  • Default feature members: None

Errors and unsupported behavior

Facade artifact workflows preserve structured compiler, admission, submission, and completion errors. Unavailable targets fail closed without backend fallback.

Testing

Use docs/testing/vyre.md for exact commands, Cargo targets, hardware requirements, evidence outputs, expected skips, and failure semantics.

Release status

vyre@0.7.2 is a publishable crate on the current Vyre release train. Publication still requires the release evidence and user-approval gates.

Ownership

docs/CRATE_OWNERSHIP.toml is authoritative for this crate's responsibility and allowed internal edges. Regenerate docs/CRATE_GRAPH.md and docs/OWNERSHIP.md after changing that registry.

License

Licensed under either of

  • Apache License, Version 2.0, or
  • MIT license

at your option. See the workspace LICENSE-APACHE and LICENSE-MIT files.