feat: INT32 atomic MoE kernel for deterministic accumulation#2005
Open
Mortis-Huang wants to merge 1 commit intoROCm:dev/perffrom
Open
feat: INT32 atomic MoE kernel for deterministic accumulation#2005Mortis-Huang wants to merge 1 commit intoROCm:dev/perffrom
Mortis-Huang wants to merge 1 commit intoROCm:dev/perffrom
Conversation
Replace BF16 atomic add with INT32 atomic add in MoE kernel to achieve bit-identical results across runs. Enable via: export AITER_MOE_INT32_ATOMIC=1 - Kernel: INT32 scale factor 32768, interleaved layout - Python: INT32 post-processing + forced kernel selection - Accuracy: 94.5% GSM8K (vs 94.6% BF16 baseline) - Consistency: 10/10 bit-identical (131,072 elements)
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.
Summary
global_atomic_pk_add_bf16withglobal_atomic_add(INT32) in MoE kernel to achieve bit-identical results across runsfused_moe.py(scale factor 32768, interleaved layout decode)non-PS non-tkw1variant to avoid unmodified kernel pathsHow to Enable
export AITER_MOE_INT32_ATOMIC=1Files Changed
aiter/fused_moe.pyhsa/gfx942/fmoe/silu/fmoe_bf16_pertokenFp8_g1u1_vs_silu_1tg_32x192.coTest Results
Consistency (bit-identical)
verify_int32_consistency.pyGSM8K Accuracy (parallel=64, 1319 questions)
TTFT (input=8000 tokens, concurrency=1)
Output Stability (request_ali.py, temperature=0)
Known Limitations
non-PS non-tkw1variant modified)Test Plan