Skip to content

[AMD][Qwen3.5] [Perf] Move MI355X FP8 AgentX HiCache to write_through on sglang-rocm v0.5.22-20261020 - #4374

Open
yichiche wants to merge 8 commits into
mainfrom
amd/qwen35-fp8-mi355x-agentx-v0522-write-through
Open

yichiche wants to merge 8 commits into
mainfrom
amd/qwen35-fp8-mi355x-agentx-v0522-write-through

Conversation

@yichiche

@yichiche yichiche commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Pin qwen3.5-fp8-mi355x-sglang-agentic-mtp to lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261020. The other MI355X Qwen3.5 arms stay on their current tags.
  • Switch every HiCache override on this arm from hicache-write-policy: write_through_selective to write_through. At concurrency 80 the overall prefix cache hit rate is flat (93.5% to 94.0%); what moves is the tier split, and per-GPU throughput gains 2.7%.

Details

Correction to an earlier revision of this description

An earlier version of this PR body and of the changelog entry claimed the concurrency 80 cache hit rate "moves from 51% to about 95%". That comparison was not like for like: 51% was the GPU-tier-only share on the old run, and ~95% was the overall rate on the new one. Both numbers are now restated on the same metric. The claim has been corrected here and in inferencex-e2e/perf-changelog.yaml.

What the measurements say

Two runs, both at TP4 HiCache concurrency 80:

  • Baseline: run 36743632401 on lmsysorg/sglang-rocm:v0.5.20-rocm720-mi35x-20260929, write_through_selective, hicache-size: 400.
  • This PR: run 39763900198 on lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261020, write_through, hicache-size: 374.

Hit rates are computed from the SGLang server metrics in each run's server_metrics_export.json, as sglang:cached_tokens by cache_source over sglang:prompt_tokens.

Metric (concurrency 80) Baseline (36743632401) This PR (39763900198)
Overall prefix cache hit rate 93.5% 94.0%
... served from the GPU tier 50.2% 44.9%
... served from the HiCache host tier 43.3% 49.1%
Throughput per GPU 59,233 tok/s 60,839 tok/s (+2.7%)
p90 end-to-end latency 50.9 s 47.9 s
Mean TTFT 3.12 s 2.68 s
p90 ITL 34.1 ms 31.1 ms

So write_through does not raise the overall hit rate — that was already ~94% under write_through_selective. It shifts where the hits are served from: the host DRAM tier backs a larger share of prompt tokens, the GPU tier a smaller one, and the net effect is a 2.7% per-GPU throughput gain with lower tail latency and TTFT.

Caveat on the comparison

This is not a single-variable A/B. Between the two runs the image, the write policy, and the host pool size (hicache-size 400 vs 374) all changed, because the baseline run predates the host-pool tiering already on main. The throughput and latency deltas above should be read as the combined effect of the image bump and the policy change, not as the isolated effect of write_through.

Scope of the recipe change

The same write_through_selective setting was on every HiCache override from concurrency 16 through 80; all of them move to write_through. GPU-resident points at concurrency 1, 4, 8, 12, and 14 do not enable HiCache and are untouched. HiCache sizes, the GPU-resident band, and the other MI355X arms stay as they are.

Image

Docker Hub lists lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261020 (HTTP 200). The tag was pushed 2026-10-20T14:52:20Z. The amd64 digest is sha256:3a75c91365cc4f4e1194bf5d64b92f2f1ef134d8b9045da165fba28a8dada464. The previous canary on lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261021 died in the launch script (run 39638215045).

AI model disclosure

Grok 4.7 prepared the original recipe edit, changelog entry, and description. Claude Opus 5 recomputed the concurrency 80 metrics from the two runs' artifacts and rewrote the cache-hit claim in this description and in the changelog entry. No delegated agents.

…iCache write_through on rocm/sgl-dev v0.5.22
@yichiche
yichiche requested a review from a team October 21, 2026 16:42
@yichiche yichiche added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

