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
Merged fromchai-hw/pypto_chaifix_logsintocann/pyptomaster
chaizhengtongCollaborators
Aug 20
Aug 20


Pull Request has been successfully merged by CANN-robot.
(Thank you for chaizhengtong's contribution.)Aug 20 Created pull request, commit c12b864c
atomgit-bot
Aug 20 Comments:
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),避免测试数据中包含中文字符。


Incorrect?
atomgit-bot
Aug 20 Comments:
Aug 20 Comments:
Aug 20 Added label: cann-cla/yes
CANN-robot
Aug 20 Comments:
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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


66 messages are collapsed here。 See more
Aug 20 Added label: ci-pipeline-passed
gaoxingwang
Aug 20 Comments:
Aug 20 Comments:
/lgtm


袁野
Aug 20 Comments:
Aug 20 Comments:
/approve


Aug 20 Added label: lgtmapproved
Aug 20 Merged pull request