Files
vetta-infer/crates
adm b99d3a7a6a [HIP] attention + MoE router + vec_add kernels (GPU-verified, parity vs reference semantics)
- k_flash_gqa_decode: single-token GQA attention over a f32 KV cache,
  two-pass softmax, correctness-first base. Parity vs CPU oracle ~3e-6 on the
  real Inkling shape (24 heads / 8 KV, hd 128). SWA window / relpos bias /
  sinks / split-KV / WMMA are the later parity+performance refinements.
- k_moe_router_topk: Inkling EXACT sigmoid router, semantics verified against
  strata k4_moe_router_topk — p=sigmoid(logit), score=p+bias, top-K by score
  (smallest eid wins ties), weight=p[chosen], renormalized to route_scale.
  Parity: top-k ids exact, weights ~1e-5 (128 experts, top-8, route_scale 8).
- k_vec_add: y=a+b elementwise (residual stream), exact.
- C ABI + safe Rust wrappers + DeviceBuf byte/i32 transfers + CPU-oracle tests.

Six compute kernels now verified on gfx1150 (embed, rms_norm, gemm_bf16,
flash_gqa, moe_router, vec_add); the base decode graph is covered except the
NVFP4 expert GEMMs (w13/w2) + reduce. Approach: standard correctness-first
math, Inkling-specific features ported from the measured reference (no
invented attention variants); performance pass (WMMA/split-KV) comes after.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; GPU parity 7/7 (--features hip).
2026-12-01 13:53:56 +01:00
..