已关闭
[Bug-Report|缺陷反馈]: foreach 日志质量测评问题整改(580 项)+ License 合规修复 #5181
AlfengYuan创建于 12 天前关闭于 11 天前
12 天前 修改了issue 的描述
12 天前 将 alfengyuan 设为负责人
12 天前 修改标题为 “[Bug-Report|缺陷反馈]: foreach 日志质量测评问题整改(580 项)+ License 合规修复”,原标题为“foreach 日志质量测评问题整改(580 项)+ License 合规修复”
12 天前 修改标题为 “[Bug-Report|缺陷反馈]: foreach 日志质量测评问题整改(580 项)+ License 合规修复”,原标题为“foreach 日志质量测评问题整改(580 项)+ License 合规修复”
12 天前 修改了issue 的描述
12 天前 添加了label:bug-report
12 天前 修改了issue 的描述
11 天前 关闭了 issue
11 天前 issue状态由 进行中 改变为 已完成
11 天前 添加了label:resolved
Describe the current behavior / 问题描述 (Mandatory / 必填)
CANN 日志质量测评(2026-08-25)发现 ops-nn/foreach 目录存在 580 项日志质量问题(严重 30 / 一般 5 / 提示 545),主要包括:
tensorNum越限报错只给上限不打印实际值;foreach_tiling_func.cpp/foreach_reduce_tiling_func.cpp判空对象与日志描述不一致(判platformInfoPtr却写compileInfoPtr is null,实际compileInfoPtr未判空即解引用,存在空指针隐患)%s格式串与 uint32_t 整型参数不匹配;.Currently句号后缺空格;ConcatString拼接漏空格;报错缺主语Tenor应为Tensor、std::cout/printf/print绕过统一日志接口Run graph failed失败事件却以 INFO 级别输出另外,OAT pre-commit 合规检查暴露 3 处示例文件 License 头缺失。
Environment / 环境信息 (Mandatory / 必填)
foreach/*/op_host(arch22/arch35 tiling、op_api)、foreach/*/examples路径Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)
cann-log-evaluation-report-20260825.xlsx)foreach目录问题明细(580 项)git add . && git commit时触发 pre-commit OAT 合规检查,报告示例文件 License 头缺失Describe the expected behavior / 预期结果 (Mandatory / 必填)
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
cann-log-evaluation-report-20260825.xlsxoat_reports/result.txtSpecial notes for this issue/备注 (Optional / 选填)
本次整改范围(对应 PR #7763):
tensorNum报错补打实际值;2 处判空条件修复(platformInfoPtr→compileInfoPtr);7 处语法错误;2 处拼写改名;22 处中文改英文printf删除(含 3 处级别错配);补 CANN-2.0 License 头(年份 2026)验证结果:生产代码 54 处问题逐条核对全部解决;pre-commit + OAT(52 文件)通过。修复提交:
998fe865b。