- rt::executor (feature `hip`): the bridge from the arena-validated plan to
GPU compute. ExecOp { op, reads, writes, params } + OpParams (concrete
shapes) + execute() dispatching the verified microkernels (embed, rms_norm,
gemm_bf16, flash_gqa, moe_router, vec_add, cast). Lowering CompiledPlans+IR
-> ExecOp lands with the packer; this core proves dispatch + composition.
- First COMPOSED GPU forward: embed gather -> rms_norm -> cast f32->bf16 ->
gemm(unembed), verified end-to-end vs a CPU oracle (<1e-4). The composition
test caught a real dtype-transition bug (f32 activation fed to a BF16 GEMM)
— fixed by adding the cast kernel the reference also inserts before matmul.
- kernels/hip: k_cast_f32_bf16 (f32 activation -> BF16 truncate) + C ABI +
wrapper. abi::vplan: CastF32Bf16 opcode (31 total).
- rt: optional hip dependency, feature-gated (default workspace stays
host-independent).
Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; GPU parity 7/7 + composed trunk
forward 1/1 (--features hip). Principle recorded: parity-first baseline, then
our own measured improvements (Federico).
11 lines
442 B
Rust
11 lines
442 B
Rust
//! `vetta-infer-rt`: operational runtime (docs/ARCHITECTURE.md §2, §5).
|
|
//!
|
|
//! Executes the boot-lowered `CompiledPlan` on the HIP backend at full speed,
|
|
//! zero probes on the hot path. `lab` shares this executor core. Hosts the
|
|
//! hybrid prefix/checkpoint state and (feature `hip`) the GPU executor that
|
|
//! dispatches the arena-validated plan onto the verified microkernels.
|
|
|
|
pub mod prefix;
|
|
|
|
#[cfg(feature = "hip")]
|
|
pub mod executor; |