Skip to content

[AMD][MI35X] Add HiCache and TP2/EP1 arms to the Qwen3.5 MXFP4 MI355X AgentX sweep - #2693

Open
yichiche wants to merge 6 commits into
mainfrom
amd/qwen3.5-fp4-mi355x-agentic-hicache-tp2ep1
Open

[AMD][MI35X] Add HiCache and TP2/EP1 arms to the Qwen3.5 MXFP4 MI355X AgentX sweep#2693
yichiche wants to merge 6 commits into
mainfrom
amd/qwen3.5-fp4-mi355x-agentic-hicache-tp2ep1

Conversation

@yichiche

@yichiche yichiche commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

see unofficial run visualizer at https://inferencex.semianalysis.com/inference?unofficialRun=32456812122
see unofficial run visualizer at https://inferencex.semianalysis.com/evaluation?unofficialRun=32456812122

Motivation

Two structural gaps remain between qwen3.5-fp4-mi355x-sglang-agentic-mtp and its B200 counterpart qwen3.5-fp4-b200-sglang-agentic-mtp, and both make the current AgentX comparison misleading.

First, KV offload. The B200 arm carries a HiCache host-DRAM KV tier and rides it past the GPU-KV ceiling to concurrency 64+, while MI355X runs GPU-resident KV only and stops at concurrency 40. The MI355X curve therefore ends where the B200 curve is still climbing, and the difference measured at the top of the sweep is a cache-tier difference rather than a hardware difference.

Second, the 2-GPU point. B200 sweeps TP2/EP1; MI355X sweeps TP2/EP2. Those are not the same partitioning, so the 2-GPU columns are not comparable across the two fleets.

Modifications

Add a HiCache host-DRAM KV tier to benchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang_mtp.sh, gated on KV_OFFLOADING=dram with KV_OFFLOAD_BACKEND=hicache through the shared require_agentic_kv_offload_backend helper. KV_OFFLOADING and TOTAL_CPU_DRAM_GB join the script's check_env_vars list, matching the B200 and dsv4 AgentX recipes.

The tier uses --enable-hierarchical-cache with ratio 1.5, write_through, direct io, and page_first_direct layout. That combination is the one already validated on cluster:mi355x-amds by dsv4_fp4_mi355x_sglang_mtp.sh and glm5.2_fp4_mi355x_sglang_mtp.sh; every knob stays overridable via environment variable for tuning. Unlike the B200 sibling this arm keeps --page-size 16, so the kvnone and kvdram points differ only in the cache tier.

In configs/amd-master.yaml, replace the TP2/EP2 arm with TP2/EP1 and add two kvdram arms:

arm kv-offloading conc-list
TP4/EP1 none 1, 4, 8, 12, 16, 20, 24, 28, 32, 40 (unchanged)
TP2/EP1 none 1, 4, 8, 12, 16, 20 (replaces TP2/EP2)
TP4/EP1 dram (hicache) 40, 48, 56, 64
TP2/EP1 dram (hicache) 20, 24, 28, 32

Each kvdram arm repeats its kvnone neighbour's last concurrency (40 at TP4, 20 at TP2) so the host tier's gain is measured at a fixed operating point rather than inferred across a concurrency step. This follows the same idiom as dsv4-fp4-mi355x-sglang-agentic-mtp, which repeats concurrency 16 across its two arms.

The sweep grows from 16 to 24 points.

Accuracy Tests

No accuracy-affecting logic changes in this repo. The kvdram arms change where KV lives, not what is computed; the AgentX eval rows continue to run real target-model verification.

Benchmarking

Repo validation was run locally:

  • python -m pytest utils/matrix_logic/ -q → 232 passed.
  • bash -n benchmarks/single_node/agentic/qwen3.5_fp4_mi355x_sglang_mtp.sh → clean.
  • python utils/matrix_logic/generate_sweep_configs.py full-sweep --config-files configs/amd-master.yaml --model-prefix qwen3.5 --precision fp4 --scenario-type agentic-coding → 24 configs: TP4/EP1 kvnone 10, TP2/EP1 kvnone 6, TP4/EP1 kvdram-hicache 4, TP2/EP1 kvdram-hicache 4. No TP2/EP2 points remain.

End-to-end MI355X AgentX numbers will come from the sweep triggered on this PR (full-sweep-fail-fast). HiCache ratio 1.5 is the starting point inherited from the sibling recipes on this cluster; if the host pool is oversubscribed or the hit rate is poor, HICACHE_RATIO is the first knob to retune.


Note

Low Risk
Benchmark and sweep configuration only; HiCache wiring follows existing AgentX scripts with no changes to model accuracy or serving auth paths.

Overview
Aligns the Qwen3.5 MXFP4 MI355X AgentX benchmark with the B200 recipe so cross-fleet comparisons are fair.

The agentic launch script now requires KV_OFFLOADING and TOTAL_CPU_DRAM_GB, and when the sweep selects HiCache it appends SGLang hierarchical-cache flags (ratio 1.5, write-through, direct I/O, page-first layout) using the same require_agentic_kv_offload_backend pattern as other AgentX scripts.

In configs/amd-master.yaml, the TP2/EP2 GPU-only arm is replaced with TP2/EP1, and two new host-DRAM KV (hicache) arms extend concurrency beyond the GPU-KV ceiling (TP4 at 40–64, TP2 at 20–32). perf-changelog.yaml records the sweep change (16 → 24 points).