Comment thread inferencex-e2e/perf-changelog.yaml Outdated
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

@yichiche yichiche changed the title [AMD][Qwen3.5] [Perf] Recover MI355X FP8 AgentX concurrency 80 with HiCache write_through on rocm/sgl-dev v0.5.22 [AMD][Qwen3.5] [Perf] Recover MI355X FP8 AgentX concurrency 80 with HiCache write_through on sglang-rocm v0.5.22-20261020 Oct 22, 2026
@yichiche yichiche added full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) and removed full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) labels Oct 22, 2026
@yichiche
yichiche force-pushed the amd/qwen35-fp8-mi355x-agentx-v0522-write-through branch from be1c914 to 00a128a Compare October 22, 2026 10:32
@1am9trash

Copy link
Copy Markdown
Collaborator

/reuse-sweep-run 39763900198

@1am9trash 1am9trash left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a PR reviewer and CODEOWNER, I have reviewed this and have:

  • Verified that as of the moment of typing this, this is the latest version of PR_REVIEW_CHECKLIST.md
  • Verified that the general code quality meets the InferenceX standard and does not make the code quality any worse.
  • Verified that this PR has passed PR validation. Please link to GitHub Action workflow that shows this. Link: https://inferencex.semianalysis.com/inference?unofficialRun=39763900198
  • Verified that this PR passes evals. Please link to GitHub Action workflow that shows this. Link: https://inferencex.semianalysis.com/evaluation?unofficialRun=39763900198
  • Verified that speculative decoding PRs uses chat templates to align the AL distribution to real world
  • Verified that every draft model and draft head is served as it ships: the draft that ships with the served checkpoint, at its stored precision, through the pinned upstream image's default handling, with the shipped and effective draft precision recorded in the additional detail section. No submission-side quantization, dtype override, checkpoint substitution, or patch may lower draft precision below that default, regardless of eval results or AL. Explicitly verified that SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is not enabled in the effective recipe, including inherited settings; enabling it is prohibited going forward, and historical runs do not grant an exception. See Draft-model precision for what counts as the default and the MLPerf comparison.
  • For agentic workloads: verified that speculative-decoding configs (EAGLE / MTP / draft models) run with simulated synthetic acceptance, with the acceptance-length value taken from the committed golden AL curve in infx/golden_al_distribution/ for that model, thinking mode, and draft length. A submission may choose any supported draft length, but it may not substitute a different acceptance target.
  • Verified against the current MODELS.md that this PR does not submit a deprecated model, scenario, or model-scenario combination.
  • Verified that the model architecture isn't changed with benchmark hacks like using --hf-overrides to skipping indexer for every x layers on models that don't natively support this. As a general rule, we won't accept optimizations that reduces the number of model architecture FLOPs. Anything that makes that same computation run faster is fair game; target/verifier FLOPs at lower precisions is fine, given that the config passes private evals, but this does not permit lowering draft-model or draft-head precision below what ships. As an general north star princple, we should only use optimizations which is used in production by customers that care about accuracy
  • For affected Dynamo TRT-LLM benchmarks, verified that iteration/KV-cache metrics are collected and published under the pinned Dynamo implementation and effective engine settings. Resolve the installed Dynamo version separately from the container tag; use supported metrics controls without requiring KV events. Record the version and configuration evidence in the additional detail section. See verifier Check 17. N/A for unaffected serving paths or frameworks without these Dynamo settings.
  • If an company claims that they support vLLM/SGLang as first class LLM inference engines on their hardware, I have verified that the respective vLLM submission made using upstream https://hub.docker.com/u/vllm docker repo, upstream SGLang https://hub.docker.com/u/lmsysorg docker repo. The only exceptions are for new hardware, such as MI455X UALoE72, Vera Rubin NVL72, Rubin NVL8, etc., and for new model architectures where there is an actual reason why vLLM/SGLang does not fundamentally support them yet as supported by vLLM/SGLang community maintainers
  • If an company claims that they support vLLM/SGLang as first class upstream in-tree LLM inference engines on their hardware, I have have verified that the respective vLLM/SGLang submission has been made before additional frameworks (TRT-LLM, ATOM, etc.). The only exceptions are for new hardware, such as MI455X UALoE72, Vera Rubin NVL72, Rubin NVL8, etc., and for new model architectures where there is an actual reason why vLLM/SGLang does not fundamentally support them yet.
  • Verified that every affected vLLM/SGLang production serving configuration in this PR, including Dynamo deployments, is documented in the official vLLM recipes and/or the SGLang cookbook, for both single-node and multi-node aggregated and disaggregated serving. The documentation covers production-useful flags, environment variables, and launch commands (including prefill, decode, and router/frontend commands for disaggregation); InferenceX-only benchmark/harness settings are excluded with reasoning in the additional detail section:
    • I linked the corresponding upstream PR in the vLLM recipe repo or SGLang cookbook source repo and verified that it is MERGED before this InferenceX PR merges. An opened, draft, or closed-without-merge upstream PR does not satisfy this requirement. If the matching recipe was already published, I linked the published recipe/cookbook page in the additional detail section below.
  • Verified that this PR does not patch the inference engine or serving stack — the pinned image must run as shipped. This covers .patch files / git apply / patch, inline patches embedded in benchmark scripts (e.g. a python3/sed heredoc that rewrites installed engine sources before serving), in-place edits of site-packages, monkey-patching, overwriting container files, and installing forked/rebuilt engine wheels on top of the pinned image. The only exception is a patch covered by a filled-out waiver at docs/waiver/<PR_NUMBER>.md — named after the PR that introduces the patch and filed in that same PR, stating what is patched, why the unmodified upstream image cannot run this benchmark, the upstream PR/issue link, and the removal plan — which I have linked below in the additional detail section.
  • If this PR uses append-only: true, verified that it only adds generated points or recipe variants inside a selected existing config/scenario and existing same-image visual curve: every previously generated point remains present with the same recipe, no prior point is removed or rerun, and every benchmark-affecting change in the complete diff can affect only the corresponding newly appended points (never an existing point), regardless of which file contains it.
  • If any of the above criteria cannot reasonably be satisfied, I have provided additional reasoning below.
  • Reported measured throughput/E2EL Pareto counts and evidence per affected curve (≥5 points strongly recommended). Below 5 or unverifiable: tag a core maintainer for review; recorded admin bypass required before merge. N/A if no curves are affected. Details.

