Skip to content

[AMD][AgentX] DeepSeek V4 multi-node Agentic framework and recipe / DeepSeek V4 多节点 Agentic 框架与配方#2127

Merged
cquil11 merged 1 commit into
mainfrom
amd/agentx-v1.0-rebase
Jul 10, 2026
Merged

[AMD][AgentX] DeepSeek V4 multi-node Agentic framework and recipe / DeepSeek V4 多节点 Agentic 框架与配方#2127
cquil11 merged 1 commit into
mainfrom
amd/agentx-v1.0-rebase

Conversation

@ichbinblau

@ichbinblau ichbinblau commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add end-to-end agentic benchmarking for DeepSeek-V4-Pro FP4 on MI355X using multi-node disaggregated SGLang and HiCache host-DRAM KV offloading.

This PR now focuses on the recipe and runtime implementation:

  • add the DSV4 MI355X disaggregated Agentic benchmark entrypoint;
  • add the AIPerf trace-replay path and Slurm/container wiring;
  • configure SGLang disaggregated serving and HiCache host-pool settings;
  • register the model, benchmark configuration, runner launch behavior, and changelog trigger;
  • expose SGLang host-cache hit rate in the existing structured Agentic result aggregation;
  • retain only local patch code that does not have a merged upstream equivalent.

Dependency

Depends on #2141, which separately enables kv-offloading and kv-offload-backend propagation for multi-node Agentic sweep matrices. The shared utils/matrix_logic changes are intentionally not included in this PR.

Until #2141 is merged, the configuration in this PR declares kv-offloading: dram and kv-offload-backend: hicache, but current main still forces multi-node Agentic matrix entries to kv-offloading: none.

Patch policy

Patch and overlay code corresponding to merged upstream SGLang changes has been removed. The remaining patch artifacts are limited to code without a merged upstream equivalent, including the disaggregated prefill bootstrap desynchronization fix and the reference-only decode TP queue agreement patch.

Validation

  • Shell and Slurm scripts pass bash -n.
  • configs/amd-master.yaml and perf-changelog.yaml parse successfully.
  • PYTHONPATH=. pytest -q utils/agentic/aggregation/test_process_agentic_result.py — 26 passed.
  • Changed Python aggregation files compile successfully.
  • git diff --check passes.

中文说明

本 PR 为 MI355X 上的 DeepSeek-V4-Pro FP4 增加端到端 Agentic 基准测试能力,采用多节点 SGLang 分离式推理,并通过 HiCache 使用主机 DRAM 进行 KV 缓存卸载。

本 PR 当前仅聚焦配方和运行时实现:

  • 新增 DSV4 MI355X 分离式 Agentic 基准测试入口;
  • 增加 AIPerf trace replay 路径以及 Slurm/容器运行链路;
  • 配置 SGLang 分离式服务和 HiCache 主机缓存池参数;
  • 注册模型、基准测试配置、runner 启动行为和 changelog 触发项;
  • 在现有 Agentic 结构化结果聚合中暴露 SGLang 主机缓存命中率;
  • 仅保留尚无已合并上游实现的本地补丁代码。

依赖关系

本 PR 依赖 #2141#2141 单独为多节点 Agentic 扫描矩阵增加 kv-offloadingkv-offload-backend 的透传能力。本 PR 已移除所有共享的 utils/matrix_logic 改动。

#2141 合并之前,本 PR 的配置虽然声明了 kv-offloading: dramkv-offload-backend: hicache,但当前 main 仍会把多节点 Agentic 矩阵项强制转换为 kv-offloading: none

补丁策略

与已合并 SGLang 上游改动对应的补丁和 overlay 代码均已移除。当前仅保留尚无已合并上游等价实现的本地补丁,包括分离式 prefill bootstrap 不同步修复,以及仅作参考、默认不启用的 decode TP queue agreement 补丁。

验证

Shell 和 Slurm 脚本均通过 bash -nconfigs/amd-master.yamlperf-changelog.yaml 可正常解析;Agentic 聚合测试 26 项全部通过;相关 Python 文件编译检查和 git diff --check 均通过。

@github-actions

github-actions Bot commented Jul 9, 2026

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 关于重新运行失败任务的文档

