[ABI][KN][LD][CC][RT][LAB][SP][NT][TM][GW][Proofs][Docs] M0.5: realign workspace to vetta-infer-* microkernel architecture
Dissolve the M0 crates (core/io/proto/telemetry/hip/cli) into the approved service layout abi/kn/ld/cc/rt/lab/sp/nt/tm/gw (docs/ARCHITECTURE.md). - kn: Lean-verified control bus + service registry (bus_lifecycle.lean, 14 thms) and SlabRing/UMA broker; rt: PrefixState + hybrid checkpoint pool. - sp: faithful throughput-aware Adaptive-K port of clover_policy.h (cooldowns, probes, throughput guards) with scenario parity tests. - gw: strata-ctl-compatible wire emitters + serve session FSM (serve_session.lean, 10 thms); abi::serve accepts image= (Vision delta closed). - abi: pure contracts, checked JSON/VTC1/GEN parsers, zero-alloc sampler. - ld/cc: checked safetensors reader + write-once VTC1 writer / O_RDONLY reader. - tm: lock-free telemetry; nt: LyraRpc; lab shares the rt executor core. - Docs: ARCHITECTURE.md decision-complete spec (MoE-only scope, .vbundle, .vplan->CompiledPlan, wire contract, migration map); AGENTS.md Lean rule + tandem/review workflow. Verified live: cargo test --workspace -D warnings = 46/46 PASS; lean proofs = 34 theorems (slab_ring_dma 10, bus_lifecycle 14, serve_session 10), 0 sorryAx, standard axioms only; vetta-infer info on Inkling = 1244 tensors, 18.18 GiB, checked bounds.
This commit is contained in:
1 parent
63b1668a92
commit
7b50f1c07c
49 files changed
+3211
-1208
No files matched your search
@@ -0,0 +1,53 @@
|
||||
//! `.vplan` micro-bytecode opcodes (docs/ARCHITECTURE.md §4).
|
||||
//!
|
||||
//! Flat, fixed, non-Turing-complete: each compute opcode maps 1:1 to a HIP
|
||||
//! microkernel in `kernels/hip/vetta_kernels.h`. Control flow is limited to
|
||||
//! `LoopLayer` / `BranchB` so `memory.vplan` arena safety stays decidable
|
||||
//! in Lean 4. Operands are resolved at boot into `CompiledPlan` (rt), never
|
||||
//! looked up per token.
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum VplanOp {
|
||||
// Compute opcodes (1:1 with the <15 microkernel set)
|
||||
EmbedBf16,
|
||||
RmsNorm,
|
||||
QuantizeXG64,
|
||||
GemmQ8G64T16,
|
||||
GemmQ4G64T16,
|
||||
GemmNvfp4Mxfp8,
|
||||
RopeKvWrite,
|
||||
FlashGqaWmma,
|
||||
GdnChunkwiseWy,
|
||||
GdnRecurrentStep,
|
||||
MoeRouteBucket,
|
||||
MoeW13Wmma,
|
||||
MoeW2Wmma,
|
||||
MoeReduce,
|
||||
VitFlashAttnWmma,
|
||||
GpuPenaltiesTopk,
|
||||
// Restricted control flow
|
||||
/// Repeat the enclosed layer body for each model layer.
|
||||
LoopLayer,
|
||||
/// Batch-size dispatch (e.g. prefill `B >= 16` vs Split-KV decode `B <= 2`).
|
||||
BranchB,
|
||||
}
|
||||
|
||||
impl VplanOp {
|
||||
/// True for the two restricted control-flow opcodes.
|
||||
pub fn is_control(self) -> bool {
|
||||
matches!(self, Self::LoopLayer | Self::BranchB)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn control_vs_compute() {
|
||||
assert!(VplanOp::LoopLayer.is_control());
|
||||
assert!(VplanOp::BranchB.is_control());
|
||||
assert!(!VplanOp::GemmQ8G64T16.is_control());
|
||||
assert!(!VplanOp::GdnChunkwiseWy.is_control());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user