Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions docs/powerx-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,29 @@ the registry's layout: `bleed` (container width: ladder, flow, measured-vs-model

Widgets:

- `ladder` (hero): three chips (B200, GB200 NVL72, MI355X) → `PowerLadder` on the validated
DeepSeek-V4-Pro AgentX point nearest 50 tok/s/user from `/api/v1/views/inference`, or a labelled
- `ladder` (hero): one chip per power-model system (`LADDER_HARDWARE`: H100, H200, B200, B300,
GB200 NVL72, GB300 NVL72, MI300X, MI325X, MI355X) → `PowerLadder` on the validated
DeepSeek-V4.1-Flash AgentX point nearest 50 tok/s/user (`LADDER_PRESET`, any precision; the only
model with validated power on all nine) from `/api/v1/views/inference`, or a labelled
example input at 60 % of TDP when the chip has none. The chip is page state (`hardware-store.ts`,
hash `hw`) that `load` and `worked-example` follow.
- `flow`: `FlowSvg`, hover or focus a node for its sentence; vertical under 640 px.
- `measured-vs-modeled`: `y_measuredJPerOutputToken` and `y_utilityModeledJPerOutputToken` for the
same points, one emphasis toggle (hash `mm`), crosshair tooltip with the ratio.
- `load`: one slider (hash `ld`) from 0 W to TDP through `loadSweep`; a small-multiples strip shows
which modeled parts follow the GPU and which stay flat.
- `views`: the four dashboard views as rows with what each reads, the controls it adds and an Open
link, plus a Show As % of TDP row under Power Draw for its three panels. Links come from
`guideHref` (`src/lib/powerx/views-guide.ts`). Its URL states are inlined so the dashboard's
metric registry stays out of the tutorial bundle, and `views-guide.test.ts` holds them to the
tab's own `selectPowerXView`, so a link opens exactly what clicking the tab would.
- `validity`: the five validator checks as `<details>` rows with reason code, audit fields, source.
- `run-config`: platform and topology visible, workload and strictness under "More options"
(hash `rc`); one YAML block with Copy, citations in a muted line (`run-config.ts` returns them
separately).
separately). Each snippet is a real matrix entry at `INFERENCEX_CONFIG_REVISION`, cut to its
first search-space row; strictness is best effort (no field), `power: true`, or `power: true`
plus `cpu-power: true`. Options the matrix or clusters reject are disabled with the reason, and
an old hash moves to the nearest valid pick (`normalizeRunConfig`).
- `worked-example`: the hero's point as a compact ladder plus a six-value readout and three links.

Numbers come only from the power model port (`computeBasis` → `buildLadder`), `HW_REGISTRY`, or the
Expand Down
12 changes: 8 additions & 4 deletions packages/app/content/powerx/tutorial.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Every GPU. Every second. Every watt.'
description: 'PowerX measures the power behind AI inference, in the open.'
updated: '2026-12-02'
updated: '2026-12-03'
---

<Widget
Expand All @@ -25,7 +25,7 @@ PowerX measures what each accelerator draws while it serves a benchmark and mode

<Callout kind="note">

Measured watts cover the accelerator only: the GPU board on HGX systems, the GPU module on NVL72, the GPU package on AMD. On NVL72 the Grace socket is measured too when its window passes the Grace check. Nothing modeled is stored; it is recomputed from the stored GPU samples at a pinned model revision, so a model change moves every point at once.
Measured watts cover the accelerator only: the GPU board on HGX systems, the GPU module on NVL72, the GPU package on AMD. On NVL72 the Grace socket is measured too when its window passes the Grace check. AMD MI300X, MI325X and MI355X clusters also record CPU package power through RAPL; PowerX does not read it yet, so the AMD CPU stays modeled. Nothing modeled is stored; it is recomputed from the stored GPU samples at a pinned model revision, so a model change moves every point at once.

</Callout>

Expand All @@ -46,6 +46,10 @@ Move the GPU from idle to TDP to see which modeled parts follow it.

Fans and PSU loss track the GPU; CPUs, memory, NICs and switches hold their level, so a lightly loaded GPU carries the largest overhead in relative terms.

The dashboard has four views, each with its own controls in Chart Config. **Open** goes straight to one.

<Widget name="views" alt="The four PowerX views: what each one reads and the controls it adds" />

## Methodology

Average, P75 and P90 power are time-weighted over the window across every GPU in the deployment; prefill and decode roles are averaged over the same window. Planners read **P90**, because dynamic power steering reacts to peaks; chip comparisons read **energy per token**.
Expand All @@ -58,7 +62,7 @@ A point is **Validated** only when the offline validator, re-run from the raw sa

<Widget name="validity" alt="The five validity checks" />

Power collection is part of every official sweep, so a submitted recipe is measured automatically. To run it yourself, add `power: true` to a multi-node matrix entry; single-node and AgentX jobs use the cluster's native exporter. `require-power` (or `REQUIRE_POWER=1`) fails the job on an invalid window instead of recording `power_valid: 0`.
Power collection is part of every official sweep, so a submitted recipe is measured automatically. Every multi-node point on a cluster with a GPU exporter, AMD included, measures GPU power with no field, and CPU power where the cluster has a CPU exporter; single-node points use the cluster's native exporter. A failed window records `power_valid: 0` and keeps the result. To fail the point instead, add `power: true` to a multi-node search-space row, and `cpu-power: true` beside it to hold the CPU leg to the same bar.

<Widget name="run-config" alt="Run-config generator" />

Expand All @@ -79,7 +83,7 @@ One validated point, read the way a capacity plan reads it: measured watts, the
alt="Worked example: one point read as GPU power, IT power, GPUs per MW, share of TDP and all-in provisioned power"
/>

