已合并
【PR】: AF日志易用性整改 #1864
sgd创建于 13 天前
【PR】: AF日志易用性整改 #1864
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 sgd 的贡献)13 天前 添加了label:enhancement
atomgit-bot
13 天前 评论:
13 天前 评论:
变更摘要
本 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"),保持行为一致。


不准确?
atomgit-bot
13 天前 评论:
13 天前 评论:
13 天前 添加了label:cann-cla/yes
此处折叠了44条消息 查看更多
wangxiaotian995
12 天前 评论:
12 天前 评论:
/lgtm


12 天前 添加了label:lgtm
12 天前 添加了label:approved
12 天前 合入了pull request
Pull Request
描述
整改工具扫描的日志中存在的拼写错误、中文、缺少度量单位等低级问题,并排查类似问题统一修改
变更类型
请选择本次引入的变更类型:
关联的Issue
如何测试
描述测试此变更的步骤和前提条件:
1.
2.
核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。