Skip to content

[Feature] add a Sizing to measured power panel to PowerX % of TDP / [Feature] 在 PowerX TDP 占比视图中新增按实测功耗规划面板 - #1940

Merged
edwingao28 merged 3 commits into
mainfrom
powerx-gw-sizing
Dec 3, 2026
Merged

edwingao28 merged 3 commits into
mainfrom
powerx-gw-sizing

Conversation

@edwingao28

@edwingao28 edwingao28 commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The sizing chart from the PowerV1 article (how many more GPUs a gigawatt holds when each GPU is budgeted at its measured P90 power instead of its rating) now lives in PowerX, so it can be screenshotted again for any model, sequence and interactivity.

On Power draw → Show as % of TDP, a Sizing to measured power panel sits under the headroom table:

  • Left: one bar per GPU line with the gain over sizing at the rating, the GPU counts (714K → 927K) and P90 = x% of rating. Bars are ordered by gain, and overlay lines are drawn in their run color.
  • Right: GPUs per GW against headroom (0 to 60%) for the picked line. The rating is a dashed line, the gain area is shaded, 0 / 10 / 25 / 50% and the chosen headroom are marked, and the break-even headroom is an open dot. Clicking a bar picks the line. GB300 NVL72 is the default.
  • Headline and footer are generated from the rows; the footer states the GPU-power-only scope and the power-capping caveat.
  • Controls: Read at (i_szat, presets 25 / 50 / 100 / 150 / 300, default 150 tok/s/user), headroom (i_szhr, slider 0 to 60, default 10) and the picked line (i_szgpu). All three are in the share link, and each change fires inference_powerx_sizing_changed.

The math:

GPUs per GW at the rating = 1e9 ÷ TDP
GPUs per GW at P90        = 1e9 ÷ (P90 × (1 + headroom))
break-even headroom       = TDP ÷ P90 − 1

P90 is read with the headroom table's interpolation (buildHeadroomRows now takes the interactivities to read at), so a line that does not cover the Read at value is left out rather than extrapolated.

The inference view serves the official rows with sizing=true (sizingAt, sizingHeadroom; JSON only). This is wired through the registry, OpenAPI docs, route catalog digests, the skills reference (EN and ZH), the integrity manifest and the PowerX / state docs.

  • No dead ends: Read at presets no line covers are disabled; an uncovered share-link pick reads at the nearest covered preset with a note; lines missing at that Read at are named; the headline counts lines that gain nothing at the chosen headroom; the headroom box keeps typed input until blur or Enter.

Verification

  • Checked in next dev against live production API data: DeepSeek-V4.1-Flash, agentic traces, % of TDP, best-per-SKU off. Screenshots were taken at 1280px dark, 393px dark and 1280px light, the light one at 25% headroom with MI355X picked. The GB300 NVL72 (vLLM) FP4 line reads P90 = 70% of rating, 714K → 927K (+30%) at 10% headroom, and break-even at 43%, matching the article chart.
  • Unit tests:
    • gw-sizing.test.ts: the GB300 figures, sign and count formatting, curve, param parsing, row order, omitted lines and the default pick
    • PowerXGwSizing.test.ts: bar axis, curve span, mark selection and headline
    • views/inference route test: sizing=true values, params off, CSV 400 and bad headroom 400
    • the route catalog test
  • tsc, oxlint, oxfmt --check and check:typography pass, and the app unit suite passes.

Not verified

  • Unofficial-run overlay rows were not rendered in a browser. They use the same code path as the headroom table.
  • Cypress was not run locally.

Builds on #1937, which is merged; rebased onto main.

AI model disclosure

Prepared with Claude Opus 5.5 (code, tests and PR text), under the author's review.

中文

改动内容

PowerV1 文章中的规划图(每个 GPU 按实测 P90 功耗而非额定值规划时,每 GW 可多容纳多少 GPU)现已纳入 PowerX,可针对任意模型、序列与交互性重新截图。

在 功耗 → 显示为 TDP 占比 中,余量表下方新增 按实测功耗规划 面板:

  • 左侧:每条 GPU 曲线一根横条,显示相对按额定值规划的增幅、GPU 数(714K → 927K)与 P90 = 额定值的 x%。横条按增幅排序,非官方运行以其颜色绘制。
  • 右侧:所选曲线的每 GW GPU 数随余量(0 至 60%)的变化。额定值为虚线,增益区域填充,并标出 0 / 10 / 25 / 50% 与所选余量,盈亏平衡余量为空心点。点击横条可切换曲线,默认为 GB300 NVL72。
  • 标题与脚注均由数据生成;脚注说明仅计 GPU 功耗,并注明功率封顶相关的提示。
  • 控件:读取点(i_szat,预设 25 / 50 / 100 / 150 / 300,默认 150 tok/s/user)、余量(i_szhr,滑块 0 至 60,默认 10)与所选曲线(i_szgpu)。三者都写入分享链接,每次改动都会上报 inference_powerx_sizing_changed。

P90 使用与余量表相同的插值读取(buildHeadroomRows 现可指定读取的交互性);未覆盖读取点的曲线会被省略,不做外推。

