Expand description
§vyre-runtime - persistent megakernel + io_uring zero-copy
This crate provides the execution runtime for vyre - the layer between “I have a compiled Program” and “bytes flow through the GPU continuously.”
§Architecture
megakernel- the persistent GPU process. A vyreProgramwrappingNode::foreverthat loops a ring-buffer interpreter or a JIT-fused payload processor.protocol- slot layout, control words, opcodesopcode- built-in opcode handlers + extension mechanismbuilder- IRProgramconstruction (interpreted + JIT)
cache- content-addressed compilation cache.stream-GpuStreamglue bridging io_uring completions to the megakernel tail pointer.uring(Linux only) - rawio_uringsyscall wrappers.
§Design laws
- No CPU executor on the hot path. Compatibility ingest may submit registered mapped reads, but the native path is NVMe passthrough into BAR1 GPU memory; after launch the megakernel owns execution and the CPU only touches queue metadata.
- Megakernel is IR, not target-text. The persistent kernel is a
ProgramanyVyreBackendcan compile + dispatch. - Structured errors, never silent swallowing. Every failure
mode returns
PipelineErrorwith aFix:hint.
Re-exports§
pub use replay::RecordedSlot;pub use replay::ReplayLogError;pub use replay::RingLog;pub use tenant::TenantError;pub use tenant::TenantHandle;pub use tenant::TenantRegistry;pub use tenant::OPCODE_RANGE_PER_TENANT;pub use tenant::TENANT_ID_MAX;pub use tenant::TENANT_OPCODE_BASE;pub use pipeline_cache::RemoteCache;pub use pipeline_cache::DiskCache;pub use pipeline_cache::DiskCacheError;pub use pipeline_cache::InMemoryPipelineCache;pub use pipeline_cache::LayeredPipelineCache;pub use pipeline_cache::PersistentPipelineCacheStore;pub use pipeline_cache::PipelineCacheMetrics;pub use pipeline_cache::PipelineCacheStore;pub use pipeline_cache::PipelineFingerprint;pub use megakernel::Megakernel;pub use uring::GpuMappedBuffer;
Modules§
- megakernel
- Persistent megakernel - the vyre Program that runs forever on the GPU, decoding host-fed ring opcodes from a host-fed ring buffer. Persistent megakernel - the GPU becomes a VIR0 bytecode interpreter.
- pipeline_
cache - Content-addressed pipeline cache:
blake3(canonicalize(p).to_wire())is the cache key. P4.3 - content-addressed pipeline cache. - replay
- Differential megakernel replay log - captures every published ring slot so a later cert run can diff epoch-by-epoch execution against a live backend. Differential megakernel replay log.
- routing
- Backend routing policy for execution plans. High-level execution routing engine.
- scheduler
- Multi-GPU work partitioning across runtime backends. Multi-GPU work stealing scheduler (Innovation I.7).
- tenant
- Multi-tenant megakernel multiplexing - one persistent kernel per
GPU, shared across producer tools via the
tenant_idfield already in the ring protocol. Multi-tenant megakernel multiplexing. - uring
- Linux io_uring integration. Compiled out on macOS / Windows.
Linux io_uring scaffolding for NVMe → GPU-visible memory streaming.
All items here are gated on
cfg(target_os = "linux")and compiled out on every other platform.
Structs§
- GpuStream
- Handle to an orchestrated pipeline. Couples a compiled megakernel to its submission + completion infrastructure.
Enums§
- Pipeline
Error - Errors surfaced by the runtime layer. Every variant carries a
Fix:-bearing message so a reviewer can act on the failure.