Expand description
vyre-aot - Ahead-of-time compilation for vyre Programs.
Vyre is a JIT-friendly substrate: at runtime, a Program is lowered
through vyre-driver to a backend-specific module loaded by the GPU
driver. That works when the consumer can ship the entire vyre runtime
alongside the artifact.
For embedded targets and code-budget-constrained submissions
(parameter-golf is the motivating case: code_bytes + compressed_model_bytes ≤ 16,000,000) we need the compiler to disappear at runtime. Only the
pre-emitted target bytes plus a tiny backend loader should ship.
§Public API
Three functions:
compile: lower aProgramto aCompiledArtifactcontaining target-specific kernel bytes, the buffer-binding table, and the dispatch config.emit_launcher_rust: generate a self-contained Rust launcher crate source tree that loads the artifact via raw driver-API FFI and dispatches it.bundle: package an artifact + weight bytes + launcher source into the final on-disk submission tree.
Concrete driver crates register AOT emitters through vyre-driver.
Re-exports§
pub use artifact::BufferAccessKind;pub use artifact::BufferEntry;pub use artifact::BufferMemoryKind;pub use artifact::CompiledArtifact;pub use artifact::DispatchGeometry;pub use bundle::bundle;pub use bundle::Bundle;pub use bundle::BundleError;pub use compile::compile;pub use compile::CompileError;pub use launcher::emit_launcher_rust;pub use launcher::LauncherError;pub use launcher::LauncherOpts;pub use manifest::Manifest;
Modules§
- artifact
- Compiled artifact data model.
- bundle
- Submission-bundle packager.
- cache
- Runtime-cache compatibility for AOT-emitted artifacts (audit P0 #26). Runtime-cache compatibility for AOT-emitted artifacts (audit P0 #26).
- compile
- Program → CompiledArtifact lowering.
- launcher
- Rust launcher source generator.
- manifest
- Submission-bundle manifest.
Enums§
- Target
- Lookup target for a dialect op’s lowering path.
Constants§
- VERSION
- Crate version surfaced into emitted artifacts and manifests.
Functions§
- observability_
snapshot - Snapshot the driver-tier observability surface from inside vyre-aot. Exposes substrate counters + decision histograms so callers emitting AOT bundles can include them in their build provenance.
- program_
fingerprint - VSA-fingerprint a Program with the same key family AOT artifacts
persist on
CompiledArtifact::vsa_fingerprint. Producers use this to pre-check whether the artifact already exists before paying the compile cost.