已合并
Add presmoke runner and validation reports #2900
zhugexun_sjtu创建于 6月3日
Add presmoke runner and validation reports #2900
已合并
zhugexun_sjtu创建于 6月3日
zhugexun_sjtu
zhugexun_sjtu成员
6月3日

描述

本 PR 将 presmoke 看护入口收敛到 scripts/run_presmoke.sh,用于统一 910B/950 全量看护和单 case 调试,同时保留旧脚本调用方依赖的成功/失败输出约定。

主要变更:

  • scripts/run_presmoke.sh 作为统一入口,默认不带参数时仍按 910B NPU 模式执行。
  • 成功时输出 execute samples success,失败时输出 execute samples failed 并返回非 0。
  • 支持固定调度顺序,尽量降低 NPU 队列空闲时间。
  • 全量运行前清理 CANN opp/vendors 下已安装自定义算子包,避免历史安装污染。
  • 保留自定义算子依赖顺序:custom_op_static_lib、parallel_ops_package、custom_op 以及依赖 custom op 的 aclnn/aclop/onnx/tiling_sink 等 case 按依赖顺序执行。
  • 报告统一输出到 presmoke_reports/,包含最终汇总、case timing、失败列表和 stage 日志。
  • npu-smi info 仅作为元信息采集,增加短超时保护,避免收尾阶段卡住。
  • CPU 模式改为显式 opt-in,可通过 MODES=cpu 或 MODE=cpu 启用。

关联的Issue

无。

测试

本地检查:

bash -n scripts/run_presmoke.sh
PYTHONPATH=scripts python3 -m unittest discover -s scripts/presmoke/tests -v
git diff --check

910B 全量 NPU 看护验证:

ARCH=dav-2201 MODES=npu PRIMARY_CARD=7 RETRY_CARDS="1 2 3 4 5 6" bash scripts/run_presmoke.sh

结果:

  • planned:170
  • pass/fail/skip:168/0/2
  • elapsed:667s
  • NPU busy/idle:665.697s / 0.893s
  • NPU utilization:99.9%
  • effective status:PASS

950 全量 NPU 看护验证:

ARCH=dav-3510 MODES=npu PRIMARY_CARD=0 bash scripts/run_presmoke.sh

结果:

  • planned:249
  • pass/fail/skip:244/3/2
  • elapsed:1758s
  • NPU busy/idle:1757.458s / 0.812s
  • NPU utilization:接近 100%
  • effective status:FAIL

950 剩余 3 个失败均为 build 阶段编译失败,不是 NPU run timeout:

  • 03_simt_api/02_features/00_framework/00_pytorch/torch_library_roll
  • 03_simt_api/02_features/01_api_features/00_memory_access/insert_hash_table
  • 03_simt_api/03_best_practices/00_memory_optimizations/cache_hint

典型错误:

  • double precision operation is not allowed in aicore function
  • no matching function for call to 'max'/'min'

文档更新

更新 scripts/presmoke/README.md,补充:

  • 默认运行方式。
  • 910B/950 看护参数示例。
  • 单 case 调试方式。
  • CPU 模式说明。
  • 报告目录和日志说明。
  • 运行全量时不要中途覆盖工作目录,避免污染 build/run 分阶段产物。

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhugexun_sjtu 的贡献)
zhugexun_sjtuzhugexun_sjtu成员
6月3日 创建了 pull request,commit c4c9fd7c
CANN-robotCANN-robot成员
6月3日 添加了label:cann-cla/no
CANN-robot
CANN-robot成员
6月3日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
examples ✅ YANXI_ZHAO, chenyiyuan (2/2) ✅ YANXI_ZHAO (1/1)
repo-cann/asc-devkit ✅ chenyiyuan, sjtulxh (2/2) ✅ chenyiyuan, sjtulxh (2/1)
scripts ✅ kevin365, chenyiyuan (2/2) ✅ kevin365 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

xun_zhuge, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
gao_dafa成员
6月3日 评论:

xun_zhuge,感谢您的提交,建议在完成PR充分自验证后,再触发线上构建任务。

若您的PR已具备检视条件,可根据下表的责任田,@对应的committer进行代码检视,我们会在第一时间对您的提交进行处理。

代码责任田:

module committer
adv_api chenyiyuan, wuyang_hw
basic_api chenyiyuan, wuyang_hw
c_api pangfd, yue_mo_du_qian
cmake xun_zhuge, DragonBornHD84
docs munanhw, ai_xin
examples changxianyu, bianque
simt_api wulinyu, zhanghao_0689
scripts xun_zhuge, kevin365
tools YANXI_ZHAO, XuebinYang, sjtulxh

💡 如您不确定可以@谁,可以直接@我或者ascend-c sig的maintainer,xun_zhuge和ascendhjh,我们会为您分配合适的committer进行代码检视。

再次感谢您参与CANN的社区贡献。

likedislike
zhugexun_sjtuzhugexun_sjtu成员
6月3日 预合并成功(commit_id: 536bb94176159a5f41dbae7aa24f9dc1796efa7d)
此处折叠了241条消息 查看更多
YANXI_ZHAO成员
6月9日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
6月9日 添加了label:lgtmapproved
CANN-robot
CANN-robot成员
6月9日 评论:

The MR can not be merged, because of CodeReview discussion not resolved

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
zhugexun_sjtuzhugexun_sjtu成员
6月9日 解决了最后一个问题
CANN-robotCANN-robot成员
6月9日 合入了pull request