已合并
【PR】: AF日志易用性整改 #1864
【PR】: AF日志易用性整改 #1864
已合并
sgd创建于 13 天前
sgd
sgd成员
13 天前

Pull Request

描述

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

变更类型

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

关联的Issue

如何测试

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

核对清单

其他信息

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

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

变更摘要

本 PR(autofusion_log_daily_developdevelop)为 Bug 修复性质,聚焦 AF 工具链日志的易用性整改:根据工具扫描结果,统一修正日志与生成代码中的拼写错误(如 axidaxis idTenosrTensoroutput_dytpesoutput_dtypesobjectionobjectiveGahterGather 等)、将日志/注释/测试输出中的中文文案及中文标点替换为英文,并为时间与大小类字段补充 nsbytes 等度量单位;同时修复多处日志格式串与实参不匹配、错误信息与实际操作不符(如 BlockTilingDataGenMemoryTilingDataGenShardTensor successfailedBroadcastThreeDimBroadcastFourDim)等问题,并同步更新测试断言与生成代码模板。改动覆盖 autofuse 的 ascendc API、att 生成器、graph_metadefoptimizesuper_kernel 及测试用例等模块。

主要改动

  • 修正日志拼写与语法错误: 统一修正 ascend_graph_parser.cpppyascir_types.cpptiling_code_gen_impl.cppcodegen_tiling_cube.cppgather_api_call.cppnode.cc 等处的拼写错误(axidaxis idTenosrTensordytpesdtypesobjectionobjectiveGahterGatherMutmulMatmul/CubeEntendInfoExtendInfoRuningRunning 等),并修正 can't smallercan't be smallershould less thanshould 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.htotal_time_nsmax_time_nsmin_time_nsaverage_time_nscodegen_tiling_pgo_common.cppaverage_durationbest_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.cppBlockTilingDataGenMemoryTilingDataGenop_desc_utils.ccsuccessfailedascir_api_perf_v1.cppBroadcastThreeDimBroadcastFourDim
  • 增强日志信息并同步更新测试: 为关键失败日志补充上下文(如 codegen_tiling_pgo_common.cpp 的 "find best tiling key failed" 补充 tiling_keyvalid rangereduce_api_perf_v2.cpp 打印 dimR/vlSize 具体值),并同步更新 att_test_select_model.cppstub_regex.cpptest_sk_node.cpp 等测试断言及 solver 生成代码模板("Too many solutions"、"The solver execution failed"),保持行为一致。
likedislike
不准确?
atomgit-bot
atomgit-bot
13 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
13 天前 添加了label:cann-cla/yes
此处折叠了44条消息 查看更多
wangxiaotian995成员
12 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
12 天前 添加了label:lgtm
张德鹏成员
12 天前 评论:

/approve

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