Repository navigation
Tune Qwen3.8 Flash Next TP2 TP4 decode FP8 BF16 GEMMs - #2
Merged
sammysun0711 merged 2 commits intoOct 9, 2026
Merged
sammysun0711 merged 2 commits into
sammysun0711 merged 2 commits into
Conversation
yicyang
marked this pull request as ready for review
September 18, 2026 02:21
Collaborator
|
Please double check that model level performance, TPOT seem slight improvement 43.80->43.22 ms for con=24 or even regression for con=1/8. |
a8w8_bpreshuffle_tuned_gemm had no rows with K=2560, so every dense FP8 projection in Qwen3.8 Flash Next ran the default kernel on MI308X. Search the three decode projections over the SGLang graph buckets and keep the six entries that reproducibly beat the default by at least 3%. The gains concentrate at M=24, the one bucket that is neither a power of two nor near one: the default path costs about as much there as at M=32 (14.209 vs 14.464 us at N=8192) while M=16 costs 9.492 us, consistent with rounding M up to 32. The retained cktile entries do not. N=2560 K=3072 M=4/8/12/24 4.07-4.60% N=6656 K=2560 M=24 6.95% N=8192 K=2560 M=24 21.55% The other 18 searched shapes land within 1.5% of the default and are deliberately left out, so the default path stays live for them. FlyDSL candidates were excluded: that pipeline aborts the tuning worker with "LLVM ERROR: Do not know how to expand this operator's operand!" on llvm.amdgcn.raw.ptr.buffer.load.lds, and under --shape_grouped the crash discards the ck/cktile results already measured for the whole group. Also widen torch_to_c_types to accept torch.Stream. torch 2.12 passes the generic Stream rather than torch.cuda.Stream, so the isinstance check never matched and the ctypes bridge rejected the argument. Measured on MI308X gfx942 80CU, ROCm 7.2.4, PyTorch 2.12.0+rocm7.2.4. Model-level effect is below this setup's measurement resolution; see docs/qwen3_8_flash_next_tp2_decode_fp8_gemm.md.
apinge
force-pushed
the
pr/qwen38-tp2-decode-fp8-gemm
branch
from
September 23, 2026 06:46
3df94b3 to
a5f062d
Compare
…s ; mv unused doc
Owner
|
@sammysun0711 Could you please help to check? |
sammysun0711
approved these changes
Oct 9, 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.
What
Tuned decode GEMM configs for Qwen3.8 Flash Next on MI308X (
gfx942,cu_num = 80).Without them the dense decode projections fall back to the default kernel`.
All three files are keyed to the SGLang decode graph buckets
M = 1, 2, 4, 8, 12, 16, 24, 32.Test
csrc/gemm_a16w16/gemm_a16w16_tune.py(BF16) andcsrc/ck_gemm_a8w8_bpreshuffle/gemm_a8w8_bpreshuffle_tune.py --libtype ck,cktile(FP8)on MI308X.
python3 -m unittest op_tests.tuning_tests.test_config_shape_collisionpasses: noduplicate
(gfx, cu_num, M, N, K)keys across the merged config families.sglang.bench_serving, 12000 input tokens, 350 output tokens, 32 prompts,concurrency 1:
Environment: MI308X (
gfx942, 80 CUs), ROCm 7.2.4, PyTorch2.12.0+rocm7.2.4.Backend selections require revalidation when CK / CKTile / hipBLASLt change.
Submission Checklist