Comment thread utils/matrix_logic/validation.py Outdated
Comment thread .github/workflows/run-sweep.yml Outdated
@seungrokj seungrokj changed the title Deepseek V4 Multi-node Agentic Framework and Recipe [AMD][AgentX] Deepseek V4 Multi-node Agentic Framework and Recipe Jul 9, 2026
Comment thread configs/amd-master.yaml Outdated
- { tp: 8, ep: 8, dp-attn: true, kv-offloading: dram, kv-offload-backend: native, conc-list: [24, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96] }

dsv4-fp4-mi355x-sglang-disagg-agentic-hicache:
image: rocm/sgl-dev:v0.5.14-rocm720-mi35x-20260706

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.

do u have upstream image @ichbinblau

@ichbinblau ichbinblau Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We have bumped the image to lmsysorg/sglang-rocm:v0.5.14-rocm720-mi35x-20260706

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.

Yes we will switch to lmsysorg/sglang-rocm:v0.5.14-rocm720-mi35x-20260710 where included all 4 patches

@Duyi-Wang

Duyi-Wang commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

The patches in this PR are derived from the following upstream SGLang PRs.
sgl-project/sglang#30374
sgl-project/sglang#30333
sgl-project/sglang#30339
sgl-project/sglang#29417

@ichbinblau ichbinblau force-pushed the amd/agentx-v1.0-rebase branch from 3f0a1f9 to da1084d Compare July 9, 2026 14:11
@cquil11 cquil11 added the agentx AgentX benchmarks, recipes, and infrastructure label Jul 9, 2026 — with ChatGPT Codex Connector
@cquil11 cquil11 force-pushed the amd/agentx-v1.0-rebase branch 2 times, most recently from 86da4cc to a34c27e Compare July 9, 2026 21:50
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@cquil11 cquil11 force-pushed the amd/agentx-v1.0-rebase branch from a34c27e to b0088c8 Compare July 9, 2026 22:16
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@cquil11 cquil11 force-pushed the amd/agentx-v1.0-rebase branch from b0088c8 to 4e557d0 Compare July 9, 2026 23:10
@cquil11 cquil11 changed the title [AMD][AgentX] Deepseek V4 Multi-node Agentic Framework and Recipe [AMD][AgentX] DeepSeek V4 multi-node Agentic framework and recipe / DeepSeek V4 多节点 Agentic 框架与配方 Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@cquil11 cquil11 force-pushed the amd/agentx-v1.0-rebase branch from 4e557d0 to fce18af Compare July 9, 2026 23:20
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@cquil11 cquil11 force-pushed the amd/agentx-v1.0-rebase branch from fce18af to b6a9877 Compare July 9, 2026 23:24
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

)
kv_manager._staging_handler = self.staging_handler

+ def _agree_and_order_queue(self) -> Tuple[List["DecodeRequest"], List["DecodeRequest"]]:

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.

We will not accept any patches. I have removed all patches that have since been merged into upstream sglang main. Please update nightly image tomorrow.

However, this patch remains. Please remove it / open upstream pr.

@ichbinblau ichbinblau Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We will not accept any patches. I have removed all patches that have since been merged into upstream sglang main. Please update nightly image tomorrow.

However, this patch remains. Please remove it / open upstream pr.

This patch file has not been used as its caller func has been commented out. I have remove it.

@cquil11

cquil11 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

@ichbinblau Thank you for this awesome work. Please see the changes I requested. Also, please re run full-sweep-enabled after making these changes.

+viz @chunfangamd

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@ichbinblau ichbinblau force-pushed the amd/agentx-v1.0-rebase branch from e9aa46a to 55a7983 Compare July 10, 2026 03:21
@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

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@billishyahao billishyahao requested a review from cquil11 July 10, 2026 15:00

@cquil11 cquil11 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.

LGTM. Definitely needs some cleanup which we will do in a followup. Thanks for the great best effort on first submission.

#21

