Goal
Exploit routed expert reuse with a bounded, GPU-resident indexed work plan for the live 35B rather than a second MoE executor. Reduce CPU sorting, redundant weight reads, empty/imbalanced CTA work and scatter overhead where measured. Preserve exact router/top-k/shared expert semantics and accumulation order.
Grounding and existing work
CUDApp main b759afc3f5e46f152ffb06b39882ffa28cacaf96 and omega-mv main 6999fa9e6dae4847c155ef4eacaece74f491d3ca inspected 2026-10-28. Reinspect heads, active branches and complete source/receipts before editing.
src/omega_gpu_q36_graph.csingle-token path already uses router → 9-group FP8 GEMV (8 routed + shared) → SwiGLU → down → combine. BatchK_GROUPalready builds sorted expert segment tables on GPU. Prefillpf_group()currently counts/sorts n×8 routed expert selections on the host, andpf_record_experts()dispatches grouped GEMM plus dedicated shared expert.src/omega_gpu_fp8gemm_api.candsrc/omega_gpu_tcgemm_api.calready have indexed row maps/segment/tile tables; reuse these contracts, never replace working grouped kernels blindly.- Merged PR #137 showed a 15.74% kernel-only gate/up+down improvement for 9 groups (6×9 → 5×9 CTAs, 164698 → 138776 ns); the ~1.037 ms/40-layer projection was modeled, not live server TPS. Retain as incumbent, don't claim it again. Router split PR #136 lost and was not merged.
- Existing #18 owns gate/up+SwiGLU fusion; #78 owns compressed expert weight decoding; Omega #604 owns qualified cached-scratch baseline. This issue owns indexed expert work planning/execution only, no duplicate fusion or model loader.
Delivery slices
- Pin live Qwen3.6-35B-A3B (40 layers, 256 routed + 1 shared, 8 routed picks per token) model/source/checkpoint, effective batch, server settings and exact baseline. Distinguish single-token decode, batched decode and multi-token prefill; validate which existing GPU
GROUPpath already eliminates host sorting. - Version bounded queue/segment descriptor in native
.om:(expert_id, source_row, token_id, route_slot, weight_slot, segment_offset, count, destination, contribution_order), with deterministic stable ordering and explicit shared-expert slot. Capacity, duplicate picks, no-pick, all-same, all-distinct, uneven occupancy and ragged tails require refusal or correct behavior. - Start with tracing/planning-only A/B and independent oracle; advance the existing GPU
GROUPand prefill hostpf_grouptoward shared GPU-resident stable indexing only when cheaper end to end. Reuse canonical command-list, memory/cache/driver and one launch policy. Keep per-expert CTA assignment adaptive to valid group sizes/SM waves, not simply maximal occupancy. - Compare incumbent grouped GEMV/GEMM to indexed gather→expert compute→scatter→combine. Account for sort/plan upload, gather, temporary buffers, weight residency, launch/barrier count, cache traffic and CPU time. Evaluate single-token versus batch/prefill separately; no unsupported inter-CTA spin/barrier.
- Under #16 numerical contracts / #17 benchmark, validate all routed IDs/weights, expert and shared results, logits/tokens, finite and adversarial cases. Sequence optional #18 fusion after indexed baseline without double-counting savings.
Acceptance / negative gates
- CPU and on-device plans are independently checked; duplicate-route/shared-expert/overflow/zero-work/row-alias/ragged mutants caught.
- Predeclared paired A/B for B=1, small and larger supported batches, prefill; full graph and model-level TPOT/TTFT/p95/throughput and bytes recorded, including unfavorable outcomes.
- At least one bounded GB10 path is CHIP_EXERCISED; no production activation without complete real 35B validation, correct numerics and a robust end-to-end win.
- No assumption a kernel-only A1 gain implies model throughput improvement; model/default unchanged if no qualified win.
Delivery rules. New first-party production code/tests are native seeded .om; C sources can serve as migration/differential oracles until qualified cutover under #79. Preserve immutable receipts, one writer per shared file, no second GPU session/driver/IR/compiler. No silent CUDA/PTX/cuBLAS dependency. Keep the live 35B, driver and hardware scheduling unchanged; chip tests require an authorized GB10 window. Label HOST_TESTED/SIMULATED/CHIP_EXERCISED/WHOLE_MODEL_QUALIFIED separately; NOT_RUN/BLOCKED cannot become PASS. Record exact source/seed/compiler/target/binary/model hashes, commands/exits, positive and mutation results, baseline/variant raw timings.
Workstream links (2026-10-28)
Use #156 quant metadata to preserve expert weight layout, #157 components only when verified, #158 cache for prewarmed shape variants and #57 selector for bounded B=1/batch/prefill dispatch. #18 fusion and #78 packed experts remain independent, separately measured optimizations. Absolute original 35B model-level baseline is governed by Omega #604.