Skip to content

[Klaud Cold] Add MI325X TP4 DeepSeek-V4.1-Flash vLLM AgentX arm with Engram host offload / 新增 Engram 主机卸载的 MI325X TP4 DeepSeek-V4.1-Flash vLLM AgentX 臂 - #3333

Closed
functionstackx wants to merge 7 commits into
mainfrom
klaud/dsv41flash-mi325x-tp4-engram-offload
Closed

functionstackx wants to merge 7 commits into
mainfrom
klaud/dsv41flash-mi325x-tp4-engram-offload

Conversation

@functionstackx

Copy link
Copy Markdown
Collaborator

Summary

Adds a TP4 arm with Engram CPU offload to dsv41flash-fp4-mi325x-vllm-agentic-dspark, beside the existing TP8 arm, and repins the image.

  • New search-space row tp: 4 at concurrency 1-32, mirroring the TP8 grid so the two are directly comparable.
  • dsv41flash_fp4_mi325x_mtp.sh now sets --engram-config explicitly per TP: cpu_offload:false at TP8, cpu_offload:true at TP4.
  • Image repinned from nightly-eed1f3d0… to nightly-3df4ae153eb385e27b52f26c81f8edb9e20b9984.
  • New --no-swa-bounded-replay flag.

Why the image had to move

The pinned nightly-eed1f3d0… tag 404s on Docker Hub; it survives only on node caches. The new pin is the same upstream commit the MI355X arm moved to in #3326, on the plain ROCm channel that the gfx942 arms already use rather than the rocm100 channel, which no gfx942 recipe has exercised.

That commit is also what makes this change possible: vllm-project/vllm#57491 widened two is_cuda() gates to is_cuda_alike(), so engram_config finally resolves on gfx942. Previously this recipe had to omit the flag entirely.

Why --engram-config is now explicit on both arms

On builds carrying #57491, cpu_offload defaults on through VLLM_PLE_CPU_OFFLOAD. Bumping the image without setting it would silently move the TP8 tables to host memory and change that curve. Setting it explicitly to false at TP8 keeps the existing arm behaviourally identical, and true at TP4 is what makes TP4 fit.

Why --no-swa-bounded-replay

vllm-project/vllm#56227 turned SWA bounded replay on by default between the two pins. It relies on a window clamp that landed in the FlashInfer and FlashMLA kernels; the ROCm sparse SWA path only gained the replay_start kwarg. On gfx950 that crashed every point with HSA_STATUS_ERROR_MEMORY_FAULT at the first prefix hit carrying a replay start. gfx942 runs the same ROCm sparse path, so this recipe pre-empts it rather than burning a sweep to rediscover it. Prefix caching stays on.

Memory

With the Engram tables offloaded, resident weights are ~81 GiB per rank at TP4, from the per-rank fit across the measured H100 TP8, H200 TP4 and B200 TP2 points (256 GiB sharded plus 17.2 GiB replicated). On a 256 GB card at --gpu-memory-utilization 0.9 that leaves roughly 100 GiB of KV per GPU after the indexer's 32 GiB [batched-tokens, 1M] logits buffer. TP8 with the tables resident is unchanged at roughly 73 GiB per rank.

Test plan

  • full-sweep-enabled sweep: TP4 concurrency 1-32 AgentX + evals green
  • TP8 re-runs green on the new image and matches the prior curve
  • Confirm the c1 log shows the Engram offload line at TP4 and no offload at TP8
中文

摘要

dsv41flash-fp4-mi325x-vllm-agentic-dspark 现有 TP8 臂旁新增启用 Engram CPU 卸载TP4 臂,并重新固定镜像。

  • 新增 tp: 4 搜索空间行,并发 1-32,与 TP8 网格一致以便直接对比。
  • dsv41flash_fp4_mi325x_mtp.sh 现按 TP 显式设置 --engram-config:TP8 为 cpu_offload:false,TP4 为 cpu_offload:true
  • 镜像由 nightly-eed1f3d0… 重新固定为 nightly-3df4ae153eb385e27b52f26c81f8edb9e20b9984
  • 新增 --no-swa-bounded-replay

