| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix:日志整改 Co-authored-by: liu-lu<www.liulu824910939@qq.com> # message auto-generated for no-merge-commit merge: !4722 merge master into master fix:日志整改 Created-by: liu-lu Commit-by: liu-lu Merged-by: cann-robot Description: # Pull Request ## 描述 本 PR 对 aicpu_sched / queue_schedule / tsd 模块进行日志质量整改,共涉及 15 个源文件与 4 个 UT 文件,不改变任何功能逻辑: 1. **术语修正**: src/queue_schedule/common/bqs_log.h 中整数溢出误写为 "Integer reversed",修正为 "Integer overflow"(3 处),避免误导排查方向; 2. **语法/拼写修正**:exist → exists、dequed → dequeued、is not equal with → is not equal to、input param is error → input param is invalid、Success to alloc/init/free/uninit → Successfully alloced/inited/freed/uninited、paramHead → ParamHead 等; 3. **日志上下文增强**: - 补充场景标识:in ts kernel(hwts_kernel_model_control)、in datadump(datadump_interface); - 补充参数详情:kernelName / resultAddr 是否为 null(hwts_kernel_model_process)、aicpuLogIndex 实际值与有效范围 [0, size)(qs_interface_process)、depth 有效范围 [1, MAX_QUEUE_DEPTH](comm_channel_queue); - 补充单位:时间 us(msprof_manager)、内存 bytes(simple_entity、comm_channel_queue); 4. **日志语义区分**:RouterServer 解析报错区分 query msg / non-query msg;ManageQsEvent 失败区分 para error / other error; 5. **新增 UT 用例**(11 个): - tests/ut/queue_schedule/ut/testcase/bqs_log_utest.cpp:BqsCheckAssign32UAdd / 32UMuti / 64UAdd 溢出与正常分支共 8 个用例; - tests/ut/queue_schedule/ut/testcase/qs_interface_utest.cpp:GetAicpuPhysIndex 越界用例(越界返回 0); - tests/ut/queue_schedule/ut/testcase/queue_schedule_low_cov_utest.cpp:CommChannelQueue Init 非法 depth、Init+Uninit 共 2 个用例。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [x] 🐛 Bug 修复 - [ ] ✨ 新功能 - [x] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 关联的Issue Close #930 ## 如何测试 1. **编译构建测试**:全量编译 aicpu_sched / queue_schedule / tsd 及 tests 模块,确认无编译错误与新增告警; 2. **单元测试**:执行 queue_schedule 与 aicpu_sched 的 UT,确认新增用例全部通过: - BqsCheckAssign32UAdd/Muti/64UAdd*:溢出分支置 onceOverFlow=true 且结果为 0,正常分支计算结果正确; - GetAicpuPhysIndexOutOfRange001:aicpuLogIndex 越界时返回 0; - CommChannelQueueInitInvalidDepth / CommChannelQueueInitAndUninit:depth 为 0 或超过 MAX_QUEUE_DEPTH 时 Init 返回 FSM_FAILED; - 回归 operator_kernel_gather_dequeue_test 原有用例(拼写修正不影响行为); 3. **日志输出验证**:构造整数溢出、参数非法、AICPU 索引越界等异常场景,确认日志输出修正后的术语(Integer overflow)及新增上下文信息(实际值、有效范围、单位)。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 源代码变更均为日志文本调整,不涉及控制流与数据流改动,无功能/性能风险; - 本 PR 不涉及文档变更(日志文案不属于文档范畴); - 变更统计:19 个文件,新增约 133 行,删除约 38 行。 See merge request: cann/runtime!4722 | 6 天前 | |
Enable clang-format for queue_schedule Co-authored-by: zhaowenrui666<zhaowenrui7@huawei.com> # message auto-generated for no-merge-commit merge: !3789 merge precommit-queue_schedule-ut into master Enable clang-format for queue_schedule Created-by: zhaowenrui666 Commit-by: zhaowenrui666 Merged-by: cann-robot Description: ## 变更说明 - 取消 .pre-commit-config.yaml 中 clang-format 对 src/queue_schedule 的排除。 - 对 src/queue_schedule 执行 clang-format 格式整改。 - 不修改 queue_schedule 业务逻辑。 ## 验证 - find src/queue_schedule -type f | xargs pre-commit run --files:通过,clang-format Passed,OAT Passed。 - pre-commit run --files .pre-commit-config.yaml:无适用 hook,Skipped。 - 变更范围确认:仅包含 .pre-commit-config.yaml 和 src/queue_schedule。 ## 过程记录 中文过程文档已留存:task/runtime_precommit_format_rectification/queue_schedule_precommit_pr_process.md 说明:git diff --check 对 queue_schedule 报 trailing whitespace,定位为目录文件保留 CRLF 行尾导致 diff 中显示 \r。本次未额外做 LF 行尾转换,避免扩大格式整改范围。 See merge request: cann/runtime!3789 | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 天前 | ||
| 1 个月前 |