3 Commits
Author SHA1 Message Date
adm 1b3896bba9 [RT][ABI] executor dispatches full MoE path; composed MoE expert forward verified on GPU
- rt::executor: dispatch NVFP4 expert GEMV (MoeW13Wmma/MoeW2Wmma -> nvfp4_gemv),
  SiTU activation, MoE weighted reduce. execute_with(get) core + execute /
  execute_refs wrappers (owned or borrowed buffer tables, for shared weights).
- abi::vplan: Situ opcode (32 total).
- Composed MoE expert path test: router -> per-expert (w13 NVFP4 GEMV -> SiTU
  -> w2 NVFP4 GEMV) -> weighted reduce, verified end-to-end vs a full CPU
  oracle (router sigmoid top-k + NVFP4 dequant + SiTU). max_rel_err 9.2e-7.
  The entire MoE compute of the base decode graph now runs composed on GPU.

With the trunk composed forward, the executor proves both halves of the base
graph (attention trunk + MoE experts) compose correctly on real hardware.
Remaining for full inference: lowering CompiledPlans+IR -> ExecOp (shape
attachment) + .vbundle packer (real weights -> device), then Inkling parity
refinements + serve wiring.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; GPU 10/10 + rt composed 2/2
(--features hip).
2026-12-01 14:16:04 +01:00
adm 87a66aee37 [RT][HIP] GPU executor core + first composed trunk forward verified on gfx1150
- 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).
2026-12-01 13:57:07 +01:00
adm 7b50f1c07c [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.
2026-11-30 00:54:00 +01:00