Repository navigation
[Refactor] moe: Split the two meanings of num_fused_shared_experts - #44912
Merged
Merged
Conversation
ch-wan
requested review from
Alisehen,
AniZpZ,
BBuf,
Edwardf0t1,
FlamingoPg,
Fridge003,
HaiShaw,
JustinTong0323,
OrangeRedeng,
Ying1123,
b8zhong,
iforgetmyname,
ispobock,
merrymercy,
mickqian,
mmangkad,
ping1jing2,
whybeyoung,
yhyang201 and
yuan-luo
as code owners
October 17, 2026 16:10
This was referenced Oct 17, 2026
ch-wan
force-pushed
the
cheng/hot-fix/per-rank-shared-slot-topk
branch
from
October 19, 2026 23:56
beb15ea to
39bdf12
Compare
ch-wan
requested review from
DarkSharpness,
celve,
fzyzcjy and
hnyls2002
as code owners
October 19, 2026 23:56
3 of 5 tasks
Oasis-Git
added a commit
to sgl-project/sgl-nvidia-mega
that referenced
this pull request
Oct 20, 2026
…fig.num_shared_topk_slots (#15) * [Fix] deepseek_v41: Read the router's shared top-k slots from TopKConfig.num_shared_topk_slots sgl-project/sglang#44912 renamed TopKConfig.num_fused_shared_experts to num_shared_topk_slots, and #44913 backed it with TopKConfig.shared_experts. Every SGLang that has the megakernels framework (#44945) also has both, so with --enable-nvidia-megakernel gate_applies raised "AttributeError: 'TopKConfig' object has no attribute 'num_fused_shared_experts'" and the target's gate, gate_wide and moe slots and the draft's draft_gate and draft_moe slots were built at no width. * Fix missing contextlib import in runtime test --------- Co-authored-by: weireweire <20922698+weireweire@users.noreply.github.com> Co-authored-by: Oasis-Git <ayw.sirius19@gmail.com>
3 of 5 tasks
This was referenced Oct 22, 2026
This was referenced Oct 24, 2026
detain
pushed a commit
to detain/sglang
that referenced
this pull request
Oct 29, 2026
…project#44901) cherry-pick -x 3a059de. PORT ORDER: landed FIRST in this family because its merged mainline chronology makes it the strict precondition of sgl-project#44904 (main merges: sgl-project#44901 16:54 -> sgl-project#44904 16:56 -> sgl-project#44912 16:57 -> sgl-project#44913 16:59; sgl-project#44904's diff preimage literally consumes fused_shared_expert_weight / is_routed_scaling_factor_fused_in_topk introduced here, and sgl-project#44913's preimage deletes the helpers sgl-project#44912 introduces -- the only cherry-pickable order is the mainline one; later commits in this family build on earlier ones). Conflict resolutions (2): * models/deepseek_v2.py: the pick's hunk anchors on `class MergedMoEOutput(MoEOutput)` as CONTEXT, but that class is upstream sgl-project#44657 content this fork never took (review-record skip family), so the region conflicted empty-vs-context. Kept ONLY sgl-project#44901's own addition: _scale_routed_and_add_shared (verified byte-identical to the upstream post-image function text) plus all nine routed_scaling_factor_fused_in_topk sites (two __init__ sets, the aiter shared-scaling compensation block, two non-CUDA post-MoE-multiply guards, and the forward_deepep/state-based forward replacements). Nothing in this tree references MergedMoEOutput; did not smuggle it in. * test/registered/unit/layers/moe/test_mega_moe_decode_capacity.py: modify/delete conflict (the file was created by sgl-project#44657, absent here; sgl-project#44901 merely touched 1 line inside it). Kept it deleted. Fidelity: 7/12 python files are BYTE-IDENTICAL to the upstream post-image (topk.py, hash_topk.py, waterfill.py, moe_ep_setup.py, glm4_moe.py, glm4_moe_lite.py, vl_routing.py). mega_moe/mega_moe_flydsl/bailing_moe_v3/ dots3 landed inside files carrying nemotron-era (sgl-project#44518) upstream drift we do not have; their fold changes were diff-reviewed line by line (old `should_fuse_routed_scaling_factor_in_topk or _use_aiter` predicates replaced by the new config-level predicate; residual old-form reads match upstream's own post-image -- legitimately kept). WaterfillBalancer's routed_scaling_factor kwarg became shared_weight (one production constructor, moe_ep_setup, updated by the pick; no other call sites in the tree). Battery (CVD=9) vs base 0df18e9: test_fused_shared_expert_scaling.py 6P -> 12P/25sub (upstream's +343-line fold matrix, green); test_hash_topk.py 3P -> 4P; test_jit_grouped_topk 10S -> 12S (CUDA-gated adds); every pin held (standard_dispatcher_runner_backend 12P, smallm 28P/66sub, b12x 67P/46sub, kernels_namespace 76P, model_overrides 111P/1S/179sub, modelopt suites exact). Pre-existing classes unchanged (trtllm-gen 8F, fused_gate 46F, round-robin 37F, triton-fused-moe 96F, mem_pool_ep 1F, mega_moe_deepgemm 1F). ruff --select=F401,F821,F823,UP037 + ruff format clean on all 18 files. Fold-predicate e2e on real NVFP4 weights stays GPU-window debt (the standalone CPU contract probe follows this family as its own commit). (cherry picked from commit 3a059de) Co-authored-by: port-moe-contracts subagent (cherry picked from commit c4511d515077ea018200eeccfff256cc25ff18e5)
detain
pushed a commit
to detain/sglang
that referenced
this pull request
Oct 29, 2026
…gl-project#44912) cherry-pick -x 964ab2b. Applies CLEANLY (zero conflicts): the fork never edited topk.py/hash_topk.py since merge sgl-project#4, and sgl-project#44901/sgl-project#44904's post-images (landed in the two preceding commits) exactly reconstruct upstream's preimage at the touched lines. Semantics: TopKConfig.num_fused_shared_experts (the count of fused shared experts) splits into num_shared_topk_slots (the trailing columns the ROUTER writes -- zero when Waterfill appends the shared expert after routing), and TopK.__init__ now derives top_k for the config as routed-per-token + slots instead of mutating the caller's numbers. New helpers waterfill_ routes_shared_experts / shared_topk_slots live in moe/utils.py; the enable_waterfill branch stops silently redefining top_k (waterfill now forces STANDARD output format explicitly). Entry-247 interaction preserved: b12x's _keeps_global_expert_ids and the slot-count vocabulary this family touched before were not in sgl-project#44912's hunk regions; moe/utils.py post-image differs from upstream ONLY by the 7 b12x enum/predicate lines already in the tree (git diff vs 964ab2b: +7/-0), so the split landed upstream-identical and test_b12x_w4a16_route stayed 67P/46sub unchanged. test_manual NPU file (test_npu_topk.py) took the 1-line rename too (hardware_ backend/npu/moe/topk.py likewise); NPU paths are inert here. Battery (CVD=9) vs sgl-project#44904: waterfill_eplb 5P -> 6P/2sub (upstream's new waterfill slot case); everything else byte-stable (scaling 13P/25sub, hash 4P, append 9S, padded 11S, jit 12S, smallm 28P/66sub, dispatcher 12P, b12x 67P/46sub, kernels_namespace 76P, trtllm-gen 8F class). ruff + format clean. NUM_SHARED_TOPK_SLOT wiring at runtime (per-rank append widths on real dispatch) stays GPU-window debt, same as the renorm pair above. (cherry picked from commit 964ab2b) Co-authored-by: port-moe-contracts subagent (cherry picked from commit ad00ea48739c10c0345f572bed8d8aad818c0169)
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 29, 2026
… rides entry 300 (sgl-project#44913) sgl-project#44913 wrapped decode-graph replay in base_runner.model_context() -> get_model().override(shared_experts=...), and get_model() raises "config namespace 'model' not published" on a __new__-built runner stub. Production publishes that namespace, so this is the repo's established fork-stub adaptation class (precedent: entry 294's pp_sync_drain _hcs_state pre-memoization), and the file already stubs every other runner hook the same way. TEST-ONLY, zero production lines. Proven by the integrator: 37P at 0df18e9 and at every pick up to sgl-project#44912; 2F/35P from sgl-project#44913 onward, INCLUDING ON THE WORKER'S OWN TREE (aa671ba8cf) -- so the break is inside the delivered batch, not a base-interaction with the landed waves; their battery list did not cover this file. Restored to 37P by this commit. ruff (repo ruleset) + format + check_registered_tests clean.
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 29, 2026
…20 commits since 12dc623 @ merge-sgl-project#4) Conflicts: 167 files (149 content / 14 add/add / 4 modify/delete) at the settled 309 tip d28e7cd -- dossier predicted 146 +/-25; the +21 shift is entries 275-309 landing qsa-ring/hicache-ctrl/gdn/moe/llguard deltas into the conflict zone. By class: A 13 (auto-takes-upstream, dedupe-verified), B 80, C 56, D 18. 102 TODO(merge5) re-plant/fold markers planted: B1 x15, B2 x29, B3 x12, B4 x23, B5 x23. Re-plant stock: 117 files under /tmp/opencode/merge5-dossier/replant/ (76 fork-hunks patches, 19 upstream-side patches, 14 AA fork copies, 8 preremove snapshots) -- sessions 2/3 re-plant from real code, not memory. D-list outcomes (must-not-auto-resolve, handled personally): - sgl-project#45289-vs-sgl-project#44858 (entry 301): VERIFIED, not re-resolved -- the gate/up-order final form is in origin/main (5b1dbc2 in range); scales test taken as upstream oracle, fork 191-line version saved to replant/ for B5 diffing. sgl-project#44858's call-site shape CANNOT survive (our base never had it). - entry-230 dispatcher vs sgl-project#44993/sgl-project#44994: took upstream structure in token_dispatcher/standard.py; published-value CONTRACT lives upstream via get_moe_runner_backend() in the LoRA-EP guard; fork's warn-once mismatch diagnostic re-plants (B5 marker). UNION GATE: standard_dispatcher 16P (was 12P, suite grew), model_overrides 121P/1S/210sub (was 112P/1S/181sub), fold probe 6P/2F (upstream added a runner_backend arg to the predicate -- B5 re-pins the probe). - entry-219 gauge names vs sgl-project#43727 return + sgl-project#44968: PER-POOL NAMES KEPT as the serving schema -- hicache_host_pool_{used,total}_tokens{pool} dataclass fields, Gauge registrations and labels(pool=) emission re-restored over the #4697x structure; hicache_host_pool_evicted_tokens_total already survived auto-merge; producer dict restored by union in metrics_reporter. ANTI-NEEDLE SATISFIED: old mamba-only gauges are NOT the serving schema. - entry-221 eager-direct add/add: DEDUPED to upstream (bodies identical except est_time 15->9); MEASUREMENT DEBT RECORDED: prefill t/s must be re-measured post-B4 before trusting the est_time. - entry-168 D2H fence vs sgl-project#44800: the fence is ALREADY UPSTREAM (both load_fence_stream + write_fence_stream with the load-thread-corruption comment in origin/main's cache_controller.py) -- nothing re-planted; the two real regions resolved as import-union + comment wording (merge sgl-project#4 stale-tail pattern avoided). Fork hunks still saved to replant/ (belt). - entry-209 clamp + 216/218 ordering + 288-295 hicache-ctrl-era vs #46970x KV rewrite: ADOPTED-UPSTREAM across unified_radix_cache/hicache_storage/ hybrid_cache_controller/memory_pool/kv_cache_builder; EVERY fork hunk extracted to replant/*.fork-hunks.patch; B3 re-plant markers planted. sgl-project#45703's short-full-match seam arrives with upstream. - sgl-project#45090 SGLANG_ENABLE_UNIFIED_RADIX_TREE: REMOVAL TAKEN (fork had already moved it to _DeprecatedEnv; now gone). grep: ZERO .py readers repo-wide; 2 upstream-owned docs jsx snippets still export it (deepseek-v4, glm-5.2 -- upstream's own debt). OPERATOR-OWED CHECK: confirm no /root harness exports it (unreadable from this seat). - sgl-project#39727 unified L3 key: VERIFIED OPT-IN -- merged hicache_storage.py keeps the DEFAULT legacy suffix composition _<model>_<tp_rank>_<tp_size> (content-anchor: HiCacheFile._init_config_suffix, raise-guarded when _unified_chunk_spans is set). ANTI-NEEDLE: no silent key-scheme switch; warm /root/hicache_store contents stay addressable. Modify/delete (4, all victims of upstream sgl-project#45672 test prune + URC split): - test_unified_radix_cache_unittest.py: REMOVED (adopted split) -- its bare unified_tree_core_inspector imports are unreachable post-sgl-project#45236 re-home; fork source + hunks saved; B2 marker planted in the new core test. - test_fused_moe_triton_config.py: REMOVED -- imports common_utils, absent from both sides post-sgl-project#45672; the 2 live entry-3/235 tests re-plant in B2. - test_scheduler_batch_is_full_latch.py: REMOVED -- fork delta was 3 stub-attr lines documenting sgl-project#46643's absorbed arms; upstream deletion correct. - test_qsa_kv_pool.py: KEPT -- fork's 147 added lines are entry-187/200 sharding + 285-287 QSA-ring tests with NO upstream replacement; qsa_kv_pool.py sides converged byte-identical; collects clean. B2 marker. Cascading silent-auto-merge repairs (classes not in the conflict set but broken by auto-merge + union splices -- all found by gates, now fixed): kernels/ops/activation/__init__.py (dead _CUDA registration dup), kernels/ops/ diffusion/__init__.py (5-tuple _SPECS entry), kernels ops embeddings/moe/ attention/mamba __init__ (KernelSpec fields removed upstream: description/ format_signature stripped, CapabilityRequirement->CUDA_ONLY), base_runner/ eager_runner cp_extend + shared_read_event imports retargeted per upstream's "no imports in runner_utils/__init__" contract, and 4 fork helpers grafted back onto their take-upstream homes because merged code/tests still import them (memory_pool.spec_intermediate_bytes_per_req, kv_cache_builder. _adjust_hicache_size_for_draft + _device_pool_size_per_token, hybrid_cache_controller.local_restorable_mask, validation_hook. validate_replayssm_spec_algorithm, arg_groups/moe_hook b12x validator). flashinfer_cutlass.py flipped to FORK-OWNED (b12x route is fork-only, 760 vs 95 lines; upstream sgl-project#44993 hunks = B5 fold patch saved). Silent-semantics notes: sgl-project#46127/sgl-project#44912 riders arrived via per-PR picks (union); sgl-project#45520 (entry 302) is STILL OPEN upstream -- entry-230 fail-safe layer stays as entry 303 records; if a future sync brings it, re-apply the fail-safe reads. qwen4_exp holder-contract fused (ctor takes optional batch). Gates at commit: import sglang OK (CVD=9, prod venv); check_registered_tests/ check_no_bare_pytest_main/check_no_registered_tests_in_package rc=0; ruff F821 +E9+format clean on the resolution set; collect-only over unit/{mem_cache, model_executor,distributed,layers/moe} = 4337 nodes, 3 ERRORS: 2x cargo/torch- sys libtorch probe (REPRODUCED IDENTICALLY AT THE PRE-MERGE TIP -- env issue, not merge damage) + test_hicache_async_ready_sync.py (entry-253-era attribute gone with the URC rewrite -- EXPECTED pre-B3). sessions 2/3 owed: B2 test re-home, B3 mem_cache+rust re-plant (+hicache-ctrl re-ports), B4 scheduler/admission, B5 moe/quant/dispatcher, B6 environ+C0a+ CAVEATS re-pin. PROD BOOT FORBIDDEN until B3 completes (209 clamp + 218 ordering re-plant).
This was referenced Oct 29, 2026
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 30, 2026
…ies 28,165,166,186,194,206,296,297,299,300
PER-MARKER TRUTH (census: B5 markers in this set now ZERO):
kernels/aot topk.cu (28): VERIFIED-ABSORBED -- upstream's in-range
legacy_radix_topk::select rewrite gates the threshold-bin population
against the stash BEFORE staging (coarse_population >= StashEntries ->
full-row byte-per-pass refinement), structurally fixing the overflow
the fork patched after-the-fact; jit twin keeps its s_prefix_bins.
kernels/ops/attention/utils.py (194): VERIFIED-ABSORBED -- the function
re-sited to ops/attention/kv_indices.py (spec_kv_index_token_blocks with
the 32768 gate) and every consumer imports it at that module; the saved
utils re-export would be a dead hunk (zero importers).
elementwise/elementwise.py (166): VERIFIED-PRESENT -- the batch-invariant
num_warps clamp rides upstream's guard_or_false refactor ('or
is_batch_invariant_mode_enabled()' intact).
kvcache/__init__.py (186): VERIFIED-PRESENT -- the store_cache_fp8
registry entry is the merge commit's own graft (entry 310), imports +
capabilities in place.
moe/hash_topk.py + moe/topk.py (296/297/299/300): the merged upstream
canonicals of sgl-project#44901/sgl-project#44904/sgl-project#44912/sgl-project#44913 are IN RANGE (all four
MERGED commits proven ancestors of 2a6c204); every fork symbol
(fused_shared_expert_weight, is_routed_scaling_factor_fused_in_topk,
num_shared_topk_slots x54, has_per_rank_fused_shared_slots,
SharedExpertsConfig wiring) verified present. Markers stale.
moe/flashinfer_trtllm.py (165): SUPERSEDED-BY-EQUIVALENT -- upstream's
own in-range rewrite of the deferred block covers the routed triple
(do_finalize=not defer + _make_deferred_finalize_output) fail-LOUDER
(valid_deferred_input raise); the fork's sgl-project#6077 ignored-autotune-buffer
targeted the OLD block shape and is deliberately NOT restored (GPU
perf-only, defer+routed is not our production arm).
moe/mega_moe.py (296): deep_gemm transform_sf redirect RE-PLANTED to the
guarded wrapper (import-safety contract; sibling fix in dsv4 below).
fused_moe_triton/layer.py (165/206/239): _built_runner_backend hunk
ABSORBED by sgl-project#44993 (config carries the built runner); the entry-206
supports_routed_deferred_finalize property RE-PLANTED (upstream's
packed_nvfp4_routed_deferred covers TRTLLM only, NOT trtllm_routed --
our runner arm), with the sgl-project#44993 2-arg fold predicate; the debug-log OR
re-plant paired.
models/deepseek_v2.py (296/297/300/236): fold chain verified; the
entry-206 format-ternary consumer arm RE-PLANTED (BYPASSED ->
supports_deferred_finalize, else supports_routed_deferred_finalize --
restoring what sgl-project#44993's rewrite dropped).
Battery ACTUALS (CVD=9, prod venv, PYTHONPATH=python, import sglang OK):
fused_shared_expert_scaling + mega_moe_deepgemm_api + moe_runner_
extensions + topk_routing_inputs + model_overrides + kernels_namespace:
GREEN (see B5-4 commit for full 43-file battery actuals)
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 30, 2026
… C closure -- the post-merge port queue is now decided ARRIVAL SCAN (git log 12dc623..2a6c204 --grep) + LIVE gh STATE + head-sha comparison for EVERY deferred item. Verdicts: RELEASED-BY-MERGE: sgl-project#42689 (@ 7a632cf in-range -- the SECTION-B cherry is now redundant; behavior note rides the restart). CLOSED (C-items whose PRs arrived and whose integration this stack performed): C1 (the dedicated merge week WAS merge sgl-project#5; all eight precursor PRs in-range), C2 (sgl-project#44993/sgl-project#44994 -- B5), C3 (sgl-project#45232/ sgl-project#45236/sgl-project#45334 -- B2), C4 (sgl-project#45238/sgl-project#45241/sgl-project#45242 -- B3), C5 (sgl-project#44912/ sgl-project#44913 -- arrived; entry-230 canary re-planted as its guard), C9 (sgl-project#39727 -- verified OPT-IN, no purge; BOOT_DELTA anti-needle), C0a (arrival shas already recorded at entry 310 -- Section C now carries NO open code-integration items: C6/C10 retain only their explicitly-named docs/boot-measurement remainders, re-stated). STILL-OPEN: sgl-project#44342 (head unchanged; auto-merge comfort LOST to #46970x), sgl-project#46153/sgl-project#37106/sgl-project#32479/sgl-project#45391 (gh CONFLICTING -- stale bases, rebase before any port), sgl-project#41624/sgl-project#42525/sgl-project#42660/sgl-project#44462/sgl-project#35617 (open, heads unchanged), sgl-project#46191/sgl-project#39845-class (watch-list, none in range). HOLD STANDS (operator decision, binding): sgl-project#43356/sgl-project#46452/sgl-project#43240/ sgl-project#43471 KV route -- step-1 'MERGE sgl-project#5 lands first' is NOW MET; the sequence may be re-visited ONLY with the post-merge PCIe-IPC measurement at an operator sitting. sgl-project#44732: the 'one purge if done WITH the merge' premise LAPSED when merge sgl-project#5 completed without it -- later execution costs the SAME single purge once; no penalty, no haste. Recorded for the operator, not decided by B6.
This was referenced Oct 31, 2026
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack (oldest at bottom):
Motivation
num_fused_shared_expertscarries two meanings: shared experts executed by the fused MoE layer, and shared id/weight slots emitted by ordinary TopK. Waterfill needs fused computation while appending the shared slots after ordinary routing. Conflating these quantities makes TopK and HashTopK rewrite their constructor arguments for Waterfill.Modifications
num_fused_shared_expertsfor the experts-layer layout and usenum_shared_topk_slotsfor shared output positions emitted by ordinary routing, before Waterfill expansion.shared_topk_slots: the fused count normally, zero when Waterfill writes the slots later. Construct TopK/HashTopK from these meanings directly.#44913 places both quantities in one immutable model-owned configuration and exposes it through
get_model().shared_experts.Validation
456745b5ee→6a5c963f49): inverse-renaming yields identical Python ASTs in all 15 changed files. Applicable pre-commit hooks pass.6a5c963f49and PR2b500124929: GLM-4.7-Flash on 2× H200, BF16, TP2, Triton attention/MoE, decode CUDA Graph batches 1/2/4, routed-experts capture enabled. Four sequential greedy requests have identical tokens and expert routes. One of two batched requests varies between repeated PR1 runs; the repeated PR1 run matches PR2 on all six requests.After integrating #44901
6c1b70e909and #449044676743e28, PR1b7f88f502epasses all 13 scaling CPU tests and all nine CUDA append/remap/runtime-routing tests on one H200 (same libraries as above). The inherited folding-mode and global shared-slot regressions use this PR's slot-count API. Applicable pre-commit hooks pass.Coverage limits: no full-model Waterfill, fused-draft, distributed DeepEP/MegaMoE, AMD, NPU or XPU run in this validation. The GLM smoke is a limited equivalence check, not an accuracy benchmark.
CI fixture follow-up at
720d6dbef4The ROCm 10 MI35x job failed at
faaf4bb4e6becausetest_deepseek_v4_amd_tp4.py::_moe_stubbypassesDeepseekV2MoE.__init__and omittedrouted_scaling_factor_fused_in_topk. The stub now supplies that construction state. The other five test files in that partition passed. This fixes the test fixture; production executable behavior is unchanged.On one H200, the original fixture reproduces the same AttributeError with the AITER epilogue flags forced; after repair, all four normal/dual-stream and shared-TP1 combinations pass through the actual forward methods. This checks the Python fixture/epilogue contract, not native ROCm collectives or graph replay. The complete AMD TP4 file still needs CI validation.
The kernel comparison now covers normalization and explicit folding independently; the complete standalone router test file passes all 52 cases on one H200. Its stale normalization explanation and CUDA JIT parity claim are corrected. The CUDA counterpart retains its existing unnormalized shared-weight behavior; caller search found tests and benchmarks, with no serving caller.
TopKConfig documents its total ordinary output width and the global AITER absolute shared coefficient versus the standard-path multiplier. Eager/fused subtest labels include the folding mode. Duplicate ordinary model-context scopes and a derived routed-count property remain optional follow-ups. Applicable pre-commit hooks pass. No native AMD rerun or model accuracy result is claimed for this follow-up.
The repaired stack is #44901
cdf052beb7→ #44904beb15ea999→ #44912720d6dbef4→ #449135214d477ec.Landing cleanup (2026-10-19)
Current head:
ac55bb9625, rebased onto main after #44901 and #44904 merged.Condensed repetitive slot-count and Waterfill explanations without changing executable statements. Configured pre-commit and comment/docstring AST comparisons passed on the cleanup diff. The focused exclusive-writer regression remains in normal CPU CI; broader routing and compile coverage moves to Extra in #44913. Earlier hardware results above retain their recorded revisions; no new accelerator or full-model run is claimed for this cleanup/rebase.
CI States
Latest PR Test (Base): 🚫 Run #39344688234
Latest PR Test (Extra): 🚫 Run #39344688142
Latest PR Test (AMD ROCm 10): ❌ Run #39344688148