Pull Request已成功合入, 合并人@CANN-robot
(感谢 yanmingxiang 的贡献)变更摘要
本次 PR 将 RT_ERROR_STREAM_UNJOINED(0x0703001F / ACL_ERROR_RT_STREAM_UNJOINED)错误码的 Error Message 上报机制从 #3846 同步至 9.1.0 分支。核心改动是将跨流捕获场景中若干调用点的报错方式从内部日志宏(COND_RETURN_ERROR_MSG_INNER / RT_LOG)统一改为对外上报宏 COND_RETURN_AND_MSG_OUTER,使用 EE1017(Invalid_Argument)作为 ACL 外部错误码,param 为 "capture model",同时将错误原因文案改为英文并附带定位信息和修复指引。此外,对 errcode_manage.cc 中该错误码的描述做了术语对齐(original stream → origin stream),并在 v100/v200 的 capture 适配文件中新增了 error_message_manage.hpp 头文件引用。
主要改动
-
errcode_manage.cc错误描述术语修正:将RT_ERROR_STREAM_UNJOINED映射的 reason 文本从"capture model contains a stream that was not joined to the original stream"改为"...origin stream",与主/子流(origin/sub stream)术语体系对齐。 -
v100/v200
GetCaptureEventFromTask错误上报升级:在capture_adapt_v100.cc和capture_adapt_v200.cc中,将子流末尾任务类型非 event record 时的报错从COND_RETURN_ERROR_MSG_INNER(纯内部日志)改为COND_RETURN_AND_MSG_OUTER,上报ErrorCode::EE1017(Invalid_Argument)及param="capture model",reason 文案包含 stream_id、task_id 定位信息及aclrtRecordEvent修复指引。 -
v100/v200 新增头文件依赖:两个 capture 适配文件均新增
#include "error_message_manage.hpp",以支持COND_RETURN_AND_MSG_OUTER宏所需的ErrorCode枚举与RtFmtMsg。


