Expand description
§vyre - LLVM-for-GPU
Vyre is a GPU compute substrate centered on the Program type. Just as
LLVM lets frontends emit a single IR that lowers to many processor targets,
vyre lets frontends emit a single Program that lowers through any
registered backend or the pure-Rust reference interpreter. The crate root
re-exports the frozen public API: the Program type, the VyreBackend
trait, and the standard operation library.
Frontends, backends, and conformance tools depend only on the stable types exported here. Changing the target-text lowering path never breaks a frontend; changing a frontend AST never affects backend dispatch logic. This module is the single source of truth for the vyre public API.
Modules§
- backend
- Backend trait surface -
VyreBackend,Executable,Streamable,DispatchConfig,BackendError,ErrorCode. The whole backend contract every driver crate implements against. Public API re-export. Public API re-export. VyreBackend trait, BackendError, capability records, validation. Frozen backend extension contract. - cpu_op
- Wire-format CPU-reference byte ABI contract.
Public API re-export.
CPU-side
Optrait + helpers for op-by-op evaluation. CPU reference execution contract for operation types. - cpu_
references - CPU reference implementations shared across backends. Public API re-export. CPU reference implementations of substrate primitives. CPU references for substrate kernels foundation needs locally.
- diagnostics
- Structured, machine-readable diagnostics. Public API re-export. Structured, machine-readable diagnostic rendering. Structured, machine-readable diagnostics.
- error
- Unified error types for the entire crate. Public API re-export. Unified error type for validation, wire format, lowering, and execution. Error types for IR validation, wire-format decoding, and GPU operations.
- execution_
plan - Substrate-neutral execution planning for performance and accuracy tracks. Public API re-export. 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 Program model.
- lower
- Program lowering to the substrate-neutral kernel descriptor.
- match_
result - Re-export of the native scan match result type from the foundation crate. Public API re-export. Public API re-export. Engine-wide match-result type (carries findings + telemetry). Native scan match result - legacy scan-domain shim.
- memory_
model - Substrate-neutral memory ordering model. Public API re-export. Memory model: ordering, scope, and consistency rules. Substrate-neutral memory model contracts.
- optimizer
- IR-to-IR optimizer pass framework.
- pipeline
- Pipeline-mode dispatch: compile a Program once, dispatch repeatedly. Public API re-export. Public API re-export. Compiled-pipeline cache, dispatch config, batched dispatch. Pipeline mode - pre-compile a Program once, dispatch repeatedly with new inputs.
- routing
- Distribution-aware runtime algorithm selection. Public API re-export. Runtime routing: profile-guided variant selection, algorithm heuristics. Runtime distribution-aware algorithm routing.
- soundness
- Soundness lattice for dataflow primitives. Canonical home is
vyre-foundation; re-exported here so vyre-libs (and any downstream consumer) reaches it viavyre::soundness. Per the LEGO discipline, vyre never imports from domain dataflow crates - this is the originating definition. Soundness lattice for dataflow primitives. Canonical home - dataflow engines and composition crates consume from here per the LEGO discipline (consumers always calls vyre, vyre never calls anything else). Soundness regime markers for dataflow primitives.
Structs§
- Backend
Registration - One backend constructor contributed by a linked backend crate.
- Byte
Range - Domain-neutral byte-range type.
A tagged, half-open byte range
[start, end). - Dispatch
Config - Immutable execution policy supplied by the caller before dispatch.
- Interp
Ctx - Re-export of the core IR program type and validation entry point.
- Match
- Re-export of the native scan match result type.
- NodeId
- Re-export of the core IR program type and validation entry point.
- Program
- Re-export of the core IR program type and validation entry point.
- Resident
Graph Reuse Telemetry - Cold-upload and warm-reuse counters for a retained resident graph.
Enums§
- Backend
Error - Actionable backend dispatch failure.
- Error
- The unified failure enum for every vyre operation.
- Memory
Ordering - Substrate-neutral memory ordering type. Public API re-export. Memory ordering attached to atomic and barrier operations.
- Node
Storage - Re-export of the core IR program type and validation entry point.
- Persistent
Thread Mode - Persistent-thread dispatch policy for dispatch paths. Caller-controlled persistent-thread dispatch policy.
- Resident
Graph Reuse Telemetry Error - Resident graph reuse telemetry arithmetic failed.
- Speculation
Mode - Speculation policy for dispatch paths. Caller-controlled speculation policy.
- Value
- Re-export of the core IR program type and validation entry point.
Constants§
- OPTIMIZE_
CACHE_ CAPACITY - N9 cache capacity (entries). Sized to hold the working set of a
long-running scanner without unbounded growth - each entry is
roughly the size of one optimized
Program. 256 entries is~10MBworst-case for typical scanner-shaped Programs.
Traits§
- Compiled
Pipeline - A program that has been pre-compiled by a backend, ready for repeated dispatch with new inputs without paying compilation cost on each call.
- Executable
- Backend capability for direct program execution.
- Typed
Dispatch Ext - Extension methods for callers that work with typed POD buffers instead of manually packing and unpacking byte vectors.
- Vyre
Backend - The frozen contract between vyre and every execution backend.
Functions§
- optimize
- R2: single canonical pre-lowering optimize entry point.
- optimize_
for_ backend - Device-aware public optimizer entry point for a live backend.
- optimize_
for_ device - Device-aware public optimizer entry point.
- validate
- Re-export of the core IR program type and validation entry point.
Type Aliases§
- Memory
- Owned memory returned by a backend dispatch.
- Memory
Ref - Borrowed memory supplied to a backend dispatch.
- OpId
- Re-export of the core IR program type and validation entry point.
- Output
Buffers - Output of one dispatch: a vector per output buffer slot, each
vector holding the raw bytes read back from the GPU. Consumers
decode the bytes per the Program’s output buffer declarations.
The outer vec is indexed in the same order as the Program’s
is_output: truebuffers.