Open [PowerX](/infx/inference?i_metric=y_measuredAvgPower), pull the same numbers from the [API](/api), or run `inferencex powerx export` from the [skills package](https://github.com/SemiAnalysisAI/InferenceX-app/tree/main/packages/skills).
Open [PowerX](/pwx), pull the same numbers from the [API](/api), or run `inferencex powerx export` from the [skills package](https://github.com/SemiAnalysisAI/InferenceX-app/tree/main/packages/skills).

## FAQ

Expand Down
12 changes: 8 additions & 4 deletions packages/app/content/powerx/zh/tutorial.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: '每一块 GPU,每一秒,每一瓦'
description: 'PowerX 公开实测 AI 推理背后的功耗。'
updated: '2026-12-02'
updated: '2026-12-03'
---

<Widget name="ladder" alt="功耗阶梯:一个实测点经建模部件延伸到 IT 和数据中心功率" />
Expand All @@ -19,7 +19,7 @@ PowerX 测量每颗加速器在运行基准测试时的功耗,并对它周围

<Callout kind="note">

实测瓦特数只覆盖加速器本身:HGX 系统上是 GPU 板卡,NVL72 上是 GPU 模组,AMD 上是 GPU 封装。NVL72 上窗口通过 Grace 校验时,Grace socket 也是实测值。建模值一概不存储,而是按固定的模型版本从存储的 GPU 样本即时重算,因此模型一旦更新,所有数据点同时变化。
实测瓦特数只覆盖加速器本身:HGX 系统上是 GPU 板卡,NVL72 上是 GPU 模组,AMD 上是 GPU 封装。NVL72 上窗口通过 Grace 校验时,Grace socket 也是实测值。AMD MI300X、MI325X 和 MI355X 集群还会通过 RAPL 记录 CPU 封装功耗;PowerX 目前尚未读取,因此 AMD 的 CPU 仍为建模值。建模值一概不存储,而是按固定的模型版本从存储的 GPU 样本即时重算,因此模型一旦更新,所有数据点同时变化。

</Callout>

Expand All @@ -40,6 +40,10 @@ PowerX 测量每颗加速器在运行基准测试时的功耗,并对它周围

风扇和 PSU 损耗跟随 GPU;CPU、内存、NIC 和交换芯片保持不变,所以 GPU 负载越轻,额外开销的相对占比越大。

仪表板有四个视图,每个视图在图表配置中有各自的控件。点击**打开**可直接进入。

<Widget name="views" alt="PowerX 的四个视图:各自读取什么,以及新增的控件" />

## 测试方法

平均、P75 和 P90 功耗在窗口内按时间加权,覆盖部署中的全部 GPU;prefill 和 decode 角色在同一窗口内分别求平均。做规划看 **P90**,因为动态功率调度对峰值敏感;比较芯片看**每 token 能量**。
Expand All @@ -52,7 +56,7 @@ PowerX 测量每颗加速器在运行基准测试时的功耗,并对它周围

<Widget name="validity" alt="五项有效性检查" />

功耗采集是每次官方 sweep 的一部分,提交的测试配置会自动被测量。要自行运行,在多节点 matrix 条目中加上 `power: true`;单节点和 AgentX 任务直接使用集群自带的 exporter。`require-power`(或 `REQUIRE_POWER=1`)会让窗口无效的任务直接失败,而不是记录 `power_valid: 0`。
功耗采集是每次官方 sweep 的一部分,提交的测试配置会自动被测量。在带 GPU exporter 的集群上(包括 AMD),每个多节点数据点无需任何字段即会采集 GPU 功耗,集群有 CPU exporter 时也采集 CPU 功耗;单节点数据点使用集群自带的 exporter。窗口无效时记录 `power_valid: 0` 并保留结果。若要让该数据点直接失败,在多节点 search-space 条目中加上 `power: true`,再在旁边加上 `cpu-power: true`,CPU 数据也按同一标准要求。

<Widget name="run-config" alt="运行配置生成器" />

Expand All @@ -73,7 +77,7 @@ AMD 的 exporter 上报的是封装功耗,NVIDIA 上报的是板卡或模组
alt="实例:一个数据点读作 GPU 功耗、IT 功率、每 MW GPU 数、TDP 占比和全系统 provisioned 功率"
/>

打开 [PowerX](/zh/infx/inference?i_metric=y_measuredAvgPower),通过 [API](/zh/api) 获取同样的数字,或用 [skills 包](https://github.com/SemiAnalysisAI/InferenceX-app/tree/main/packages/skills)中的 `inferencex powerx export` 命令导出。
打开 [PowerX](/zh/pwx),通过 [API](/zh/api) 获取同样的数字,或用 [skills 包](https://github.com/SemiAnalysisAI/InferenceX-app/tree/main/packages/skills)中的 `inferencex powerx export` 命令导出。

## 常见问题

Expand Down
4 changes: 2 additions & 2 deletions packages/app/scripts/route-bundle-budgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"/opx/[category]": 1162240,
"/overview": 980992,
"/pwx": 1693696,
"/pwx/tutorial": 914432,
"/pwx/tutorial": 931840,
"/quotes": 737280,
"/rankings": 670720,
"/rankings/[slug]": 668672,
Expand Down Expand Up @@ -204,7 +204,7 @@
"/zh/opx/[category]": 1163264,
"/zh/overview": 980992,
"/zh/pwx": 1694720,
"/zh/pwx/tutorial": 915456,
"/zh/pwx/tutorial": 931840,
"/zh/quotes": 738304,
"/zh/rankings": 670720,
"/zh/rankings/[slug]": 668672,
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/components/powerx/widgets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { LoadWidget } from './load-widget';
import { MeasuredVsModeledWidget } from './measured-vs-modeled-widget';
import { RunConfigWidget } from './run-config-widget';
import { ValidityWidget } from './validity-widget';
import { ViewsWidget } from './views-widget';
import { WorkedExampleWidget } from './worked-example-widget';

/** Widgets the tutorial mounts with `<Widget name="<key>" alt="…" />`, at the declared layout. */
Expand All @@ -14,6 +15,7 @@ export const POWERX_TUTORIAL_WIDGETS = {
flow: { component: FlowWidget, layout: 'bleed' },
'measured-vs-modeled': { component: MeasuredVsModeledWidget, layout: 'bleed' },
load: { component: LoadWidget, layout: 'column' },
views: { component: ViewsWidget, layout: 'column' },
validity: { component: ValidityWidget, layout: 'column' },
'run-config': { component: RunConfigWidget, layout: 'column' },
'worked-example': { component: WorkedExampleWidget, layout: 'column' },
Expand Down
Loading
Loading