[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).
This commit is contained in:
1 parent
529709cc64
commit
1b3896bba9
2 files changed
+176
-5
No files matched your search
@@ -34,6 +34,7 @@ pub enum VplanOp {
|
||||
MoeRouterTopk,
|
||||
VecAdd,
|
||||
CastF32Bf16,
|
||||
Situ,
|
||||
VitFlashAttnWmma,
|
||||
GpuPenaltiesTopk,
|
||||
// Encoder lane (M1.5 embedder, docs/ARCHITECTURE.md §4)
|
||||
@@ -83,6 +84,7 @@ impl VplanOp {
|
||||
Self::MoeRouterTopk => "moe_router_topk",
|
||||
Self::VecAdd => "vec_add",
|
||||
Self::CastF32Bf16 => "cast_f32_bf16",
|
||||
Self::Situ => "situ",
|
||||
Self::VitFlashAttnWmma => "vit_flash_attn_wmma",
|
||||
Self::GpuPenaltiesTopk => "gpu_penalties_topk",
|
||||
Self::LayerNorm => "layer_norm",
|
||||
@@ -121,6 +123,7 @@ impl VplanOp {
|
||||
"moe_router_topk" => Self::MoeRouterTopk,
|
||||
"vec_add" => Self::VecAdd,
|
||||
"cast_f32_bf16" => Self::CastF32Bf16,
|
||||
"situ" => Self::Situ,
|
||||
"vit_flash_attn_wmma" => Self::VitFlashAttnWmma,
|
||||
"gpu_penalties_topk" => Self::GpuPenaltiesTopk,
|
||||
"layer_norm" => Self::LayerNorm,
|
||||
@@ -155,7 +158,7 @@ mod tests {
|
||||
VplanOp::GdnRecurrentStep, VplanOp::MoeRouteBucket, VplanOp::MoeW13Wmma,
|
||||
VplanOp::MoeW2Wmma, VplanOp::MoeReduce, VplanOp::VitFlashAttnWmma,
|
||||
VplanOp::AttnResMix, VplanOp::ShortConv4, VplanOp::LoopCtrl, VplanOp::L2Clip,
|
||||
VplanOp::KvStore, VplanOp::RelPosBias, VplanOp::MoeRouterTopk, VplanOp::VecAdd, VplanOp::CastF32Bf16,
|
||||
VplanOp::KvStore, VplanOp::RelPosBias, VplanOp::MoeRouterTopk, VplanOp::VecAdd, VplanOp::CastF32Bf16, VplanOp::Situ,
|
||||
VplanOp::GpuPenaltiesTopk, VplanOp::LayerNorm, VplanOp::FlashFullAttn,
|
||||
VplanOp::GeluErf, VplanOp::PoolL2norm, VplanOp::LoopLayer, VplanOp::BranchB,
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user