Additional detail section:

Cookbook:

InferenceX-only exclusions:

  • enable-metrics and enable-cache-report: observability. They expose sglang: metrics and the cache-hit report for the AIPerf harness. They do not change serving behavior.
  • SGLANG_TIMEOUT_KEEP_ALIVE=1800: client-pool keep-alive. It only outlasts AIPerf's 300 s client connection pool.
  • PYTHONNOUSERSITE=1: container hygiene. It keeps the image from importing user site-packages.

Draft precision:

  • The MTP head embedded in the served Qwen/Qwen3.5-397B-A17B-FP8 checkpoint. There is no separate draft checkpoint and the recipe sets no speculative-draft-model-path.
  • Stored precision: block-FP8. weight_scale_inv is present on the mtp.* expert weights; mtp.fc and the MTP gates are listed in modules_to_not_convert and stay at the checkpoint's unquantized dtype.
  • Default handling in the pinned image: lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261020 loads the head natively. The recipe applies no draft path, no quantization override and no dtype override, so nothing is re-quantized or up-converted at load. SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is not set in the recipe and does not appear in the run logs.
  • Effective serving precision: as stored — block-FP8 for the MTP experts, checkpoint dtype for mtp.fc and the gates. The draft shares the target's FP8 KV cache (kv-cache-dtype: fp8_e4m3) and no separate draft KV dtype is set.

Signed: @1am9trash

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

✅✅✅ Verdict: PASS ✅✅✅

Passed and not applicable checks

