Merged
fix(machine): improve log quality in cellmatch code and remove Chinese from test strings. #5565
chaizhengtongAdd on Aug 20
fix(machine): improve log quality in cellmatch code and remove Chinese from test strings. #5565
Merged
chaizhengtongAdd on Aug 20
chaizhengtong
chaizhengtongCollaborators
Aug 20
修复cellmatch相关代码中,日志打印错误吗不规范的问题
修复machine 工具组件多处日志中中文字符的问题
likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for chaizhengtong's contribution.)
chaizhengtongchaizhengtongCollaborators
Aug 20 Created pull request, commit c12b864c
atomgit-bot
atomgit-bot
Aug 20 Comments:

变更摘要

本 PR 聚焦于 machine 组件(cellmatch 相关代码)的日志质量改进:一方面规范日志字段命名并补充关键数值信息,使错误日志更易定位问题;另一方面将 machine 组件及其相关测试中多处中文字符串(错误消息、断言消息、测试跳过原因等)统一替换为英文。主要涉及 framework/src/machine/runtime/launcher/cell_match_dynamic.cpp、framework/src/machine/utils/dynamic/dev_workspace.cpp 及多个测试文件。

主要改动

  • cellmatch 动态启动日志规范化:在 cell_match_dynamic.cpp 中,将 ResetRuntimeDynamicCellMatchPoolHost 的日志字段 capacity 改为 capacityBytes、offset 改为 offsetBytes,并在 TryBuildDynamicCellMatchDesc、PrepareDynamicCellMatchDescPatches、ValidateDynamicCellMatchTableMemBudget 的断言日志中补充 tile、cellMatchStride0、maxAllowed 等具体数值及约束说明,同时将日志首字母统一为大写。
  • workspace 分配失败日志字段规范化:在 dev_workspace.cpp 的 TryAllocateDynamicCellMatchForAssembleSlot 中,动态 cell match 元数据分配失败日志的字段 size 改为 sizeBytes,与容量类字段命名保持一致。
  • 移除测试代码中的中文字符串:将 test_gather_in_l1.cpp、test_gather_in_ub.cpp 中配置校验与越界检查的中文错误信息、test_gather_operation.cpp 的"测试不支持这个形状"等提示,以及多个 UT 文件(test_assign_memory_type.cpp、test_generate_move_op.cpp、test_merge_view_assemble.cpp、test_pre_graph.cpp、test_split_large_fanout_tensor.cpp)中 "当前函数指针为空" 等断言消息全部替换为英文。
  • 测试跳过与 unicode 消息去中文化:将 test_device_task_context.cpp 中两处 GTEST_SKIP() 的中文跳过原因改为英文;test_device_trace.cpp 的 unicode 测试字符串由中文字符改为 ASCII 字节序列(\xC3\xA9\xC3\xA0\xC3\xBC),避免测试数据中包含中文字符。
likedislike
Incorrect?
atomgit-bot
atomgit-bot
Aug 20 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Aug 20 Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
Aug 20 Comments:

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.
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
repo-cann/pypto ✅ jason_yuan_ye, gaoxingwang (2/2) ✅ jason_yuan_ye (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

chai-hw, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
66 messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Aug 20 Added label: ci-pipeline-passed
gaoxingwang
gaoxingwangCollaborators
Aug 20 Comments:

/lgtm

likedislike
袁野
袁野Collaborators
Aug 20 Comments:

/approve

likedislike
CANN-robotCANN-robotCollaborators
Aug 20 Added label: lgtmapproved
CANN-robotCANN-robotCollaborators
Aug 20 Merged pull request