镜像为何必须更换

原固定的 nightly-eed1f3d0… 在 Docker Hub 上已 404 失效,仅依靠节点缓存存活。新 pin 与 #3326 中 MI355X 臂所用为同一上游 commit,但选用 gfx942 臂一贯使用的普通 ROCm 通道,而非尚无 gfx942 配方验证过的 rocm100 通道。

该 commit 也正是本次改动的前提:vllm-project/vllm#57491 将两处 is_cuda() 判定放宽为 is_cuda_alike(),使 engram_config 得以在 gfx942 上解析;此前本配方只能完全省略该参数。

为何两个臂都显式设置 --engram-config

在包含 #57491 的构建中,cpu_offload 会通过 VLLM_PLE_CPU_OFFLOAD 默认开启。若仅升级镜像而不设置该值,TP8 的 Engram 表会被静默移至主机内存,改变该曲线。TP8 显式设为 false 可保持现有臂行为完全一致,TP4 设为 true 则是其得以运行的前提。

为何需要 --no-swa-bounded-replay

vllm-project/vllm#56227 在两个 pin 之间将 SWA bounded replay 默认开启。其依赖的 window clamp 已进入 FlashInfer 与 FlashMLA kernel,但 ROCm sparse SWA 路径仅获得 replay_start 参数。在 gfx950 上,这使所有数据点在首次命中携带 replay start 的 prefix 时以 HSA_STATUS_ERROR_MEMORY_FAULT 崩溃。gfx942 使用同一 ROCm sparse 路径,因此本配方提前规避,而非再耗费一次 sweep 重新发现。prefix caching 保持开启。

显存

Engram 表卸载后,TP4 每 rank 常驻权重约 81 GiB,该数值来自对已实测的 H100 TP8、H200 TP4 与 B200 TP2 数据点的按 rank 拟合(256 GiB 分片 + 17.2 GiB 每 rank 副本)。在 256 GB 卡、--gpu-memory-utilization 0.9 下,扣除 indexer 的 32 GiB [batched-tokens, 1M] logits 缓冲区后,每张 GPU 约剩 100 GiB KV。TP8 表驻留 GPU 的情形不变,约 73 GiB/rank。

测试计划

  • full-sweep-enabled sweep:TP4 并发 1-32 AgentX 与 evals 全绿
  • TP8 在新镜像上重跑全绿,且与此前曲线一致
  • 确认 c1 日志中 TP4 出现 Engram 卸载行、TP8 无卸载

🤖 Generated with Claude Code

@functionstackx
functionstackx requested a review from a team September 21, 2026 15:10
…st offload / 新增 Engram 主机卸载的 TP4 臂

Add a TP4 search-space row beside the existing TP8 arm and repin the image
from the expired nightly-eed1f3d0 tag to nightly-3df4ae15, the same commit
the MI355X arm moved to. That image carries vllm-project/vllm#57491, which
widened the two is_cuda() gates to is_cuda_alike() so engram_config resolves
on gfx942; cpu_offload now defaults on via VLLM_PLE_CPU_OFFLOAD, so the
script sets it explicitly per TP: off at TP8 to keep that curve comparable,
on at TP4 where the tables do not fit beside half the checkpoint.

Also add --no-swa-bounded-replay. vllm-project/vllm#56227 turned SWA bounded
replay on by default between the two pins and relies on a window clamp the
ROCm sparse SWA path lacks, which crashed every gfx950 point with
HSA_STATUS_ERROR_MEMORY_FAULT. gfx942 runs the same path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@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 only run on labeled PRs. Add full-sweep-fail-fast (strongly recommended); use full-sweep-enabled only when matrix jobs should continue after a failure.
  • 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 上运行。强烈建议添加 full-sweep-fail-fast;仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread configs/amd-master.yaml
@@ -1223,7 +1223,7 @@ minimaxm3-fp8-mi325x-vllm-agentic-mtp:
# golden AL 3.51 for throughput, real block verification for evals, adaptive

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.

