已合并
【PR】: AF日志易用性整改 #1864
【PR】: AF日志易用性整改 #1864
已合并
sgd创建于 8月28日
sgd
sgd成员
8月28日

Pull Request

描述

整改工具扫描的日志中存在的拼写错误、中文、缺少度量单位等低级问题,并排查类似问题统一修改

变更类型

请选择本次引入的变更类型:

关联的Issue

如何测试

描述测试此变更的步骤和前提条件:
1.
2.

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 sgd 的贡献)
sgdsgd成员
8月28日 添加了label:enhancement
sgdsgd成员
8月28日 创建了 pull request,commit 474e096d
atomgit-bot
atomgit-bot
8月28日 评论:

变更摘要

本 PR(autofusion_log_daily_develop → develop)为 Bug 修复性质,聚焦 AF 工具链日志的易用性整改:根据工具扫描结果,统一修正日志与生成代码中的拼写错误(如 axid→axis id、Tenosr→Tensor、output_dytpes→output_dtypes、objection→objective、Gahter→Gather 等)、将日志/注释/测试输出中的中文文案及中文标点替换为英文,并为时间与大小类字段补充 ns、bytes 等度量单位;同时修复多处日志格式串与实参不匹配、错误信息与实际操作不符(如 BlockTilingDataGen→MemoryTilingDataGen、ShardTensor success→failed、BroadcastThreeDim→BroadcastFourDim)等问题,并同步更新测试断言与生成代码模板。改动覆盖 autofuse 的 ascendc API、att 生成器、graph_metadef、optimize、super_kernel 及测试用例等模块。

主要改动

  • 修正日志拼写与语法错误: 统一修正 ascend_graph_parser.cpp、pyascir_types.cpp、tiling_code_gen_impl.cpp、codegen_tiling_cube.cpp、gather_api_call.cpp、node.cc 等处的拼写错误(axid→axis id、Tenosr→Tensor、dytpes→dtypes、objection→objective、Gahter→Gather、Mutmul→Matmul/Cube、EntendInfo→ExtendInfo、Runing→Running 等),并修正 can't smaller→can't be smaller、should less than→should be less than 等语法问题。
  • 清理日志中的中文文案: 将中文日志/注释/测试输出替换为英文,如 axes_reorder_solver_main.cpp 中 "检测空tensor场景" 改为 "Check empty tensor case"、codegen_tiling_data.cpp 中 "ub_size必大于" 改为 "ub_size must be greater than"、多个测试文件中 "无法打开文件" 改为 "Cannot open file",并清理 format_refiner.cc 中的中文标点。
  • 补充度量单位: 为时间字段补充 ns 单位(duration.cpp/duration.h 中 total_time_ns、max_time_ns、min_time_ns、average_time_ns,codegen_tiling_pgo_common.cpp 中 average_duration、best_perf 及 kernel duration),为 asc_codegen_compile.py 的 tiling size 日志补充 bytes 单位。
  • 修正日志格式串与错误信息: 修正格式说明符与实参顺序不匹配(axes_reorder_solver_autotuning.cpp 交换 current_perf/next_lower_perf 参数顺序,execute_graph_utils.cc 中 % 修正为 %s),并修正与实际操作不符的错误信息,如 tiling_data_generator.cpp 的 BlockTilingDataGen→MemoryTilingDataGen、op_desc_utils.cc 的 success→failed、ascir_api_perf_v1.cpp 的 BroadcastThreeDim→BroadcastFourDim。
  • 增强日志信息并同步更新测试: 为关键失败日志补充上下文(如 codegen_tiling_pgo_common.cpp 的 "find best tiling key failed" 补充 tiling_key 与 valid range、reduce_api_perf_v2.cpp 打印 dimR/vlSize 具体值),并同步更新 att_test_select_model.cpp、stub_regex.cpp、test_sk_node.cpp 等测试断言及 solver 生成代码模板("Too many solutions"、"The solver execution failed"),保持行为一致。
likedislike
不准确?
atomgit-bot
atomgit-bot
8月28日 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
8月28日 添加了label:cann-cla/yes
此处折叠了44条消息 查看更多
wangxiaotian995成员
8月29日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
8月29日 添加了label:lgtm
张德鹏成员
8月29日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
8月29日 添加了label:approved
CANN-robotCANN-robot成员
8月29日 合入了pull request