✅ Check 0 (CODEOWNER): PASS — @1am9trash is a named owner of both inferencex-e2e/configs/amd-master.yaml and srt-slurm-recipes/**/mi355x-*/; perf-changelog.yaml falls under the catch-all owner * @SemiAnalysisAI/core, which any recognized CODEOWNER satisfies.

✅ Check 1 (Sweep on in-PR commit): PASS — in-PR commit 00a128ad has 18 agentic / checks (c1-c80), the canary, and agentic eval /, all success in run 39763900198 attempt 2 (headSha 00a128ad). The later commits are non-material. Merges 8b7a91b1, eb0c1b9d and 30b82b85 leave this recipe and its master entry byte-identical. The base-branch launcher edits they bring in are docstrings, error handling, llm-d removal, vLLM-only adaptive-verification logic and an SGLang dcp-size mapping this recipe does not set. 786c796 edits only the changelog text.

✅ Check 2 (Evals): PASS — gsm8k TP4 c80 on lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261020 scores em_strict 0.9742 ± 0.0044 (n=1319). The cohort (run 36743632401, same topology) scores 0.9765, a gap of 0.0023 against a 2-sigma threshold of 0.0121; there is no sibling. The eval server launched with --enable-hierarchical-cache --hicache-write-policy write_through --hicache-size 374, so it ran the changed path.

✅ Check 3 (Upstream recipe): PASS — the three linked cookbook PRs, sgl-project/sglang #46017, #46032 and #46757, are all MERGED. Cookbook §3.3.1 (MI355X FP8 MTP agentic) matches every serving setting: the v0.5.22-20261020 image, the TP4 command, AITER environment variables and flags, fp8_e4m3 KV, chunked-prefill/scheduler/tokenizer tuning, EAGLE 3/1/4, watchdog, the per-concurrency max-running/graph-batch/hicache-size table, and the write_through HiCache flags. The documented exclusions (metrics, cache report, keep-alive, PYTHONNOUSERSITE) are justified.

✅ Check 4 (Reuse command): PASS — 1am9trash (COLLABORATOR) posted /reuse-sweep-run 39763900198 on its own line, naming the passing in-PR sweep from Check 1.

✅ Check 5 (Latest checklist): PASS — all 18 items of the current PR_REVIEW_CHECKLIST.md template are present and checked.

✅ Check 6 (Upstream image / ordering): PASS — the framework: sglang entry uses the upstream lmsysorg/sglang-rocm:v0.5.22-rocm720-mi35x-20261020. The PR adds only open-source engine entries.

✅ Check 7 (Deprecated models): PASS — on 2026-10-28, qwen3.5 agentic coding at fp8 with MTP is active per the MODELS.md support-matrix row.

✅ Check 8 (No architecture hacks): PASS — the recipe has no --hf-overrides, layer, expert or head trimming, or accuracy-trading levers beyond the pre-existing FP8 KV cache, and the c80 eval covers that config.

✅ Check 9 (Chat template): PASS — the recipe sets AIPERF_APPLY_CHAT_TEMPLATE: 'true' for the MTP benchmark client.

✅ Check 10 (No engine patches): PASS — the reachable path has no patches, setup scripts, source edits or engine wheel installs; the mi355x single-node lane defines no setup script.

✅ Check 11 (Agentic golden AL): PASS — the c80 throughput job applied SGLANG_SIMULATE_ACC_LEN=3.39 with match-expected and real-draft-token. This equals qwen3.5_mtp.yaml thinking_on at 3 speculative tokens, 3.39.

➖ Check 12 (Append-only): N/A — no new changelog entry sets append-only: true.

✅ Check 13 (Draft precision): PASS — the draft is the MTP head embedded in Qwen/Qwen3.5-397B-A17B-FP8 (mtp_num_hidden_layers 1), stored as block-FP8 [128,128]; mtp.fc, mtp.layers.0.mlp.gate and shared_expert_gate are in modules_to_not_convert. There is no draft path, draft quantization or dtype override, and the draft shares the target's fp8_e4m3 KV. SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is absent from the recipe, the pinned launch environment and the run logs.