Reviewed by Cursor Bugbot for commit 2b669eb. Bugbot is set up for automated code reviews on this repo. Configure here.

… AgentX sweep

Add a HiCache host-DRAM KV tier to the AgentX script, gated on KV_OFFLOADING=dram with KV_OFFLOAD_BACKEND=hicache. The ratio 1.5 / write_through / direct / page_first_direct combination is the one already validated on cluster:mi355x-amds by the dsv4 and glm5.2 AgentX recipes, and every knob stays overridable. The arm keeps --page-size 16 so only the cache tier differs between the kvnone and kvdram points.

Replace the TP2/EP2 arm with TP2/EP1 to match qwen3.5-fp4-b200-sglang-agentic-mtp's 2-GPU point, and add kvdram arms at TP4 concurrency 40-64 and TP2 concurrency 20-32. Each kvdram arm repeats its kvnone neighbour's last concurrency so the host tier's gain is measured at a fixed operating point.
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review found no functional bugs — the only finding is a nit-level pr-link metadata mistake in the changelog entry (already flagged inline). Given a candidate accuracy-eval-arm-selection concern was raised and ruled out this run, leaving this note for the record.

Extended reasoning...

Beyond the inline nit, I also checked whether the accuracy eval row silently moved to a different arm (kvnone to the new HiCache conc=64 arm) in configs/amd-master.yaml — the eval row selection is independent of which arm this PR adds, so it's not affected.

Comment thread perf-changelog.yaml
@github-actions

Copy link
Copy Markdown
Contributor

4 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@chunfangamd

Copy link
Copy Markdown
Collaborator

/reuse-sweep-run

@yichiche

Copy link
Copy Markdown
Collaborator Author

@1am9trash sgl-project/sglang#36245 merged.

@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:

  • x ] 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=32456812122
  • Verified that this PR passes evals. Please link to GitHub Action workflow that shows this. Link: https://inferencex.semianalysis.com/evaluation?unofficialRun=32456812122
  • Verified that speculative decoding PRs uses chat templates to align the AL distribution to real world
  • 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 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; FLOPs at lower precisions is fine, given that the config passes private evals. As an general north star princple, we should only use optimizations which is used in production by customers that care about accuracy
  • 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 single-node vLLM/SGLang recipe in this PR is documented in the official vLLM recipes and/or the SGLang cookbook:
    • I linked the corresponding upstream PR in the vLLM recipe repo or SGLang 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.

Additional detail section:

Signed: @1am9trash

@Klaud-Cold

Copy link
Copy Markdown
Collaborator

✅✅✅ Verdict: PASS ✅✅✅

✅ Check 0 (CODEOWNER): PASS — @1am9trash is a listed owner of configs/amd-master.yaml; the other changed files carry only the catch-all, which a recognized CODEOWNER satisfies.
✅ Check 1 (sweep on in-PR commit): PASS — commit 495c7aa (still in this PR) ran run 32456812122 with all 24 agentic benchmark points and the agentic eval / job executed green (this agentic-only PR has no single-node */ lane; those were correctly skipped).
✅ Check 2 (evals pass): PASS — GSM8K em_strict 0.975 (n=1319) ≥ the 0.94 qwen3.5 bar in utils/evals/thresholds.yaml, measured on the TP4 hicache c64 arm with the same image as this PR's config (lmsysorg/sglang-rocm:v0.5.17-rocm720-mi35x-20260818).
✅ Check 3 (recipe merged): PASS — sgl-project/sglang#36245 is MERGED (2026-08-25); the cookbook's MI355X MXFP4 recipe carries the identical HiCache flags (--enable-hierarchical-cache --hicache-ratio 1.5 --hicache-write-policy write_through --hicache-io-backend direct --hicache-mem-layout page_first_direct) and the other major args (aiter backend, page-size 16, fp8_e4m3 KV, MTP). Informational: scheduler-recv-interval, stream-interval, tokenizer workers etc. are InferenceX sweep plumbing, as expected.
✅ Check 4 (reuse command): PASS — /reuse-sweep-run posted by @chunfangamd (COLLABORATOR).
✅ Check 5 (latest checklist): PASS — every current-template item is present and checked (the first checkbox is typo'd as - x ] but clearly checked).
✅ Check 6 (upstream image / engine-first): PASS — upstream lmsysorg/sglang-rocm image on MI355X; the submission itself is SGLang, so ordering is satisfied.
✅ Check 7 (deprecation): PASS — qwen3.5 fp4 agentic-coding (MTP arm) is active per MODELS.md.
✅ Check 8 (architecture hacks): PASS — only HiCache cache-tier flags added; no --hf-overrides or FLOPs-reducing changes.
✅ Check 9 (chat template): PASS — the replay client appends --apply-chat-template.
✅ Check 10 (engine patches): PASS — no patching of the serving stack in the diff.
✅ Check 11 (golden AL): PASS — SGLANG_SIMULATE_ACC_LEN=3.39 with match-expected/real-draft-token matches the golden qwen3.5 thinking_on value for MTP level 3 (3.39) in golden_al_distribution/qwen3.5_mtp.yaml; eval rows keep real target-model verification.
➖ Check 12 (append-only): N/A — the new perf-changelog entry does not use append-only: true.

@1am9trash

Copy link
Copy Markdown
Collaborator

Hi, @cquil11
May you help to review this? Thanks.

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

Labels

agentx AgentX benchmarks, recipes, and infrastructure AMD full-sweep-enabled

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants