Repository navigation
Conversation
With ATOM_FP8_BLOCKSCALE_USE_E8M0_SCALE, the SiTUv2 activation fused only a per-token quant, so the shared expert's down_proj (and layer 0's dense one) ran its own per_1x128_e8m0_quant. Add an E8M0 mode to ATOM's SiTUv2 kernel (situ_and_mul_fp8_e8m0_quant) and fuse it. Output is byte-identical to situ_and_mul + per_1x128_e8m0_quant.
1 task
This branch has not been deployed
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.
Motivation
With
ATOM_FP8_BLOCKSCALE_USE_E8M0_SCALE=1,KimiMLP's SiTUv2 activation fuses only a per-token quant (aitersituv2_and_mul_quant). For an E8M0 per_1x128down_projit writes bf16, anddown_projruns a separateper_1x128_e8m0_quant: in the shared expert of every MoE layer (Kimi-K3 TP8: 2.0-2.2 us per layer in decode, mostly overlapped on the side stream; about 4.5 us per layer in prefill, on the main stream) and in layer 0's dense MLP.Technical Details
Source +98/-16, tests +67. Depends on the out-gate PR (
triton_e8m0_quant.py)._situ_and_mul_kernelgets anE8M0_SCALEmode, exposed as thesitu_and_mul_fp8_e8m0_quantcustom op. Same launch and tiles assitu_and_mul, rounded to bf16 before the quant, so the output is byte-identical tositu_and_mul+per_1x128_e8m0_quant.KimiMLP/SituAndMulfuse for an E8M0down_proj; this path does not needlinear_beta.Behavior changes only for an E8M0 per_1x128
down_proj.Test Plan
tests/model_ops/test_kimi_k3_situ_e8m0_quant.py(GPU): FP8 and E8M0 bytes againstsitu_and_mul+per_1x128_e8m0_quantat the TP8 widths (shared expert d = 768, layer 0 d = 4224), M = 1..16384, both scale layouts, with and withoutlinear_beta. Plus the regression tests listed in the out-gate PR.Test Result
All passed on MI455X (gfx1250), one GPU, in the same two stacks as the out-gate PR. End-to-end performance and GSM8K: to follow.
Submission Checklist