🟡 nit (optional): the header comment above dsv41flash-fp4-mi325x-vllm-agentic-dspark still says "TP8 rather than TP4 because a 256 GB card must hold its share of the 511 GB checkpoint, the GPU-resident Engram tables and a 1M-context KV pool," but this same PR adds a tp: 4 arm right below it at line 1247. A maintainer reading the block header now gets a rationale that directly contradicts the code beneath it. Fix: update or remove the TP8-only rationale in the header comment (lines 1218-1223) now that a TP4 arm exists, e.g. folding it into the new per-arm comments already added at lines 1237-1246.

Extended reasoning...

configs/amd-master.yaml:1218-1223 states TP8 is used instead of TP4 because TP4 can't fit the checkpoint plus Engram tables plus KV pool. The same diff adds { tp: 4, kv-offloading: none, spec-decoding: mtp, conc-list: [1, 2, 4, 8, 16, 32] } at line 1247 within the very entry this comment describes. On base branch there was no TP4 arm so the comment was accurate; after merge it is stale and misleading to anyone maintaining this recipe. No safeguard catches doc/code drift like this; it's comment-only so it doesn't break CI, but it misinforms future edits (e.g. someone might 'fix' the TP4 arm back out based on this stale rationale).

Verification: nit. The header comment at configs/amd-master.yaml:1220-1222 (unchanged by this diff — verified it does not appear in the diff hunks) reads "gfx942 is not in the upstream hardware table ...; TP8 rather than TP4 because a 256 GB card must hold its share of the 511 GB checkpoint, the GPU-resident Engram tables and a 1M-context KV pool." This same PR adds a TP4 arm at line 1246 (`- { tp: 4,…

@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

@functionstackx

functionstackx commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator Author

/reuse-sweep-run 35617152305

Revoked. That authorization pointed at the sweep of vllm/vllm-openai-rocm:nightly-3df4ae15... on the plain ROCm nightly channel. This PR has since been repinned to vllm/vllm-openai-rocm:nightly-rocm100-3df4ae15... on the ROCm 10.0 channel, to match #3326. Run 35617152305 is no longer evidence for the image this PR ships, so the sweep has to run again.

Struck through rather than deleted so the history stays readable. The reuse gate matches only a standalone command line, so this comment no longer authorizes a skip.

中文

已撤销。 该授权指向的是 plain ROCm nightly 渠道镜像 nightly-3df4ae15... 的扫描结果。本 PR 已按 #3326 重新固定到 ROCm 10.0 渠道的 nightly-rocm100-3df4ae15...,因此运行 35617152305 不再能作为本 PR 所用镜像的验证证据,需要重新扫描。

此处采用删除线而非删除评论,以保留记录。reuse gate 仅匹配独立成行的命令,故本评论不再授权跳过扫描。

functionstackx and others added 4 commits September 21, 2026 13:57
…5x-tp4-engram-offload

# Conflicts:
#	perf-changelog.yaml
Sync with origin/main after the green sweep run 35617152305; the reuse gate
authorizes that run on this head.

在绿色 sweep 运行 35617152305 之后与 origin/main 同步;reuse gate 在此 head 上授权该运行。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hannel / 将镜像重新固定到 ROCm 10.0 nightly 渠道

Match #3326, which moved MI355X to nightly-rocm100-3df4ae15 on
the ROCm 10.0 channel. Same vLLM commit, different ROCm runtime.

与 #3326 保持一致:相同的 vLLM commit,ROCm 10.0 运行时。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…10.0 镜像上重新触发 PR #3333 的扫描

The prior /reuse-sweep-run authorization was revoked: it pointed at a sweep of
the plain-channel image this PR no longer ships.

此前的 /reuse-sweep-run 授权已撤销:其指向的是本 PR 不再使用的 plain 渠道镜像的扫描。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@functionstackx

Copy link
Copy Markdown
Collaborator Author

/reuse-sweep-run 35639762585

functionstackx and others added 2 commits September 21, 2026 20:00
…5x-tp4-engram-offload

# Conflicts:
#	perf-changelog.yaml
Sync with origin/main after the green sweep run 35639762585; the reuse gate
authorizes that run on this head.

在绿色 sweep 运行 35639762585 之后与 origin/main 同步;reuse gate 在此 head 上授权该运行。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant