Skip to content

Switch GLM-5.2 MI355X HiCache write policy to write_through - #3008

Closed
jiejingzhangamd wants to merge 2 commits into
mainfrom
dev/jiejing/glm5.2-eval-write-through
Closed

Switch GLM-5.2 MI355X HiCache write policy to write_through#3008
jiejingzhangamd wants to merge 2 commits into
mainfrom
dev/jiejing/glm5.2-eval-write-through

Conversation

@jiejingzhangamd

Copy link
Copy Markdown
Collaborator

What

Default --hicache-write-policy write_through_selectivewrite_through. Built on #3004 so the TP host-pool ratio stays 1.0. Eval and sweep still share the same ratio-based sizing.

Why

#3004 evals-only already passed at ratio 1.0 + write_through_selective: https://github.com/SemiAnalysisAI/InferenceX/actions/runs/34566241629

This PR is the write-policy A/B: same pool size, write_through (every KV write hits host). That is the remaining HiCache delta vs putting write_through back on #2900.

Test plan

  • Dispatch End-to-End Tests evals-only (no throughput sweep)
  • test-config --config-files configs/amd-master.yaml --config-keys glm5.2-fp4-mi355x-sglang-agentic-mtp --evals-only
  • Server stays up through GSM8K (no SIGKILL)
  • Logs show write_policy=write_through and ratio 1.0 (~113 GB/rank)

Made with Cursor

Ratio is relative to the device KV pool, so 1.5 resolved to 169.73 GB/rank
on this cluster, or 679 GB pinned across the 4 TP ranks. 1.0 brings that to
~113 GB/rank (~453 GB). Allocation logic is unchanged; eval and sweep still
share the same ratio-based sizing.
Keeps the TP host-pool ratio at 1.0 from the sibling eval PR. Eval and
sweep still share the same sizing; only the write path changes.
@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 关于重新运行失败任务的文档

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b169be3. Configure here.

# write_through_selective skips DRAM writes for non-reusable KV blocks,
# reducing host-bus traffic without affecting the cache hit rate.
HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through_selective}"
HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Recipe change omits changelog entry

Medium Severity

The new HiCache defaults (HICACHE_RATIO 1.0 and HICACHE_WRITE_POLICY write_through) change published AgentX results for glm5.2-fp4-mi355x-sglang-agentic-mtp, but this PR does not append a perf-changelog.yaml entry. Changelog-driven sweeps will not select the recipe, so the new curve is not recorded.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b169be3. Configure here.

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

Beyond the inline finding, I also checked whether the new write_through default (set once, outside the TP/DP-attention if/else) unintentionally changes the DP-attention arm's write policy too — it does, but that's unchanged from before this diff (write_policy was already applied to both arms), so it's not a new issue introduced here.

Extended reasoning...

The diff is a small, config-only change to a single benchmark script, lowering the TP-arm HICACHE_RATIO default and switching HICACHE_WRITE_POLICY's default to write_through, consistent with the PR description. I verified the actual diff matches the described change and re-checked the previously flagged candidate about HICACHE_WRITE_POLICY being set outside the TP/DP-attention if/else: that placement is pre-existing (the removed write_through_selective line was in the same position, applying to both arms already), so this is not a newly introduced bug from this PR, just an existing pattern. The confirmed inline finding about the missing perf-changelog.yaml entry stands as the substantive issue and is already posted inline, so I'm not restating it here.

# write_through_selective skips DRAM writes for non-reusable KV blocks,
# reducing host-bus traffic without affecting the cache hit rate.
HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through_selective}"
HICACHE_WRITE_POLICY="${HICACHE_WRITE_POLICY:-write_through}"

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.

🔴 This diff changes default HICACHE_RATIO (1.5->1.0) and HICACHE_WRITE_POLICY (write_through_selective->write_through) for the TP arm, both of which affect benchmark performance, but adds no perf-changelog.yaml entry, violating AGENTS.md's non-negotiable invariant that every performance-affecting change requires one. Fix: append a new perf-changelog.yaml entry (byte-preserving, tail-only) describing this default change for the affected config-keys before merging. [also at: perf-changelog.yaml:1 - Two perf-affecting default changes (HICACHE_RATIO 1.5->1.0, HICACHE_WRITE_POLICY…]

Extended reasoning...

AGENTS.md line 31: "Every change that can affect benchmark performance ... requires a new perf-changelog.yaml entry. The file is append-only and byte-sensitive." The diff lowers HICACHE_RATIO from 1.5 to 1.0 (less host DRAM pinned, lower cache hit rate under high concurrency) and switches HICACHE_WRITE_POLICY from write_through_selective to write_through (every KV write now hits the host bus instead of skipping non-reusable blocks), both explicitly performance-tuning changes per the PR description itself. git diff --name-only shows only the .sh file changed; perf-changelog.yaml (confirmed present at repo root, last entries for pr-link .../2994) was not touched. Without an entry, downstream tooling/consumers that track perf-affecting changes via this changelog lose visibility into this benchmark's default behavior change.

Verification: normal (raised by review-scope AGENTS.md non-negotiable invariant). The diff changes performance-affecting HiCache defaults for the TP arm — HICACHE_RATIO 1.5→1.0 and HICACHE_WRITE_POLICY write_through_selective→write_through (glm5.2_fp4_mi355x_sglang_mtp.sh lines ~88 and ~92) — yet git diff --stat shows exactly one changed file (the .sh), with no perf-changelog.yaml entry appended.…

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant