Skip to content

[power_model] calibrate DDR5 DIMM power and AMD DIMM counts from BMC readings / [power_model] 基于 BMC 实测校准 DDR5 DIMM 功耗与 AMD DIMM 配置 - #4741

Merged
edwingao28 merged 2 commits into
mainfrom
feat/power-model-ddr5-calibration
Nov 6, 2026
Merged

edwingao28 merged 2 commits into
mainfrom
feat/power-model-ddr5-calibration

Conversation

@edwingao28

@edwingao28 edwingao28 commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Recalibrates modeled DDR5 power from the MI325X BMC Power_Memory sensor and sets measured AMD DIMM inventories. NVIDIA chassis keep 32 x 64 GB.

Before After
DDR5 per DIMM, idle / offloading 3.8 / 7 W 2.75 / 2.75 W
MI300X DIMMs 32 x 64 GB 16 x 96 GB
MI325X DIMMs 32 x 64 GB 24 x 96 GB
MI355X DIMMs 32 x 64 GB 24 x 128 GB

2.75 W is the 58–61 W node total over 24 DIMMs, plus 10%. Offloading leaves it unchanged: up to 81% host-DRAM prefix hits stayed within 1 W of idle (run). Provenance moves to estimated v2.

Testing: pytest (401 passed), ruff. Pinned totals move only by DIMM, fan and PSU-loss watts.

Port sync: InferenceX-app#1609 ports this; it re-pins to this PR's merge commit before merging.

Calibration evidence

Measured data behind 2.75 W per DIMM (idle and offloading) and the corrected AMD DIMM counts. Source is the MI325X BMC Power_Memory sensor, which reports one total for all DIMMs on the node.

1. Real HiCache workload: DDR5 stays at idle

Qwen3.5-397B FP8, SGLang TP4, AgentX on MI325X, with HiCache off, on, and on with the GPU pool capped at 2M tokens. Runs 41116448659 (off, default pool) and 41255238866 (capped pool).

  • Node memory power stayed at 58–61 W (the idle band) at every concurrency in all three arms.
  • At c32 / c48, 81% / 74% of reused tokens were served from host DRAM, yet host traffic was only ~1.3 GB/s and power stayed within 1 W of idle.
  • The same sensor reads 116 W under an all-core dd DRAM stress, so it does respond to load.

2. Stress test: host↔GPU copies stepped up to the PCIe limit

One MI325X node, 8 GPUs copying pinned host memory, 90 s per step (settling excluded).

Direction Slope over idle
Host → GPU (DRAM read) +0.22 W per GB/s
GPU → host (DRAM write) +0.27 W per GB/s
Both directions +0.23 W per GB/s

Even at 674 GB/s bidirectional, the node peaks around 216 W, below the old offload model (32 × 7 W = 224 W). Real HiCache traffic (~1.3 GB/s) is at the far left of this sweep, essentially idle.

Why 2.75 W

58–61 W node total ÷ 24 DIMMs ≈ 2.5 W, plus a 10% margin = 2.75 W. Offloading doesn't move it at realistic traffic, so idle and offloading share the value. New MI325X node total: 24 × 2.75 W = 66 W (old model: 32 × 3.8 W = 122 W idle, 32 × 7 W = 224 W offload).

DIMM counts

MI300X 16 × 96 GB, MI325X 24 × 96 GB, MI355X 24 × 128 GB, taken from the AMD hosts' inventories. NVIDIA chassis keep 32 × 64 GB.

Side check: PCIe switch power left unchanged

Same node and copy pattern. The BMC reports switch temperature, not power. At full PCIe load, switch temps rose only +0.9 °C, versus +12.1 °C for the DIMM banks, so this PR leaves the 45 W per switch as is.

MI300X / MI355X: no direct reading available, datasheet bound instead

Neither platform exposes DIMM power. Their BMCs only report DIMM temperatures, and AMD HSMP per-DIMM power isn't usable: on MI355X the firmware rejects HSMP (BIOS-disabled), and on MI300X HSMP loads but returns 0 W for every DIMM address at idle, under all-core memory stress, and during 8-GPU host↔GPU copies at ~425 GB/s. Probe: run 42134338334.

DIMM inventory from dmidecode on the same nodes:

Platform DIMMs Part Organization
MI300X 16 × 96 GB DDR5-4800 SK Hynix HMCGM4MEBRB233N 2Rx4, 24Gb dies
MI355X 24 × 128 GB DDR5-6000 Micron MTC40F2047S1RC64BB1 2Rx4, 32Gb dies
  • MI300X uses the same 96 GB 2Rx4 class as the measured MI325X, so 2.75 W carries over directly.
  • MI355X has the same device count (40 per DIMM), but with denser dies at a higher data rate. That raises background and refresh power, and an estimated 10–30% gives about 2.75–3.25 W idle. The vendor-stated operating power for this 128 GB 2Rx4 class is ~10 W at 4800 MT/s (Micron 128GB RDIMM product brief), or 9.7 W per module (Micron). That's a heavy-load ceiling, far above the near-idle traffic inference produces.
  • Worst-case impact of keeping 2.75 W on MI355X: 24 × 0.5 W ≈ 12 W per node, under 0.2% of node power. So this PR keeps the shared value and treats MI300X / MI355X DIMM power as an assumed carry-over, pending BIOS-enabled DIMM telemetry.

Known limits

  • No raw per-DIMM readings; 2.75 W averages the node total over 24 DIMMs. AMD HSMP per-DIMM power is the planned cross-check once DIMM telemetry is enabled in BIOS; it is not available on current firmware.
  • Measured on MI325X only; MI300X / MI355X reuse the per-DIMM value (see the bound above).
AI model disclosure
  • Model/version: claude-opus-5-5
  • Role: constants, provenance, tests; delegated hardware probes
PR checklist and change type

Type of Change

  • Bug fix
  • New feature
  • Configuration change
  • Documentation update
  • Other (please describe)

Checklist

  • I have completed the AI model disclosure and kept it current
  • I have tested my changes locally
  • I have updated documentation if necessary
  • If python -m infx.matrix.changed --base origin/main lists affected config keys, I have appended one new entry covering them to the physical end of inferencex-e2e/perf-changelog.yaml; if it lists none, I have added none. I have not edited historical entries
  • If this PR appends an inferencex-e2e/perf-changelog.yaml entry, it carries exactly one primary sweep label (a maintainer applies it on fork PRs): full-sweep-fail-fast (recommended), full-sweep-enabled, or non-canary-full-sweep-enabled. Optional modifiers all-evals, evals-only, and agentx-fast require a primary label; the last two block reuse while applied.
  • Before merging via reuse, an authorized maintainer (OWNER/MEMBER/COLLABORATOR) has commented /use <run_id> (or the legacy /reuse-sweep-run) on this PR. Do this only once there is a final full sweep that is all green with evals passing, since after this comment the primary sweep label will no longer automatically kick off new sweeps. Remove and re-add the primary sweep label to force a new sweep.
中文

根据 MI325X BMC Power_Memory 传感器重新校准建模的 DDR5 功耗,并设置实测的 AMD DIMM 配置;NVIDIA 机箱保持 32 x 64 GB。

  • 每根 DIMM 功耗(idle / offload):3.8 / 7 W → 2.75 / 2.75 W
  • MI300X:16 x 96 GB;MI325X:24 x 96 GB;MI355X:24 x 128 GB(原为 32 x 64 GB)

2.75 W 为 24 根 DIMM 的节点总功耗 58–61 W 均摊后加 10%。offload 不改变该值:最多 81% 的 prefix 命中来自主机 DRAM 时,功耗仍在 idle 的 1 W 以内(运行)。Provenance 改为 estimated v2。

验证: pytest(401 通过)、ruff。固定的测试总值只随 DIMM、风扇与 PSU 损耗功耗变化。

移植同步: InferenceX-app#1609 移植本改动,合并前改为固定本 PR 的合并提交。

AI 模型使用说明: claude-opus-5-5 负责常量、provenance 与测试;硬件探测由委派 agent 执行。

校准证据: 数据来自 MI325X BMC Power_Memory(节点全部 DIMM 总和)。

  • 真实 HiCache 负载:Qwen3.5-397B FP8 SGLang TP4 AgentX,HiCache 关闭 / 开启 / GPU 池限制为 2M token(41116448659、41255238866)。各并发下节点内存功耗均为 58–61 W(idle 区间);c32 / c48 有 81% / 74% 的复用 token 来自主机,流量仅约 1.3 GB/s,功耗在 idle 1 W 以内。同一传感器在全核 dd 压测下读数 116 W。
  • 压力测试:8 张 GPU 拷贝 pinned 主机内存直到 PCIe 上限;host→GPU +0.22 W per GB/s,GPU→host +0.27 W per GB/s,双向 +0.23 W per GB/s。674 GB/s 双向时峰值约 216 W,仍低于原 offload 模型 32 × 7 W = 224 W。
  • 推导:58–61 W ÷ 24 根 ≈ 2.5 W,加 10% = 2.75 W;MI325X 新节点总值 66 W(原 122 W idle / 224 W offload)。
  • PCIe 交换芯片:BMC 只报温度;满载时仅升高 +0.9 °C(DIMM +12.1 °C),45 W/switch 保持不变。
  • MI300X / MI355X:BMC 只报 DIMM 温度;MI355X 固件未开启 HSMP,MI300X 的 HSMP 对所有 DIMM 返回 0 W(运行 42134338334)。MI300X 为 16 × 96 GB SK Hynix 2Rx4(与 MI325X 同类),沿用 2.75 W;MI355X 为 24 × 128 GB Micron DDR5-6000 2Rx4,估算 idle 约 2.75–3.25 W,最坏偏差约 12 W/节点(<0.2%),暂沿用共享值并标注为假设。
  • 限制:无逐根 DIMM 原始读数,待 BIOS 开启 DIMM 遥测后用 AMD HSMP 交叉验证(当前固件不可用);仅在 MI325X 上实测。

中文:根据 BMC 实测校准 DDR5 DIMM 功耗与 AMD 机箱 DIMM 配置

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

Besides the inline finding, I checked the doubled DIMM quantities in test_cli.py (mi300 32, mi325/mi355 48, b200 64). They match the doubling that was already there: the base chassis dimm_count of 32 was asserted as 64 before this change. The memory watts also add up, for example 32 x 2.75 W = 88 W.

Extended reasoning...

I checked the per-system DIMM table in test_cli.py against the chassis dimm_count values in systems/hgx.py and the old expected quantity of 64. The doubling is consistent with existing behavior, so this change did not introduce it.

Comment on lines +90 to +91
idle_power_w: ClassVar[float] = 2.75
active_power_w: ClassVar[float] = 2.75

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.

🟡 (optional) The PR description leaves out two of the four port-sync steps that AGENTS.md requires for every power_model/ PR. That raises the chance the InferenceX-app TypeScript port drifts from the new 2.75 W DIMM and AMD DIMM-count values. The description says only "app PR to follow, pinned to this merge commit". It does not mention matching tests, cross-linking both ways, or regenerating the port manifest and parity fixture. Fix: list all four steps in the PR description, namely land this PR with tests, open a cross-linked app PR with matching tests, pin the merge commit, and regenerate the port manifest and parity fixture.

Why this was flagged

AGENTS.md:29-33 says every power_model/ PR description lists four steps. They are: land the InferenceX PR first with matching tests, open the app PR cross-linked both ways with matching tests, pin the InferenceX merge commit in the app PR, and regenerate the port manifest and parity fixture in the app PR. This PR changes constants that the port mirrors file for file. Those are DDR5DIMM idle_power_w/active_power_w at generic.py:90-91, DDR5_BASELINE at profiles/init.py:112-128, and the AMD dimm_count/dimm_capacity_gb at hgx.py:248-275. The "Port sync" line in the PR body names only the pin step. Without the matching-tests and manifest/parity-fixture steps, the app port can keep reporting 3.8/7 W DIMMs and 32 x 64 GB AMD inventories, so app power numbers differ from this Python model.

Verification: AGENTS.md:29 says "Every power_model/ PR description lists all four steps". The PR description's only port-sync text is "Port sync: app PR to follow, pinned to this merge commit." It leaves out the matching tests in both repos, the two-way cross-linking, and step 4 entirely. generic.py:90-91 changes idle_power_w/active_power_w from 3.8/7.0 to 2.75/2.75.

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant