Pull Request已成功合入, 合并人@CANN-robot
(感谢 why you 的贡献)变更摘要
本 PR 用于修复多类告警代码问题。其一,为融合 Pass 验证脚本补充退出码传递:在多个 quick_verify.sh 与 verify_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_pass、5_mmoe_matmul_pass、8_bmm_tile_pass、9_bmm_to_mul_reduce_pass的quick_verify.sh及8_bmm_tile_pass的verify_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_custom、tilelang_add_custom_offline、tilelang_add_custom_online三个目录下的add_custom_kernel.py添加# -*- coding: utf-8 -*-声明,消除编码类告警。 - run.sh 移除
PROJECT_DIR冗余层:三个 tilelang 样例的run.sh删除PROJECT_DIR="${SCRIPT_DIR}"中间变量,将BUILD_DIR、OUTPUT_DIR及cmake -S、cd等引用改为直接使用SCRIPT_DIR,将变量嵌套深度由 3 层降至 2 层;其中tilelang_add_custom_offline/run.sh同时将OM_FILE从${OM_PATH}.om改为直接基于BUILD_DIR拼接。


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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/lgtm


/approve


描述
修复告警代码问题,包含以下变更:
修复融合Pass验证脚本退出码告警:为多个 quick_verify.sh 和 verify_pattern1.sh 脚本补充退出码传递(
set -e或显式退出码检查),避免验证失败时脚本仍返回成功。避免性能日志无匹配时退出:性能日志在无匹配项时不应直接退出,改为跳过或记录告警。
修复 tilelang 样例告警:
add_custom_kernel.py文件添加# -*- coding: utf-8 -*-UTF-8 编码声明run.sh移除冗余PROJECT_DIR中间层,将变量嵌套深度从 3 层降至 2 层,符合"禁止超过2层"的规范变更类型
关联的Issue
如何测试
run.sh,验证路径变量嵌套层级符合规范核对清单
其他信息
本PR包含3个提交,其中2个为cherry-pick(修复脚本退出码和性能日志告警),1个为新增提交(修复tilelang样例告警)。