Repository navigation
[Tune] Re-land qwen3.5-397B a16w16 GEMM configs without DSv4 conflict - #4017
Merged
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
#3974 added qwen3.5-397B bf16 tuned GEMM configs but was reverted (#4013) because qwen3_5_397b_bf16_tuned_gemm.csv shared 60 shapes with dsv4_bf16_tuned_gemm.csv. The runtime config merge in aiter/jit/core.py concatenates the global bf16_tuned_gemm.csv with every model_configs/*_bf16_tuned_gemm.csv and dedups on the shape key (gfx, cu_num, M, N, K, bias, dtype, outdtype, scaleAB, bpreshuffle) -- which excludes libtype/us -- so two tuned winners for the same shape collide and raise RuntimeError, failing op_tests/test_gemm_a16w16.py. Re-introduce the qwen3.5-397B configs with the 60 shapes that already exist in dsv4_bf16_tuned_gemm.csv removed from the tuned file (187 -> 127 rows). Those model-agnostic dense shapes are deferred to the existing DSv4 config; dsv4_bf16_tuned_gemm.csv is left untouched. The untuned shape spec is restored unchanged. Verified: 0 cross-file duplicate shapes across all *_bf16_tuned_gemm.csv, and op_tests/test_gemm_a16w16.py passes without rewriting any CSV.
yichiche
force-pushed
the
add-qwen3_5-397b-bf16-gemm-tuning
branch
from
June 30, 2026 09:11
0c05b45 to
cda5c0d
Compare
yifehuan
approved these changes
Jul 1, 2026
yifehuan
left a comment
Contributor
There was a problem hiding this comment.
LGTM — 127 rows, clean power-of-two M bucketing, no hipBLASLt kernel names, and 0 cross-file key conflicts (incl. DSv4), so the re-land is clean.
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
Re-land the qwen3.5-397B a16w16 (bf16) GEMM tuning configs from #3974, which was
reverted in #4013 due to a config conflict with DSv4.
aiter/configs/model_configs/qwen3_5_397b_bf16_tuned_gemm.csvshared 60identical shapes with
aiter/configs/model_configs/dsv4_bf16_tuned_gemm.csv.The runtime config merge in
aiter/jit/core.pyconcatenates the globalbf16_tuned_gemm.csvwith everymodel_configs/*_bf16_tuned_gemm.csvanddeduplicates on the shape key:
This key excludes
libtype/us, so two independently-tuned winners for thesame shape collide. The merge then raised:
which failed
op_tests/test_gemm_a16w16.py. These 60 shapes are model-agnosticdense-GEMM shapes (N=64/256/512, K=4096) that both DSv4 and Qwen3.5 happened to
tune independently.
Modifications
qwen3_5_397b_bf16_tuned_gemm.csvandqwen3_5_397b_untuned_gemm.csv.dsv4_bf16_tuned_gemm.csvremoved (187 → 127 rows), deferring thoseshared shapes to the existing DSv4 config.
dsv4_bf16_tuned_gemm.csvis left untouched, so this PR is self-contained anddoes not modify another model's tuning. The untuned shape spec is restored
unchanged.
Test
python op_tests/test_gemm_a16w16.pypasses (exit 0); allcheckAllclosechecks pass and the merge no longer raises
RuntimeError. Verified there are0 cross-file duplicate shapes across all
*_bf16_tuned_gemm.csvconfigs, andthe test no longer rewrites any CSV as a side effect (the auto-dedup writeback no
longer triggers).