Merged
【mspti_master】测试用例完善 #178
hewenboAdd on Aug 20
【mspti_master】测试用例完善 #178
Merged
hewenboAdd on Aug 20
Merged fromDeleted :masterintoAscend/msptimaster
hewenbo
hewenboCollaborators
Aug 20

PR 合入模板

注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。


1. 修改描述

  • **修改原因:现有用例中,DeInit 与 DeInitMspti 的调用顺序存在缺陷。当前逻辑为先执行 DeInit(其内部调用 aclrtResetDevice),再执行 DeInitMspti(其内部调用 drvstop)。由于 aclrtResetDevice 与 drvstop 存在时序依赖,必须确保 drvstop 优先于 aclrtResetDevice 被调用。因此,用例需调整为先调用 DeInitMspti,后调用 DeInit。
  • **修改内容:现有用例中,DeInit 与 DeInitMspti 的调用顺序存在缺陷。当前逻辑为先执行 DeInit(其内部调用 aclrtResetDevice),再执行 DeInitMspti(其内部调用 drvstop)。由于 aclrtResetDevice 与 drvstop 存在时序依赖,必须确保 drvstop 优先于 aclrtResetDevice 被调用。因此,用例需调整为先调用 DeInitMspti,后调用 DeInit。

https://gitcode.com/Ascend/mspti/issues/56

2. 功能验证


3. 分支合并要求


4. 代码检视

  • 要求:

    • 合入代码超过 200 行,需三人以上会议检视。
    • 检视密度≥1个/100行。
    • 检视缺陷密度未达要求需提供说明。
    • 大于 1000 行代码原则上不允许合入,需进行备案。
  • 检视意见数:____ 条 (请填写本次检视的意见总数,用于commit合入前审视)


5. 安全自检

Python、C++

C++


6. 变更知会


likedislike
Pull Request has been successfully merged by ascend-robot.
(Thank you for hewenbo's contribution.)
atomgit-bot
atomgit-bot
Aug 20 Comments:

变更摘要

本 PR 主要对 mspti_master 的测试用例(samples 示例程序)进行完善,核心改动是调整各示例 main() 函数中的资源销毁顺序:将 DeInitMspti() 提前到 DeInit(deviceId, &context, &stream) 之前调用,使 MSpti 的卸载先于 ACL 设备上下文与 stream 的销毁,保证清理流程顺序正确。

主要改动

  • 调整回调类示例的销毁顺序:在 samples/callback_domain/callback_domain.cpp、samples/callback_mstx/callback_mstx.cpp、samples/mspti_activity/mspti_activity.cpp 中,将 DeInitMspti() 从 DeInit() 之后移至其之前执行。
  • 调整关联追踪类示例的销毁顺序:在 samples/mspti_correlation/mspti_correlation.cpp、samples/mspti_external_correlation/mspti_external_correlation.cpp 中,将 DeInitMspti() 提前到 DeInit() 之前,后续的 PrintCorrelationTrace() / PrintExternalCorrelationTrace() 及资源释放逻辑保持不变。
  • 调整 mstx 域示例的销毁顺序:在 samples/mspti_mstx_activity_domain/mspti_mstx_activity_domain.cpp 中,将 DeInitMspti() 从 MstxDomainDeInit() 之后移到 DeInit() 之前执行,形成 DeInitMspti() → DeInit() → MstxDomainDeInit() 的清理顺序。
likedislike
Incorrect?
AtlasAccount
AtlasAccountCollaborators
Aug 20 Comments:
atomgit-bot
atomgit-bot
Aug 20 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
ascend-robotascend-robotCollaborators
Aug 20 Added label: ascend-cla/yes
ascend-robot
ascend-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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/mspti ✅ 陈豪, mei-feiyao (2/2) ✅ 陈豪 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
101 messages are collapsed here。 See more
hewenbohewenboCollaborators
Aug 21 Modify description of pull request
mei-feiyao
mei-feiyaoCollaborators
Aug 21 Comments:

/lgtm

likedislike
chenhao_1209
chenhao_1209Collaborators
Aug 21 Comments:

/approve

likedislike
ascend-robotascend-robotCollaborators
Aug 21 Added label: approvedlgtm
ascend-robotascend-robotCollaborators
Aug 21 Merged pull request