已合并
【PR】: 简要描述 sync modify #4525
王璐瑶创建于 6 天前
【PR】: 简要描述 sync modify #4525
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 王璐瑶 的贡献)atomgit-bot
6 天前 评论:
6 天前 评论:
变更摘要
该 PR 针对 Stream 的任务同步与回收逻辑(GetFinishedTaskIdBySqHead、SynchronizeDelayTime、SynchronizeExecutedTask 等)进行修正,主要解决并发场景下通过 sqHead 判定任务完成状态时可能读到新下发任务、以及 executeEndTaskid_ 处于未初始化值(MAX_UINT16_NUM)时导致的误判问题,并同步补充了相关单元测试的初始状态设置。
主要改动
GetFinishedTaskIdBySqHead增加任务一致性校验:在函数入口记录lastTaskId_到lastId,当尾部posTail未变化但最新任务已变化、或尾部推进到sqHead、或sqHead - 1位置读到的endTaskId比入口时的最新任务更新时,直接返回RT_ERROR_NONE,避免将新下发任务误判为已完成;同时将条件判断改写为(sqHead == posTail) || (nextTaskId != endTaskId)并补充了含stream_id、sq_id的日志信息SynchronizeDelayTime与SynchronizeExecutedTask增加未初始化保护:对executeEndTaskid_.Value()和GetExecuteEndTaskId()增加与MAX_UINT16_NUM的比较,仅当已初始化时才进行任务完成度(TASK_ID_GEQ、IsTaskExcuted)判断,避免初始值导致的同步误判WaitConcernedTaskRecycled日志调整:将 abort 状态提示文案更新为 "The stream is in abort state" 并携带stream_id,仅涉及日志信息优化- 单元测试补充初始状态:
rt_utest_david_stream.cc的TestSeparateSendAndRecycle3/4增加SetExecuteEndTaskId(0),rt_utest_david_task_recycle.cc的SyncTaskRecycleBySqHead/V2增加SetLastTaskId(task->id),以适配新校验逻辑下的用例执行


atomgit-bot
6 天前 评论:
6 天前 评论:
6 天前 添加了label:cann-cla/yes
CANN-robot
6 天前 评论:
6 天前 评论:
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.
You can self-configure the PR merge rules for this repository. For more details, please refer to 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 |
|---|---|---|
| 9.0.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)


CANN-robot
6 天前 评论:
6 天前 评论:
6 天前 将SongAnyin,zhaozhixuan,wda1991,wangtao43,zhangpengpeng8,vaceciliachen,yanmingxiang,TianXL,weiying_101,turing_yhy,Henry_ascend,Reyn52166,jiangtao_rts,dragon_q,Turing_JasonWen,phy-zhao,WangHuiH,Axiaolei,ykl999,sunnana_004434229,YzQnWyx,houyanbao,hanxiaolong,zhou-wuxiao,gcw_kUomxQ2l,Andy-lb,tingwood,liubin1986设为评审人
6 天前 将SongAnyin,zhaozhixuan,wda1991,wangtao43,zhangpengpeng8,vaceciliachen,yanmingxiang,TianXL,weiying_101,turing_yhy,Henry_ascend,Reyn52166,jiangtao_rts,dragon_q,Turing_JasonWen,phy-zhao,WangHuiH,Axiaolei,ykl999,sunnana_004434229,YzQnWyx,houyanbao,hanxiaolong,zhou-wuxiao,gcw_kUomxQ2l,Andy-lb,tingwood,liubin1986设为评审人
6 天前 将TianXL,jiangtao_rts,hanxiaolong,gcw_kUomxQ2l,Andy-lb设为审查人
6 天前 添加了label:ci-pipeline-running
CANN-robot
6 天前 评论:
6 天前 评论:
流水线任务触发成功
任务链接 [ebb22cb380d14b50b1055fc8e642caf4][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| 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_mmpa | ✅ SUCCESS | >>>>> | |
| PreSmoke_A900_npupool | ✅ SUCCESS | >>>>> | |
| UT_Test_rts_report | ✅ SUCCESS | >>>>> | |
| UT_Test_msprof_report | ✅ SUCCESS |
[2026-08-27 13:34:43] CI执行结束


CANN-robot
6 天前 评论:
6 天前 评论:
流水线任务触发成功
任务链接 [312bbb9a78eb442a9819ab9257a5c3f5][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | ||
| antipoison | ✅ SUCCESS | ||
| codecheck_Check_Pr | ✅ SUCCESS | ||
| codecheck_style | ✅ SUCCESS | >>>>> | |
| codecheck_precommit | ✅ SUCCESS | >>>>> | |
| StaticCheck_codespell | ✅ SUCCESS | ||
| StaticCheck_link_validity | ✅ SUCCESS | ||
| StaticCheck_resource_existence | ✅ SUCCESS | ||
| StaticCheck_tag_closed | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS |
[2026-08-27 13:15:50] CI执行结束


6 天前 删除了label:ci-pipeline-running
6 天前 添加了label:ci-pipeline-passed
5 天前 添加了label:approved
ykl999
5 天前 评论:
5 天前 评论:
/lgtm


5 天前 添加了label:lgtm
5 天前 合入了pull request
Pull Request
描述
请清晰准确地描述本次 Pull Request 的意图和变更内容。
变更类型
请选择本次引入的变更类型:
关联的Issue
如何测试
描述测试此变更的步骤和前提条件:
1.
2.
核对清单
其他信息
在此添加任何其他关于本次 PR 的说明。