inference 视图通过 sizing=true(sizingAt、sizingHeadroom,仅 JSON)返回官方曲线的数据。注册表、OpenAPI 文档、路由目录摘要、技能参考(中英文)、完整性清单与 PowerX / 状态文档均已同步更新。

  • 避免死路:没有任何线覆盖的读取点预设被禁用;分享链接中未覆盖的读取点回退到最近的已覆盖预设并提示;列出该读取点缺失的线;标题统计在所选余量下无收益的线数;余量输入框在失焦或回车前保留输入。

验证

  • 在 next dev 中以线上生产 API 数据检查:DeepSeek-V4.1-Flash、agentic traces、TDP 占比、关闭每 SKU 最优。截图包括 1280px 深色、393px 深色与 1280px 浅色,其中浅色图为 25% 余量并选中 MI355X。GB300 NVL72 (vLLM) FP4 的 P90 为额定值的 70%,10% 余量时为 714K → 927K(+30%),盈亏平衡余量为 43%,与文章图表一致。
  • 单元测试:
    • gw-sizing.test.ts:GB300 数值、正负号与数量格式、曲线、参数解析、行排序、曲线省略与默认选择
    • PowerXGwSizing.test.ts:横条坐标轴、曲线范围、标记点选择与标题
    • views/inference 路由测试:sizing=true 的数值、关闭时的参数、CSV 返回 400、非法余量返回 400
    • 路由目录测试
  • tsc、oxlint、oxfmt --check 与 check:typography 均通过,应用单元测试全部通过。

未验证

  • 未在浏览器中渲染非官方运行的曲线行;这部分与余量表共用同一代码路径。
  • 未在本地运行 Cypress。

本 PR 基于已合并的 #1937,已变基到 main。


Note

Low Risk
Read-only analytics and UI on existing power data; API adds optional JSON fields with validation and tests, no auth or data-mutation paths.

Overview
Adds a Sizing to measured power panel below the PowerX headroom table on % of TDP, comparing how many GPUs fit in 1 GW when budgeting at P90 × (1 + headroom) vs TDP. The UI (PowerXGwSizing) exposes gain bars, a per-line headroom curve, share-link params (i_szat, i_szhr, i_szgpu), and the same overlay styling as headroom.

New logic lives in lib/power/gw-sizing.ts, reusing buildHeadroomRows with a custom interactivity list so P90 is interpolated, never extrapolated. The inference views API gains sizing=true with sizingAt / sizingHeadroom (JSON-only, like headroom). Docs, OpenAPI, registry, and route tests are updated accordingly.

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

@edwingao28
edwingao28 requested a review from adibarra as a code owner December 3, 2026 03:51
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
inferencemax-app Ready Ready Preview Dec 3, 2026 6:24pm UTC

Request Review

@edwingao28
edwingao28 changed the base branch from powerx-draw-vs-rating to main December 3, 2026 03:56
@edwingao28 edwingao28 closed this Dec 3, 2026
@edwingao28 edwingao28 reopened this Dec 3, 2026

@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 2 potential issues.

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 2bbc1cb. Configure here.

… table

Power draw shown as % of TDP gains a panel that sizes a gigawatt of GPU
power at each line's measured P90 draw plus headroom against sizing at the
TDP rating. Bars show the gain per GPU line with the GPU counts; a curve
shows how headroom erodes the gain for the picked GPU, with the rating as a
dashed line and the break-even headroom (TDP / P90 - 1) as an open dot.
Read at (i_szat, default 150 tok/s/user), headroom (i_szhr, default 10%)
and the picked line (i_szgpu) live in the share link. Overlay lines are
drawn in their run color. The inference view serves the same rows with
sizing=true (sizingAt, sizingHeadroom).

中文:在 PowerX 功耗按 TDP 占比视图的余量表下方新增“按实测功耗规划”面板:
按各曲线实测 P90 功耗加余量规划每 GW GPU 功耗可容纳的 GPU 数,并与按 TDP
额定值规划对比。横条显示各 GPU 曲线的增幅与 GPU 数;曲线显示所选 GPU 的
增幅如何随余量下降,额定值为虚线,盈亏平衡余量(TDP / P90 - 1)为空心点。
读取点(i_szat,默认 150 tok/s/user)、余量(i_szhr,默认 10%)与所选曲线
(i_szgpu)写入分享链接;非官方运行以其颜色绘制。inference 视图通过
sizing=true(sizingAt、sizingHeadroom)返回相同数据。
When the span widened the step to 20, the tick loop started at the first
multiple of 20 above the negative bound and left that side unlabeled. Both
ends now snap to the step.

中文:当跨度使刻度步长变为 20 时,刻度循环从负向边界之上的第一个 20 的倍数
开始,负向一侧没有标注。现在两端都对齐到步长。
Read at presets that no GPU line covers are disabled. A share-link pick that
no line covers reads at the nearest covered preset with a note. Lines left out
at the chosen Read at are named, the headline counts lines that gain nothing
at the chosen headroom, and the headroom box keeps what you type until blur
or Enter.

中文:没有任何 GPU 线覆盖的读取点预设会被禁用;分享链接中未覆盖的读取点会回退到最近的已覆盖预设并给出提示。面板会列出在该读取点缺失的线,标题会统计在所选余量下没有收益的线数,余量输入框在失焦或回车前保留输入内容。
@edwingao28
edwingao28 merged commit 2e18755 into main Dec 3, 2026
46 checks passed
@edwingao28
edwingao28 deleted the powerx-gw-sizing branch December 3, 2026 18:27

This branch was successfully deployed

1 active deployment
Preview — e31fda64 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant