Pull Request已成功合入, 合并人@CANN-robot
(感谢 StoneChan_ 的贡献)变更摘要
本 PR 依据 CANN 日志规范,对 glu、reverse_sequence、sleep、quant_max、concat_offset、foreach_asin 等责任田算子的运行时日志及对应 UT 测试进行质量整改(排除 experimental 目录),均为日志文案、级别与输出方式的调整,不改变算子功能逻辑。核心动作包括:将失败场景误标为 INFO 的日志统一改为 ERROR;修正 "fail to get" 缺时态、"is failed" 中式结构、"less than Dcache Size" 缺系动词等语法问题;为变量越限日志补充正确取值范围(如 "must be greater than 0, but got %ld");将示例中的 printf/std::cout 统一收敛到 LOG_PRINT 宏并将内部缩写 [XIR] 替换为算子专属标记 [REVERSE_SEQUENCE_GE_IR];删除 UT 中冗余的 std::cout 状态输出并为涉及文件补 (void) 防止未使用告警。
主要改动
- 修复 GE IR 示例日志级别错配:在
test_geir_reverse_sequence.cpp中,将初始化 GE、AddGraph、RunGraph、Finalize 等失败路径误标为 INFO 的LOG_PRINT统一改为 ERROR,并同步修正 "Precision is fail" 等文案。 - 统一示例日志输出方式与标识:将
test_geir_reverse_sequence.cpp中的printf/std::cout输出改为LOG_PRINT(如printf生成输入失败、std::cout输出 error/warning 消息与输出张量信息),并将内部缩写[XIR]替换为算子专属标记[REVERSE_SEQUENCE_GE_IR]。 - 补充越限日志的正确取值范围:
reverse_sequence系列 tiling(reverse_sequence_bas_tiling.cpp、reverse_sequence_bs_tiling.cpp、reverse_sequence_bsa_tiling.cpp、reverse_sequence_sba_common_tiling.cpp)中将ubFactorA_/ubFactorB_/ubFactorS_ is %ld改为 "must be greater than 0, but got %ld"。 - 修正日志语法与拼写:glu、reverse_sequence、foreach_asin 等算子将 "fail to get" 改为 "Failed to get"、"support" 改为 "supports"、"less than Dcache Size" 改为 "is less than Dcache size"、"set tiling data fail" 改为 "failed to set tiling data" 等。
- 清理 UT 冗余输出:删除
test_aclnn_glu.cpp、test_sleep_*、test_foreach_asin*、test_quant_max*、test_concat_offset_tilling.cpp等测试中SetUpTestCase/TearDownTestCase及用例内多余的std::cout状态打印,并在test_concat_offset_tilling.cpp中对tiling_data_result补(void)避免未使用告警。


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 |
|---|---|---|
| activation | ✅ 王星, 汤平川 (2/2) | ✅ 王星, 汤平川 (2/1) |
| control | ✅ 刘伟, 汤平川 (2/2) | ✅ 刘伟 (1/1) |
| index | ✅ 王星, 汤平川 (2/2) | ✅ 王星, 汤平川 (2/1) |
| quant | ✅ 王星, 汤平川 (2/2) | ✅ 汤平川, 王星 (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
StoneChan_, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/lgtm
/approve


/lgtm
/approve


问题描述 (必填)
依据 CANN 日志规范检查规则,对责任田算子的运行时日志进行质量整改,修复以下问题:
影响算子:glu/reverse_sequence/sleep/quant_max/concat_offset/foreach_asin
环境信息 (必填)
不涉及(纯日志文案整改,无运行时行为变化)
重现步骤 (必填)
执行算子 UT / 查看相关算子日志
预期结果 (必填)
日志级别、文案符合日志规范,便于问题定位
日志 / 截图 (必填)
-(整改前后对比见 PR 变更)
备注 (选填)
关联 PR:https://gitcode.com/cann/ops-nn/merge_requests/9154
关联的Issue:#5110