Skip to content

[AgentX] preserve physical GPU counts during ingestion / 保留正确的物理 GPU 数 - #1098

Merged
edwingao28 merged 1 commit into
masterfrom
fix/agentx-gpu-topology
Sep 9, 2026
Merged

edwingao28 merged 1 commit into
masterfrom
fix/agentx-gpu-topology

Conversation

@edwingao28

@edwingao28 edwingao28 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Modern single-node AgentX artifacts can omit num_gpus while EP shares TP devices. The ingestion fallback counted Qwen3.8 H200 TP4/EP4 as 16 GPUs, although the retained server command and power telemetry show four. Infer TP × PP × PCP only for the explicit modern single-node shape; preserve explicit counts, legacy rows and role-shaped artifacts.

On head 164780b35b924272fb8e94a144b5c91b49a2b585, typecheck/unit CI, lint/format/typography CI, and component plus all eight Chrome/Firefox E2E shards passed. Claude and Bugbot checks passed with no unresolved review threads. Local validation passed 198 focused tests and 6,271 full-unit tests (3 skipped). Three unchanged FAQ/evaluation local smoke assertions failed, including a warm recheck; this remains a local validation limitation, with the full remote E2E suite passing on the same head.

The retained artifact now maps to four GPUs without changing measured energy or throughput. Producer PR2923 emits num_gpus directly. This mapper change applies to future ingestion: it does not rewrite existing rows or trigger a production backfill. Historical incorrect config identities require separate controlled reconciliation.

中文说明

现代单节点 AgentX 产物可能缺少 num_gpus,而 EP 与 TP 共享设备。此前摄取端将 Qwen3.8 H200 TP4/EP4 推断为16张 GPU,但原始服务命令和功耗遥测确认只有4张。本改动仅对明确的现代单节点格式按 TP × PP × PCP 推断物理设备数,保留显式计数、旧格式及按角色划分的多节点行为。

在版本 164780b35b924272fb8e94a144b5c91b49a2b585 上,类型检查/单元测试 CIlint/格式/排版 CIcomponent 及 Chrome/Firefox 共八个 E2E 分片 全部通过。Claude 与 Bugbot 检查通过,没有未解决的审查线程。本地198项定向测试及6,271项完整单元测试通过(3项跳过);3项未改动的 FAQ/评估 smoke 断言在本地及 warm 复查中失败,仍作为本地验证限制保留,同一版本的完整远程 E2E 已通过。

留存产物 现可正确映射为4张 GPU,实测能量与吞吐量保持不变。配套 producer PR2923 直接输出 num_gpus。此映射修复适用于后续摄取,不重写现有记录,也不触发生产数据回填;历史错误配置身份仍须单独、受控地核对。

修正现代单节点 AgentX 结果的物理 GPU 数推断,使用 TP、PP 和 PCP 的实际设备布局,保留显式计数及旧格式行为。历史错误记录仍需根据原始证据单独核对。
@vercel

vercel Bot commented Sep 9, 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 Sep 9, 2026 5:56pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Claude finished @edwingao28's task in 2m 19s —— View job


Review: preserve physical GPU counts during AgentX ingestion

🟢 LGTM — no blocking issues found.

I traced resolveParallelism() (packages/db/src/etl/benchmark-mapper.ts:442-460) and all 12 parametrized test cases; the logic is correct and the guard is appropriately narrow.

What's right:

  • The new physical-count branch only fires for the explicit modern shape: num_gpus absent, non-disagg framework, scenario_type starts with agentic, a real request_metrics object, and parseOptionalBool(is_multinode) === false / parseOptionalBool(disagg) === false. Legacy flat rows, role-shaped/multinode rows, and explicit counts all retain their prior rules — no regression for the v2 (prefill_tp) branch or non-agentic v1 rows.
  • numGpus ??= tp * ep at the tail reproduces the exact prior fallback (physicalChipCount(row.num_gpus) ?? tp * ep) whenever the new branch doesn't apply.
  • Edge handling is careful: pp: null and pp: true fall through the physicalChipCount guard to the tp * ep fallback rather than being coerced to 1; num_gpus: true (invalid) is treated as absent. All covered by the new it.each table.
  • TP × PP × PCP intentionally excludes EP and DCP (shared TP devices); the dcp_size: 8 → 16 case confirms DCP is not multiplied, matching the code comment.
  • Test coverage is present and matches the changed code (regression test tied to run 33038487711). Docs (docs/data-pipeline.md) updated in the same PR.

Non-blocking observations:

  • The formula omits data parallelism (dp_attention). A hypothetical single-node agentic row with dp_attention: true (e.g. DP2/TP2 → 4 physical GPUs) and no num_gpus would undercount as TP×PP×PCP = 2. This is a pre-existing limitation of the tp * ep convention used throughout this file (not newly introduced here), and the companion producer fix ([AgentX Power] retain power audits and physical GPU counts / 保留功耗审计与物理 GPU 数 InferenceX#2923) emits num_gpus directly, so the risk window is transitional. Worth a note only because GPU count participates in config identity and scales per-GPU/per-MW metrics.

CI status: Lint & Format ✅ passed; Tests (Unit) and Tests (E2E) still in progress at review time — confirm they go green before merge. The PR body notes this is intentionally a draft pending identity reconciliation of existing rows; the code change itself does not rewrite historical data, which is the safe choice.


  • Read the diff
  • Read benchmark-mapper.ts context
  • Check CI status
  • Verify test coverage & edge cases
  • Post review
    · fix/agentx-gpu-topology

@edwingao28
edwingao28 merged commit 4a751ff into master Sep 9, 2026
33 checks passed
@edwingao28
edwingao28 deleted the fix/agentx-gpu-topology branch September 9, 2026 18:27
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