Repository navigation
Conversation
aiter_tuned_configs/<table>/<model>.csv holds rows for one aiter tuned-config table. ModelRunner.load_model merges them into aiter's resolution of each table once, before the model looks up a config, and hands aiter the result through the table's AITER_CONFIG_* variable. Rows are keyed by exact shape, like aiter's own model_configs/, so a model adds a CSV and no code. A row with base_* columns replaces aiter's row only while aiter still picks that base kernel; a row without them adds a shape aiter lacks. A hipBLASLt row applies only on the ROCm in its rocm column, and a FlyDSL row only on an aiter that can import FlyDSL. A table whose variable the user set is left alone. DeepSeek-V4's aiter#6004 / sgl-project#6029 rows move into the folder; its module keeps the Triton JSON and mHC tile_m=16 patches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The switch comment says what it gates; its sgl-project#6004 / sgl-project#6029 TODOs stay next to DeepSeek-V4's Triton JSON, which is what they remove. csv_paths() names what it returns, the FlyDSL mask reads as all-False, the AITER gate uses envs, and a test checks that a user-set AITER_CONFIG_* is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevin-mii
requested review from
Ying1123,
ch-wan,
fzyzcjy,
hnyls2002 and
merrymercy
as code owners
November 2, 2026 07:07
This was referenced Nov 2, 2026
This comment has been minimized.
This comment has been minimized.
…lure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
…ables # Conflicts: # python/sglang/srt/environ.py
The module docstring repeated the PR description and environ.py; each row rule now sits on the function that applies it. DeepSeek-V4's module no longer restates its switches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fold the three bpreshuffle row cases into one synthetic table that also covers additions, and drop the row-count restatement of the DeepSeek-V4 CSV and the two real-aiter DeepSeek-V4 installs, which the all-tables real-aiter case covers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the pinned aiter, no superseded or missing row already means every row resolves to its own kernel, and a key aiter repeats counts as missing, so the per-row walk added nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the CPU checks of which Triton JSON applies and of the tile_m=16 policy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
A model on AMD often needs AITER tuned-config rows for shapes the pinned AITER doesn't have yet. DeepSeek-V4 carried its own installer for that (
deepseek_common/amd/aiter_intree_tune.py), and MiniMax-M3.1 would have needed a second one. This PR makes it one shared mechanism: a new model adds a CSV and no code.Modifications
python/sglang/srt/utils/aiter_tuned_configs/<table>/<model>.csv, each in the columns of one AITER table:a8w8_blockscale_bpreshuffle,a8w8_bpreshuffle,bf16andfmoe.ModelRunner.load_modelcallsinstall_aiter_tuned_tables()(utils/aiter_tuned_tables.py) once, before the model looks up a GEMM or fused-MoE config, on ROCm withSGLANG_USE_AITER=1. For each table with rows it merges them into AITER's own resolution of the table and points the table'sAITER_CONFIG_*at the result. A single path skips AITER's own merge, which refuses duplicate keys.model_configs/:base_*columns replaces AITER's row only while AITER still picks that base kernel. Once AITER merges or re-tunes the shape, AITER's row wins.rocmcolumn) and applies only there.AITER_CONFIG_*the user set is left alone.AITER_CONFIG_GEMM_A8W8_BLOCKSCALE_BPRESHUFFLEnow overrides them.SGLANG_USE_AITER=1therefore writes one merged bpreshuffle table to$TMPDIR/sglang_aiter_intree_<uid>/at startup and points AITER at it.w_preshuffle_bf16/res_preshuffleto an AITER whoseget_mhc_fused_post_pre_config(m, hidden_size)has no such arguments, and raisedTypeError. It now passes them only when AITER's signature has them.SGLANG_AITER_INTREE_GEMM_TUNE=0still turns all of this off.Tests
test/registered/amd/test_aiter_intree_tune.py(stage-b 1-GPU small, AMD):Open question
A hipBLASLt row matches the runtime's ROCm
major.minor. That assumes solution indices don't change between patch releases of one ROCm; a row that does go stale fails at graph capture withHIPBLAS_STATUS_INVALID_VALUE, not silently. This PR ships no hipBLASLt rows; #46693 adds the first ones (ROCm 7.2).Validation
MI350X, ROCm 7.2 image, AITER
acf8fdf93,SGLANG_USE_AITER=1:test_aiter_intree_tune: 6 passed. With the ROCm filter removed, its test fails.install_aiter_tuned_tables()on this AITER applies all 32 DeepSeek-V4 rows. On SGLang's Dockerfile pin (285579b62) and on AITER main (2026-11-02) all 32 still apply: chore: upgrade cutlass 3.9.2 #6004 and [Feature] EP support for AWQ or GPTQ quantization of MoE models #6029 are open, so the TODOs stay.🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ❌ Run #42125016016
Latest PR Test (Extra): ❌ Run #42125016005
Latest PR Test (AMD ROCm 10): ❌ Run #42125015690
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: