Repository navigation
[MoE][Qwen3.8] Replace gfx942 prefill inverse routing with Opus aux sort - #7
Merged
Merged
Conversation
This reverts commit e9a4447.
…to `invert_sorted_ids` (cherry picked from commit 4641dd7)
The cherry-picked gfx942 prefill change needs AUX_SORT_OPUS and initialized reverse maps on this branch. Request Opus explicitly while retaining the caller's sorting policy and the legacy boolean aux behavior. Backport the multi-phase aux outputs from fe4814c and reverse-map initialization/validation from dcb7c7f. Remove inversion from this branch's AOT precompile entry point. Adapt the cherry-picked tests to existing kernel paths, four-field config suffixes, and compile-time CU specialization. Add deterministic reverse-map, all-skipped-route, BF16/FP8 zero-weight padding, and graph replay regressions. Retain FlyDSL 0.3.2 and the existing kernel compilation wrappers. Validation on MI308X/gfx942: 23 targeted pytest cases; 32 sorted reductions; 4 random/padding whole-MoE checks; task-table and compact-MoE smoke checks; BF16/FP8 AOT precompile; Black, Ruff, and git diff --check.
apinge
marked this pull request as ready for review
October 28, 2026 01:30
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.
Revert the zero-row workaround from #6 and reuse Opus auxiliary reverse-route maps for gfx942 MoE prefill. Initialize omitted routes to -1 and skip their contributions during reduction to prevent uninitialized-index reads.
This PR introduces the modification from ROCm#4526 to let the new prefill path obtain the reverse-route map from Opus while allowing multi-phase sorting.
This PR also introduces the modification from ROCm#6467 to initialize the reverse-route table to -1 before sorting.