代码审查
我已完成对所有 5 个变更文件的逐项审查。以下是审查结果:
审查结论
经过逐文件深入审查,本次 PR 的变更未发现任何逻辑错误、安全漏洞、可靠性问题或回归风险。所有变更总结如下:
| 文件 | 审查结果 |
|---|---|
docs/02_dev_guide/04-02_跨流捕获.md |
无问题 — 文档术语对齐(origin stream / sub stream),与代码变更一致 |
src/runtime/core/src/common/errcode_manage.cc |
无问题 — 行长度格式化 + "original stream" → "origin stream" 术语对齐 + 命名空间注释补全 |
src/runtime/feature/aclgraph/context_aclgraph.cc |
无问题 — 新增 origStreamId 变量 + COND_RETURN_AND_MSG_OUTER/EE1017 错误码升级,参数格式匹配宏签名 |
src/runtime/feature/aclgraph/v100/capture_adapt_v100.cc |
无问题 — 新增 #include "error_message_manage.hpp" + COND_RETURN_ERROR_MSG_INNER → COND_RETURN_AND_MSG_OUTER,参数正确 |
src/runtime/feature/aclgraph/v200/capture_adapt_v200.cc |
无问题 — 新增 #include "error_message_manage.hpp" + COND_RETURN_ERROR → COND_RETURN_AND_MSG_OUTER,参数正确 |
变更性质分析:
- 错误码升级:v100/v200/context_aclgraph.cc 的 5 个调用点从内部日志宏(EE9999)升级为
COND_RETURN_AND_MSG_OUTER+ EE1017(Invalid_Argument),错误消息包含定位信息和修复指引,符合 PR 目标 - 术语对齐:错误码描述中的 "original stream" → "origin stream",与文档中的 "主流(origin stream)" 术语一致
- 格式化:errcode_manage.cc 中大批量行长度超限的换行调整,纯格式变更,无功能影响
审查次数: 5 files reviewed, 0 findings reported
⚠️ 已识别出整体风险,但无法提取行内评论,请参考整体评估。


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
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| 9.1.0 | ✅ Andy-lb, 卢煜坤 (2/2) | ✅ Andy-lb (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yanmingxiang, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/compile


流水线任务触发成功
任务链接 [f8e49cbbd62d41ee82278dd43126daf7][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_c | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_david | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_910b | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_common | ✅ SUCCESS | >>>>> | |
| UT_Test_platform | ✅ SUCCESS | >>>>> | |
| UT_Test_qs | ✅ SUCCESS | >>>>> | |
| UT_Test_aicpusd | ✅ SUCCESS | >>>>> | |
| UT_Test_tsd | ✅ SUCCESS | >>>>> | |
| UT_Test_slog | ✅ SUCCESS | >>>>> | |
| UT_Test_atrace | ✅ SUCCESS | >>>>> | |
| UT_Test_adump | ✅ SUCCESS | >>>>> | |
| UT_Test_mmpa | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> |
[2026-07-29 10:05:50] CI执行结束


流水线任务触发成功
任务链接 [3d73d0fb58454f91ac7d53383ac8beab][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Check_Pr | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-07-29 10:00:55] CI执行结束


/compile


流水线任务触发成功
任务链接 [4c93faed4f7e4c028eaf9f1b90a92c3a][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_acl | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_v201 | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_c | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_david | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_910b | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_common | ✅ SUCCESS | >>>>> | |
| UT_Test_platform | ✅ SUCCESS | >>>>> | |
| UT_Test_qs | ✅ SUCCESS | >>>>> | |
| UT_Test_aicpusd | ✅ SUCCESS | >>>>> | |
| UT_Test_tsd | ✅ SUCCESS | >>>>> | |
| UT_Test_error_manager | ✅ SUCCESS | >>>>> | |
| UT_Test_slog | ✅ SUCCESS | >>>>> | |
| UT_Test_atrace | ✅ SUCCESS | >>>>> | |
| UT_Test_adump | ✅ SUCCESS | >>>>> | |
| UT_Test_mmpa | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_report | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof_report | ✅ SUCCESS |
[2026-07-29 10:16:39] CI执行结束


流水线任务触发成功
任务链接 [33620038025245faa14a382b7252d2a8][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Check_Pr | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
| StaticCheck_codespell_check | ⚠️ WARNING | >>>>> | |
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-07-29 10:09:09] CI执行结束


/lgtm


The following label is not ready.
ci-pipeline-passed: The ci-pipeline-passed label is expired. Please compile again.


/compile


流水线任务触发成功
任务链接 [d2b821dfa98746c6bab90709e2cfe5e7][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_acl | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_v201 | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_c | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_david | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_910b | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_common | ✅ SUCCESS | >>>>> | |
| UT_Test_platform | ✅ SUCCESS | >>>>> | |
| UT_Test_qs | ✅ SUCCESS | >>>>> | |
| UT_Test_aicpusd | ✅ SUCCESS | >>>>> | |
| UT_Test_tsd | ✅ SUCCESS | >>>>> | |
| UT_Test_error_manager | ✅ SUCCESS | >>>>> | |
| UT_Test_slog | ✅ SUCCESS | >>>>> | |
| UT_Test_atrace | ✅ SUCCESS | >>>>> | |
| UT_Test_adump | ✅ SUCCESS | >>>>> | |
| UT_Test_mmpa | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_report | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof_report | ✅ SUCCESS |
[2026-08-06 15:31:16] CI执行结束


流水线任务触发成功
任务链接 [9249adb189c74b3b83830f82636c431c][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Check_Pr | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
| StaticCheck_codespell_check | ⚠️ WARNING | >>>>> | |
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-08-06 15:26:27] CI执行结束


Pull Request
描述
将 PR #3846 同步到 9.1.0 分支。对
RT_ERROR_STREAM_UNJOINED(0x0703001F / ACL_ERROR_RT_STREAM_UNJOINED 107025)的 6 个调用点进行 Error Message 整改,并将相关文档术语对齐。主要变更:
context_aclgraph.cc,streams 为空)为内部错误,不修改COND_RETURN_AND_MSG_OUTER+ EE1017(Invalid_Argument),param 为"capture model"origStreamId变量保存主流 iderrcode_manage.cc:original stream改为origin stream#include "error_message_manage.hpp"变更类型
关联的Issue
如何测试
runtime_utest_api_davidcapture 相关 7 tests PASSED核对清单