已合并
fix: 修复告警代码 #4781
why you创建于 4 天前
fix: 修复告警代码 #4781
已合并
why you创建于 4 天前
why you成员
4 天前

描述

修复告警代码问题,包含以下变更:

  1. 修复融合Pass验证脚本退出码告警:为多个 quick_verify.sh 和 verify_pattern1.sh 脚本补充退出码传递(set -e 或显式退出码检查),避免验证失败时脚本仍返回成功。

  2. 避免性能日志无匹配时退出:性能日志在无匹配项时不应直接退出,改为跳过或记录告警。

  3. 修复 tilelang 样例告警

    • 三个 add_custom_kernel.py 文件添加 # -*- coding: utf-8 -*- UTF-8 编码声明
    • 三个 run.sh 移除冗余 PROJECT_DIR 中间层,将变量嵌套深度从 3 层降至 2 层,符合"禁止超过2层"的规范

变更类型

关联的Issue

如何测试

  1. 执行融合Pass验证脚本,验证退出码正确传递
  2. 执行 tilelang 样例 run.sh,验证路径变量嵌套层级符合规范

核对清单

其他信息

本PR包含3个提交,其中2个为cherry-pick(修复脚本退出码和性能日志告警),1个为新增提交(修复tilelang样例告警)。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 why you 的贡献)
Wwhy you成员
4 天前 创建了 pull request,commit b8cbd285
atomgit-bot
atomgit-bot
4 天前 评论:

变更摘要

本 PR 用于修复多类告警代码问题。其一,为融合 Pass 验证脚本补充退出码传递:在多个 quick_verify.shverify_pattern1.sh 脚本中新增 set -e,并对性能日志输出中的 grep 命令补充 || true,避免验证或匹配失败时脚本仍返回成功。其二,修复 tilelang 样例告警:三个 add_custom_kernel.py 文件新增 # -*- coding: utf-8 -*- 编码声明,三个 run.sh 脚本移除冗余的 PROJECT_DIR 变量中间层,将变量引用直接基于 SCRIPT_DIR,使嵌套层级从 3 层降至 2 层,符合"禁止超过 2 层"的规范。

主要改动

  • 验证脚本退出码传递:在 examples/fusion_pass 下的 5 个验证脚本(4_mmoe_bmm_split_pass5_mmoe_matmul_pass8_bmm_tile_pass9_bmm_to_mul_reduce_passquick_verify.sh8_bmm_tile_passverify_pattern1.sh)头部添加 set -e,保证任一命令失败时脚本立即以非零状态退出,不再静默返回成功。
  • 性能日志无匹配时不退出:在 8_bmm_tile_pass/cpp/data/quick_verify.sh 中,将 echo "$bench_output" | grep -E "Average time|Total time|Throughput" 追加 || true,当性能日志无匹配项时跳过该输出而非触发 set -e 导致脚本退出。
  • tilelang 样例 UTF-8 编码声明:为 tilelang_add_customtilelang_add_custom_offlinetilelang_add_custom_online 三个目录下的 add_custom_kernel.py 添加 # -*- coding: utf-8 -*- 声明,消除编码类告警。
  • run.sh 移除 PROJECT_DIR 冗余层:三个 tilelang 样例的 run.sh 删除 PROJECT_DIR="${SCRIPT_DIR}" 中间变量,将 BUILD_DIROUTPUT_DIRcmake -Scd 等引用改为直接使用 SCRIPT_DIR,将变量嵌套深度由 3 层降至 2 层;其中 tilelang_add_custom_offline/run.sh 同时将 OM_FILE${OM_PATH}.om 改为直接基于 BUILD_DIR 拼接。
likedislike
不准确?
atomgit-bot
atomgit-bot
4 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
4 天前 添加了label:stat/needs-squash
CANN-robotCANN-robot成员
4 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
4 天前 评论:

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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
repo-cann/ge yangyongqiang0606, zhanj, Mexyy (3/2) yangyongqiang0606 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
4 天前 将yangyongqiang0606,kobemini,ClarkXie,tangqunzhang,xchu42,hugo111,lining23666,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为评审人
CANN-robotCANN-robot成员
4 天前 将yangyongqiang0606,kobemini,ClarkXie,tangqunzhang,xchu42,hugo111,lining23666,depeng1994,wqtshg_wt,peiyang,shengnan666,zhangfan_hanq,zhanj,zhujingjing,Mexyy,wangxiaotian995,stevenaw0,yuht9设为审查人
why you成员
4 天前 评论:

compile

likedislike
Wwhy you成员
4 天前 update merge request[project id: 8824148, iid: 4781, commit_id: a46c83d2e05be19edf8e73f8d85266278196a1e9] virtual merging success
CANN-robot
CANN-robot成员
4 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
4 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
4 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4 天前 添加了label:ci-pipeline-passed
zhanj
zhanj成员
4 天前 评论:

/lgtm

likedislike
夏国正成员
4 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
4 天前 添加了label:lgtm
Wwhy you成员
3 天前 修改标题为 “fix: 修复告警代码”,原标题为“fix: 修复告警代码(脚本退出码、性能日志、tilelang样例)”
yangyongqiang
yangyongqiang成员
3 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
3 天前 添加了label:approved
CANN-robotCANN-robot成员
3 天前 合入了pull request