✅ Check 14 (Pareto coverage): PASS — curve qwen3.5 / agentic-coding / mi355x_sglang / fp8 / p90 E2EL from run 39763900198 attempt 2 (results_bmk, source 00a128ad): 19 measured points, 18 frontier points by pareto_coverage.

✅ Check 15 (PR description): PASS — every body claim was recomputed from artifacts and matches. c80 cache-hit split: device 44.9% / host 49.1% / overall 94.0%, against baseline 50.2% / 43.3% / 93.5%. Throughput and latency: 60,839 vs 59,233 tok/s/GPU, p90 E2EL 47.9 vs 50.9 s, mean TTFT 2.68 vs 3.12 s, p90 ITL 31.1 vs 34.1 ms. Baseline hicache-size: 400 with write_through_selective at 4a673e78, and amd64 digest sha256:3a75c913…, are also confirmed.

➖ Check 16 (NVIDIA overview): N/A — only MI355X (non-NVIDIA) configurations are affected.

➖ Check 17 (Metrics publication): N/A — this is a direct SGLang config with no Dynamo TRT-LLM serving path.

✅ Check 18 (Recipe/image/sweep consistency): PASS — no generation errors at the pinned SHA. The master entry and recipe agree (TP4, ep1, 19 concurrency points). The new image resolves to digest sha256:3a75c913…, matching the changelog. There are no orchestration pins or dispatch changes. The changelog accurately states the image bump, the write_through_selective→write_through switch on every HiCache override, and the corrected c80 metrics. All 19 removed points are the same shapes re-measured on the new image (undominated_removed and unmeasured_removed are both empty). Image-plus-policy delta at c80: +2.7% tok/s/GPU against run 36743632401; the eval lane is unchanged (0.9765→0.9742, within SE).

Assessed commit: 786c796a33ead6a6e83022093ec50584bc9deb6d.

@yichiche yichiche changed the title [AMD][Qwen3.5] [Perf] Recover MI355X FP8 AgentX concurrency 80 with HiCache write_through on sglang-rocm v0.5.22-20261020 [AMD][Qwen3.5] [Perf] Move MI355X FP8 AgentX HiCache to write_through on sglang-rocm v0.5.22-20261020 Oct 28, 2026
@yichiche

Copy link
Copy Markdown
Collaborator Author

@1am9trash Corrected, re-requesting verification.

You were right on both counts: 51% was the GPU-tier share on run 36743632401 and ~95% was the overall rate on the new run, so the old claim compared two different metrics. I recomputed both runs from their server_metrics_export.json (sglang:cached_tokens by cache_source over sglang:prompt_tokens) and get exactly your numbers:

Metric (c80) 36743632401 39763900198
Overall hit rate 93.5% 94.0%
GPU tier 50.2% 44.9%
HiCache host tier 43.3% 49.1%
tok/s/GPU 59,233 60,839 (+2.7%)
p90 E2EL 50.9 s 47.9 s

So the hit rate is flat and the real effect is a tier shift toward host DRAM, worth +2.7% per-GPU throughput and lower tail latency.

Changes made in 786c796 and in the PR body:

  • The changelog entry now states the flat overall hit rate with the tier split, with both runs named.
  • It also records that this is not a single-variable A/B — your point (h). The baseline ran hicache-size: 400 on the v0.5.20 image; this point runs 374 on v0.5.22, so image, policy and host pool size all differ, and the throughput/latency deltas are the combined effect.
  • The PR body carries the same corrected table plus an explicit note that an earlier revision made the 51% to 95% claim.
  • Retitled from "Recover ... concurrency 80" to "Move ... HiCache to write_through", since "recover" was premised on the same bad comparison.

No recipe or config change in this push; only the changelog text.

@1am9trash

Copy link
Copy Markdown
Collaborator

Thanks for update. The CI is pass now.
image

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended)

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants