测试基建:🧪 实现精度稳定性分维度日志 - #681
Merged
cangtianhuang merged 3 commits intoJul 16, 2026
Merged
Conversation
|
Thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧭 背景
accuracy_stable测试模式需要同时观察 Paddle、Torch 以及两次重复执行之间的稳定性差异,原有测试结果主要落在单一终态日志中,遇到某个执行阶段报错或某个 comp 维度不通过时,后续统计很难区分问题来自 Paddle/Torch 对齐、前向/反向,还是框架自身稳定性。本 PR 在现有
accuracy_stable流程上补齐 comp 维度日志,使得测试结果可以按accuracy、accuracy_backward、torch_stable、torch_stable_backward、paddle_stable、paddle_stable_backward等维度输出结果,同时重构日志初始化和聚合逻辑,保证 engineV2 / engineV4 / prof 工具使用统一的日志入口。🛠️ 实现方案
日志模块新增统一入口
init_log(log_dir, worker_tmp_logs=True),在初始化时统一处理日志目录、进程临时日志模式、文件句柄和内存态重置。engineV2、engineV4、compute-sanitizer worker 以及 matmul heatmap 工具都切换到该入口,减少分散初始化带来的状态不一致。针对
accuracy_stable,新增 comp 到统计维度的映射和write_to_comp_log(),将单个 comp 的终态写入comp/<dimension>/子目录。执行阶段错误通过受影响 comp 列表广播到相关维度;比较阶段错误只写入对应 comp;所有维度未出现终态错误时写入 pass,主日志保留聚合后的结果视图以兼容现有统计和 error_stat 工具。聚合阶段先汇总 worker 临时日志和 comp 子目录,再从
comp/<dimension>/api_config_*.txt按 log type 生成主日志摘要。同一配置在 accuracy_stable comp 维度结果中可以进入多个主结果文件,breakdown 报告会提示这是accuracy_stable comp-dimension breakdown,各分类计数代表结果集命中数,不要求彼此互斥;互斥性检查只在每个 comp 维度内部执行。📁 改动文件