bench(mhc): 新增大规模分级性能验证驱动 #4

Merged
eryi merged 2 commits from kangmx into group4/stable 2026-08-04 21:45:04 +08:00
Collaborator

变更概述

为 MHCPostOp 新增独立的大 shape 分级性能验证驱动,补充现有 pytest benchmark 的批量运行与结构化 JSON 结果能力。

Constraints

  • Benchmark-only 变更。
  • 不修改 Op、Kernel、Test、Workload 或 Manifest。
  • 不在 Benchmark 阶段编写正确性断言。
  • 正确性继续由 tests/ops/test_mhc.py 独立负责。

新增文件

  • benchmarks/ops/run_mhc_post_scale_validation.py
  • benchmarks/ops/mhc_post_scale_cases.json
  • docs/summer-camp/mhc-post-scale-validation.md

设计

  • B 表示展平后的 token grid,即 request_batch × sequence
  • 覆盖 DeepSeek V4 Flash/Pro 的真实 hidden size:4096、7168。
  • 分为 smokeproductionstress 三档。
  • 默认 tune=False,固定配置结果与 autotune 结果分开。
  • 输入根据固定 seed 在 GPU 内存中生成,不序列化大 Tensor。
  • 复用仓库 BenchmarkBaseManifestBenchmark
  • 编译/autotune 在第一次调用完成,正式计时使用仓库 CUPTI 协议。
  • 保留 benchmark-local PyTorch baseline。
  • JSON 只记录环境、shape、延迟、配置、逻辑指标和显存。

验证

python -m py_compile benchmarks/ops/run_mhc_post_scale_validation.py
PASS

python -m json.tool benchmarks/ops/mhc_post_scale_cases.json
PASS

git diff --check
PASS

python benchmarks/ops/run_mhc_post_scale_validation.py \
  --tier smoke \
  --tune off \
  --output /data/summer_camp/mhc_post_repo_benchmark_smoke.json
MHC_SCALE_EXIT_CODE=0


C500 16G sGPU 外部完整实验已覆盖 8 个 shape:
B:32 / 128 / 512 / 4096 / 8192
N:4
C:4096 / 7168
原始实验结果未提交进仓库,避免混入生成文件。
## 变更概述 为 MHCPostOp 新增独立的大 shape 分级性能验证驱动,补充现有 pytest benchmark 的批量运行与结构化 JSON 结果能力。 ## Constraints - Benchmark-only 变更。 - 不修改 Op、Kernel、Test、Workload 或 Manifest。 - 不在 Benchmark 阶段编写正确性断言。 - 正确性继续由 `tests/ops/test_mhc.py` 独立负责。 ## 新增文件 - `benchmarks/ops/run_mhc_post_scale_validation.py` - `benchmarks/ops/mhc_post_scale_cases.json` - `docs/summer-camp/mhc-post-scale-validation.md` ## 设计 - `B` 表示展平后的 token grid,即 `request_batch × sequence`。 - 覆盖 DeepSeek V4 Flash/Pro 的真实 hidden size:4096、7168。 - 分为 `smoke`、`production`、`stress` 三档。 - 默认 `tune=False`,固定配置结果与 autotune 结果分开。 - 输入根据固定 seed 在 GPU 内存中生成,不序列化大 Tensor。 - 复用仓库 `BenchmarkBase` 和 `ManifestBenchmark`。 - 编译/autotune 在第一次调用完成,正式计时使用仓库 CUPTI 协议。 - 保留 benchmark-local PyTorch baseline。 - JSON 只记录环境、shape、延迟、配置、逻辑指标和显存。 ## 验证 ```text python -m py_compile benchmarks/ops/run_mhc_post_scale_validation.py PASS python -m json.tool benchmarks/ops/mhc_post_scale_cases.json PASS git diff --check PASS python benchmarks/ops/run_mhc_post_scale_validation.py \ --tier smoke \ --tune off \ --output /data/summer_camp/mhc_post_repo_benchmark_smoke.json MHC_SCALE_EXIT_CODE=0 C500 16G sGPU 外部完整实验已覆盖 8 个 shape: B:32 / 128 / 512 / 4096 / 8192 N:4 C:4096 / 7168 原始实验结果未提交进仓库,避免混入生成文件。
kangmx added 2 commits 2026-08-04 21:00:57 +08:00
eryi merged commit 5122bf3218 into group4/stable 2026-08-04 21:45:04 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: eryi/TileOPs-Metax#4
No description provided.