# which is consistent across ranks and is the only set finalize_bootstrap acts on.
# ---------------------------------------------------------------------------
patch_gluon_pa_mqa_logits_instr_shape() {
patch_disagg_prefill_bootstrap_desync() {

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.

I'm going to allow this for now as we are early days of agentX and sglang and vllm also have some scheduling patches, but I want to open an issue for you guys to track this and get an upstream fix in sglang. @billishyahao @ichbinblau
cc @ichbinblau

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.

@chunfangamd chunfangamd 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. Approve for day 0
  • Verified that this PR has passed PR validation. Please link to GitHub Action workflow that shows this. https://github.com/SemiAnalysisAI/InferenceX/actions/runs/29089300938
  • Verified that this PR passes evals. Please link to GitHub Action workflow that shows this. https://github.com/SemiAnalysisAI/InferenceX/actions/runs/29089300938
  • Verified that speculative decoding PRs uses chat templates to align the AL distribution to real world
  • 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 the single-node recipes are similar to the official vLLM recipes and/or theSGLang cookbook:
    • If they are not, I have verified that a PR has been opened in vLLM recipe repo or SGLang repo and linked it below in the additional detail section:
  • If any of the above criteria cannot reasonably be satisfied, I have provided additional reasoning below.

Additional detail section:

  • insert any additional info here
    We will need a SGLang cookbook for the recipe. I approve it for the day 0 support for the AgentX

Signed: @chunfangamd

@Klaud-Cold

Copy link
Copy Markdown
Collaborator

❌❌❌ REJECTED ❌❌❌

@chunfangamd — blocking: no green, executed sweep/eval exists on any commit currently in this PR, so the reuse gate (validate_reusable_run) will reject it at merge. Everything else is to standard.

❌ Check 1 (sweep+evals on in-PR commit): FAIL — the PR's only commit f409c366 has single-node */, multi-node */, and eval / all skipped. The signed-off run 29089300938 executed on bb95016b, which is not in GET /pulls/2127/commits. Fix: run (or re-anchor via /reuse-sweep-run) a passing full sweep on a commit currently in this PR.
❌ Check 2 (evals accuracy): FAIL — no eval run exists on an in-PR commit to verify accuracy against; re-derivable only after Check 1 is satisfied.
✅ Check 0 (CODEOWNER): PASS — @chunfangamd owns configs/amd-master.yaml; all other paths fall to the * @InferenceX/core catch-all, covered.
➖ Check 3 (recipe link): N/A — disaggregated/multi-node submission (sglang-disagg, multinode: true, disagg: true, files under benchmarks/multi_node/**); the recipe-link requirement applies to single-node recipes only.
✅ Check 4 (reuse-sweep command): PASS — /reuse-sweep-run posted by cquil11 (MEMBER).
✅ Check 5 (latest checklist template): PASS — all current template items present and checked; only the conditional "if criteria cannot be satisfied" escape-hatch item left unchecked, which is appropriate.
✅ Check 6 (upstream image + engine order): PASS — lmsysorg/sglang-rocm:v0.5.14-rocm720-mi35x-20260710 is upstream SGLang; SGLang framework, so engine-first ordering not triggered.
✅ Check 7 (no arch/FLOP hacks): PASS — only kernel-routing/cache and MoRI/HiCache tuning knobs; no --hf-overrides/--json-model-override-args reducing architecture FLOPs.
➖ Check 8 (spec-decode chat templates): N/A — spec-decoding: none, DECODE_MTP_SIZE=0; no speculative-decoding changes.

@cquil11 cquil11 force-pushed the amd/agentx-v1.0-rebase branch from f409c36 to 59989c2 Compare July 10, 2026 16:25
@cquil11 cquil11 merged commit 0bd3fa4 into main Jul 10, 2026
26 checks passed
@cquil11 cquil11 deleted the amd/agentx-v1.0-rebase branch July 10, 2026 16:29
ApostaC added a commit that referenced this pull request Jul 10, 2026
…ntry

Resolve the perf-changelog.yaml tail conflict with #2127 per KLAUD_DEBUG.md §1.1:
take main's changelog wholesale and re-append this PR's entry at the end, with
pr-link updated from the XXX placeholder to #2153.

中文:将 origin/main 合并到 lmcache/agentix,按 KLAUD_DEBUG.md §1.1 处理
perf-changelog.yaml 末尾冲突:整体采用 main 的版本并在末尾重新追加本 PR 的
条目,同时把 pr-link 占位符更新为 #2153。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
adibarra added a commit that referenced this pull request Jul 10, 2026
Reverts #2127. It live-patches SGLang
(disaggregation/prefill.py resolve_waiting_queue_bootstrap) during setup,
which #2155 forbids without a docs/waiver/ entry.

中文:回滚 #2127,因其在 setup 阶段对 SGLang(disaggregation/prefill.py 的
resolve_waiting_queue_bootstrap)进行运行时打补丁,违反 #2155(未经
docs/waiver/ 豁免不得修改推理引擎)。
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

Development

Successfully merging this pull request may close these issues.

7 participants