文件最后提交记录最后更新时间
mspti add flush channel Co-authored-by: eejiechu<wjchuee@foxmail.com> # message auto-generated for no-merge-commit merge: !101 merge mspti_flush_channel into master mspti add flush channel Created-by: eejiechu Commit-by: eejiechu Merged-by: ascend-robot Description: # PR 合入模板 **注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。** ---- ## 1. 修改描述 - **修改原因:** A5 驱动向 profiler 组件上报数据的逻辑有变更,在关闭某类数据采集时,需要添加 flush 机制 - **修改内容:** 1. 引入驱动 halProfDataFlush 接口,在关闭 Kernel、Communication 等类型数据采集时,增加 flush 逻辑(实现参考[msprof](https://gitcode.com/cann/runtime/blob/master/src/dfx/msprof/collector/dvvp/transport/prof_channel.cpp)),保证device数据上报上来 2. 修复 python 接口逻辑,停止采集和取消注册的逻辑 3. 补充 channel_reader 相关 UT ---- ## 2. 功能验证 - [x] **功能自验** 在 A2、A5 上均正常运行 ![ScreenShot_20260525103852_compressed.PNG](https://raw.gitcode.com/user-images/assets/8528170/68325b40-d43f-4199-8a0d-cc22e6efcbb2/ScreenShot_20260525103852_compressed.PNG 'ScreenShot_20260525103852_compressed.PNG') - [ ] **本地自验用例截图** - [ ] **冒烟是否通过** (填入群链接的自验证报告中,如未通过,请说明原因:____________________ ,功能代码请主动申报添加冒烟) ---- ## 3. 分支合并要求 - [ ] **代码合并**(请确保将 master 分支的最新代码同步合并至 poc 分支及 pre-research 分支,同时保证 poc 分支的代码也已正确合并到 pre-research 分支。) ---- ## 4. 代码检视 - **要求:** - 合入代码超过 200 行,需三人以上会议检视。 - 检视密度≥1个/100行。 - 检视缺陷密度未达要求需提供说明。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备 UT 测试用例看护** (如不符合,请说明原因:____________________) - **检视意见数:____ 条** (请填写本次检视的意见总数,用于commit合入前审视) ---- ## 5. 安全自检 ### Python、C++ - [ ] **对外接口新增/删除/变更后,资料要同步新增/删除/变更,新增接口入参校验参考外部输入表格** - [ ] **不允许私有的文件操作,需要使用公共模块的安全函数** - [ ] **任务结束后需要删除临时文件,同时需要考虑任务失败后,临时文件没有残留** - [ ] **数组访问需要校验越界场景,对除法需要做除零校验** - [ ] **需要对递归方法做递归深度校验,正则表达式必须做 ReDoS 校验** - [ ] **需要充分进行接口输入和返回值异常情况的校验** - [ ] **日志打印不要出现拼写或语法错误,不要暴露代码细节和敏感信息** ### C++ - [ ] **指针使用前需要判空** - [ ] **数值计算校验溢出和反转** - [ ] **不可存在内存泄漏(异常场景需要释放内存)** - [ ] **类型转换不能出现数据截断** - [ ] **拷贝字符串时,目的缓冲区至少比源缓冲区大 1** - [ ] **拷贝内存时,目的缓冲区不小于源缓冲区** - [ ] **内存释放后指针赋值为 nullptr** ---- ## 6. 变更知会 - [ ] **资料修改** - [ ] **变更通知(消息知会 + 邮件知会)** ---- See merge request: Ascend/mspti!1017 天前
doStop sequence mspti functions calls Co-authored-by: Ivan Kniazkov<kniazkov.ivan@huawei.com> # message auto-generated for no-merge-commit merge: !64 merge master into master doStop sequence mspti functions calls Created-by: trinitrovazelin Commit-by: trinitrovazelin;Ivan Kniazkov Merged-by: ascend-robot Description: # PR Merge Template **Note: If a checklist item is not applicable to this change, mark it as "N/A" or provide a brief explanation. PRs that do not meet the required standards must not be merged. Please ensure the final commit(s) comply with the merge requirements.** --- ## 1. Change Description * **Reason for change:** This change adds a minimal unit test to cover the public MSPTI stop sequence corresponding to the Huawei doStop() usage pattern. The purpose is to provide incremental test coverage and demonstrate active progress on the cleanup-path validation issue. * **Description of change:** Added a new unit test file: test/mspti_cpp/ut/callback/callback_manager_test/callback_stop_chain_utest.cpp Updated the corresponding build configuration to include the new test source in the existing callback unit test target. The new test verifies the following public stop sequence: 1. subscribe to MSPTI callback delivery, 2. enable runtime callback domain, 3. enable kernel activity collection, 4. disable kernel activity collection, 5. unsubscribe from callback delivery, 6. verify that callback subscription can be established again after the stop sequence. --- ## 2. Functional Verification * [x] **Function self-test** * [ ] **Screenshot of local self-test cases** * [ ] **Smoke test passed** **Explanation:** This MR only adds a unit test and a related build rule update. Smoke verification is currently not involved in this change. **Self-test result:** The newly added test compiles and executes successfully. **Executed test case:** CallbackStopChainUtest.StopSequenceShouldDisableKernelAndAllowResubscribe **Observed result:** * MSPTI activity registration succeeded * MSPTI subscribe succeeded * Runtime callback domain enable succeeded * Kernel activity enable/disable succeeded * MSPTI unsubscribe succeeded * Re-subscribe after stop-chain cleanup succeeded --- ## 3. Branch Merge Requirements * [ ] **Code merged across required branches** **Explanation:** N/A at the current development stage / to be completed according to the branch merge process before final merge. --- ## 4. Code Review * **Requirements:** * Code changes exceeding 200 lines require a review meeting with at least three reviewers. * Review density must be at least 1 issue per 100 lines. * If the review defect density does not meet the requirement, an explanation must be provided. * In principle, changes exceeding 1000 lines are not allowed to be merged and require special record filing. * [ ] **Code review completed** * [x] **UT test case coverage is provided** A new UT case has been added to cover the MSPTI public stop sequence. The current coverage is intentionally lightweight and focuses on the observable API-level contract. * **Number of review comments: *0*** --- ## 5. Security Self-Check ### Python / C++: * [ ] **If any external interface was added / removed / changed, related materials have been updated accordingly, and input validation follows the external input checklist** **Explanation:** N/A. No external interface was added, removed, or changed. * [ ] **No private file operations are used; secure common-module functions are used instead** **Explanation:** N/A. This change only adds a unit test. * [ ] **Temporary files are deleted after task completion, and failure scenarios are also handled without leaving temporary files behind** **Explanation:** N/A. No temporary files are created. * [ ] **Array out-of-bounds scenarios are checked, and division-by-zero is checked where applicable** **Explanation:** N/A. No new array arithmetic or division logic was introduced. * [ ] **Recursive methods include recursion-depth checks, and regular expressions are checked for ReDoS risks** **Explanation:** N/A. No recursion or regex logic was introduced. * [x] **Abnormal input and return-value scenarios are adequately checked where applicable** The new test verifies expected public API return values across the stop sequence. * [x] **Logs do not contain spelling or grammar issues and do not expose code details or sensitive information** No new logging logic is introduced in this change. ### C++: * [x] **Pointers are checked for null before use where applicable** The test verifies that the subscriber handle is non-null after successful subscription and resets it after unsubscribe. * [ ] **Numeric calculations are checked for overflow and wraparound** **Explanation:** N/A. No numeric calculation logic was introduced. * [x] **No memory leak exists, including exception/failure scenarios** The test performs best-effort cleanup in TearDown(), and dynamically allocated activity buffers are released properly. * [x] **Type conversions do not introduce data truncation** No unsafe narrowing conversion was introduced in this change. * [x] **When copying strings, the destination buffer is at least one byte larger than the source buffer** **Explanation:** N/A. No string copy logic was introduced. * [x] **When copying memory, the destination buffer is not smaller than the source buffer** **Explanation:** N/A. No raw memory copy logic was introduced. * [x] **Pointers are set to nullptr after memory/resource release** The subscriber handle is explicitly reset to nullptr after unsubscribe. --- ## 6. Change Notification * [ ] **Documentation updated** * [ ] **Change notification sent (message notification + email notification)** **Explanation:** N/A for this MR unless specifically required by the project process. See merge request: Ascend/mspti!641 个月前
mspti timestamp bugfix Co-authored-by: eejiechu<wjchuee@foxmail.com> # message auto-generated for no-merge-commit merge: !89 merge mspti_syscnt_fix into master mspti timestamp bugfix Created-by: eejiechu Commit-by: eejiechu Merged-by: ascend-robot Description: # PR 合入模板 **注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。** ---- ## 1. 修改描述 - **修改原因:** mspti 在host freq获取失败的场景下,时间戳信息计算出错 - **修改内容:** 1. 修正 ContextManager 中计算 device 时间戳的逻辑,去掉 host freq enable 判断 2. 修复 mstx 获取 host 时间戳的逻辑,根据 host freq enable 标志,确定返回的是 mono raw 时间戳,还是 syscnt 3. 部分 pre-commit cleancode 修复 4. ContextManager UT 补充 ---- ## 2. 功能验证 - [x] **功能自验** 在 host freq 不支持场景,mstx 数据时间戳计算出错(第一列是本地UTC时间,后面是mstx数据start、end时间戳) ![image.png](https://raw.gitcode.com/user-images/assets/8528170/bfeac291-362a-4a02-9b20-f6a7b32e4a24/image.png 'image.png') 修复后,数据恢复正常 ![image.png](https://raw.gitcode.com/user-images/assets/8528170/4acf9c40-f7e9-4a6d-8aa1-725e6772bf16/image.png 'image.png') - [ ] **本地自验用例截图** - [ ] **冒烟是否通过** (填入群链接的自验证报告中,如未通过,请说明原因:____________________ ,功能代码请主动申报添加冒烟) ---- ## 3. 分支合并要求 - [ ] **代码合并**(请确保将 master 分支的最新代码同步合并至 poc 分支及 pre-research 分支,同时保证 poc 分支的代码也已正确合并到 pre-research 分支。) ---- ## 4. 代码检视 - **要求:** - 合入代码超过 200 行,需三人以上会议检视。 - 检视密度≥1个/100行。 - 检视缺陷密度未达要求需提供说明。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备 UT 测试用例看护** (如不符合,请说明原因:____________________) - **检视意见数:____ 条** (请填写本次检视的意见总数,用于commit合入前审视) ---- ## 5. 安全自检 ### Python、C++ - [ ] **对外接口新增/删除/变更后,资料要同步新增/删除/变更,新增接口入参校验参考外部输入表格** - [ ] **不允许私有的文件操作,需要使用公共模块的安全函数** - [ ] **任务结束后需要删除临时文件,同时需要考虑任务失败后,临时文件没有残留** - [ ] **数组访问需要校验越界场景,对除法需要做除零校验** - [ ] **需要对递归方法做递归深度校验,正则表达式必须做 ReDoS 校验** - [ ] **需要充分进行接口输入和返回值异常情况的校验** - [ ] **日志打印不要出现拼写或语法错误,不要暴露代码细节和敏感信息** ### C++ - [ ] **指针使用前需要判空** - [ ] **数值计算校验溢出和反转** - [ ] **不可存在内存泄漏(异常场景需要释放内存)** - [ ] **类型转换不能出现数据截断** - [ ] **拷贝字符串时,目的缓冲区至少比源缓冲区大 1** - [ ] **拷贝内存时,目的缓冲区不小于源缓冲区** - [ ] **内存释放后指针赋值为 nullptr** ---- ## 6. 变更知会 - [ ] **资料修改** - [ ] **变更通知(消息知会 + 邮件知会)** ---- See merge request: Ascend/mspti!891 个月前
mspti add flush channel Co-authored-by: eejiechu<wjchuee@foxmail.com> # message auto-generated for no-merge-commit merge: !101 merge mspti_flush_channel into master mspti add flush channel Created-by: eejiechu Commit-by: eejiechu Merged-by: ascend-robot Description: # PR 合入模板 **注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。** ---- ## 1. 修改描述 - **修改原因:** A5 驱动向 profiler 组件上报数据的逻辑有变更,在关闭某类数据采集时,需要添加 flush 机制 - **修改内容:** 1. 引入驱动 halProfDataFlush 接口,在关闭 Kernel、Communication 等类型数据采集时,增加 flush 逻辑(实现参考[msprof](https://gitcode.com/cann/runtime/blob/master/src/dfx/msprof/collector/dvvp/transport/prof_channel.cpp)),保证device数据上报上来 2. 修复 python 接口逻辑,停止采集和取消注册的逻辑 3. 补充 channel_reader 相关 UT ---- ## 2. 功能验证 - [x] **功能自验** 在 A2、A5 上均正常运行 ![ScreenShot_20260525103852_compressed.PNG](https://raw.gitcode.com/user-images/assets/8528170/68325b40-d43f-4199-8a0d-cc22e6efcbb2/ScreenShot_20260525103852_compressed.PNG 'ScreenShot_20260525103852_compressed.PNG') - [ ] **本地自验用例截图** - [ ] **冒烟是否通过** (填入群链接的自验证报告中,如未通过,请说明原因:____________________ ,功能代码请主动申报添加冒烟) ---- ## 3. 分支合并要求 - [ ] **代码合并**(请确保将 master 分支的最新代码同步合并至 poc 分支及 pre-research 分支,同时保证 poc 分支的代码也已正确合并到 pre-research 分支。) ---- ## 4. 代码检视 - **要求:** - 合入代码超过 200 行,需三人以上会议检视。 - 检视密度≥1个/100行。 - 检视缺陷密度未达要求需提供说明。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备 UT 测试用例看护** (如不符合,请说明原因:____________________) - **检视意见数:____ 条** (请填写本次检视的意见总数,用于commit合入前审视) ---- ## 5. 安全自检 ### Python、C++ - [ ] **对外接口新增/删除/变更后,资料要同步新增/删除/变更,新增接口入参校验参考外部输入表格** - [ ] **不允许私有的文件操作,需要使用公共模块的安全函数** - [ ] **任务结束后需要删除临时文件,同时需要考虑任务失败后,临时文件没有残留** - [ ] **数组访问需要校验越界场景,对除法需要做除零校验** - [ ] **需要对递归方法做递归深度校验,正则表达式必须做 ReDoS 校验** - [ ] **需要充分进行接口输入和返回值异常情况的校验** - [ ] **日志打印不要出现拼写或语法错误,不要暴露代码细节和敏感信息** ### C++ - [ ] **指针使用前需要判空** - [ ] **数值计算校验溢出和反转** - [ ] **不可存在内存泄漏(异常场景需要释放内存)** - [ ] **类型转换不能出现数据截断** - [ ] **拷贝字符串时,目的缓冲区至少比源缓冲区大 1** - [ ] **拷贝内存时,目的缓冲区不小于源缓冲区** - [ ] **内存释放后指针赋值为 nullptr** ---- ## 6. 变更知会 - [ ] **资料修改** - [ ] **变更通知(消息知会 + 邮件知会)** ---- See merge request: Ascend/mspti!1017 天前
Mspti adapter communication_monitor dev Co-authored-by: eejiechu<wjchuee@foxmail.com> # message auto-generated for no-merge-commit merge: !79 merge communication_monitor_dev into master Mspti adapter communication_monitor dev Created-by: eejiechu Commit-by: eejiechu Merged-by: ascend-robot Description: # PR 合入模板 **注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。** ---- ## 1. 修改描述 - **修改原因:** mspti-python新增CommunicationMonitor,替换原有HcclMonitor功能 - **修改内容:** 1. 由于上层框架调用通信算子方式变更,mspti-python 采集通信算子的HcclMonitor功能失效,新增CommunicationMonitor实现替换 2. ut、st、sample、文档同步变更 3. python HcclMonitor、c hccl activity 弃用说明后续补充 ---- ## 2. 功能验证 - [x] **功能自验** CommunicationMonitor 功能正常 ![ScreenShot_20260423110458_compressed.PNG](https://raw.gitcode.com/user-images/assets/8528170/83391bb0-b308-40df-9788-eed8e77fd469/ScreenShot_20260423110458_compressed.PNG 'ScreenShot_20260423110458_compressed.PNG') - [ ] **本地自验用例截图** - [ ] **冒烟是否通过** (填入群链接的自验证报告中,如未通过,请说明原因:____________________ ,功能代码请主动申报添加冒烟) ---- ## 3. 分支合并要求 - [ ] **代码合并**(请确保将 master 分支的最新代码同步合并至 poc 分支及 pre-research 分支,同时保证 poc 分支的代码也已正确合并到 pre-research 分支。) ---- ## 4. 代码检视 - **要求:** - 合入代码超过 200 行,需三人以上会议检视。 - 检视密度≥1个/100行。 - 检视缺陷密度未达要求需提供说明。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备 UT 测试用例看护** (如不符合,请说明原因:____________________) - **检视意见数:____ 条** (请填写本次检视的意见总数,用于commit合入前审视) ---- ## 5. 安全自检 ### Python、C++ - [ ] **对外接口新增/删除/变更后,资料要同步新增/删除/变更,新增接口入参校验参考外部输入表格** - [ ] **不允许私有的文件操作,需要使用公共模块的安全函数** - [ ] **任务结束后需要删除临时文件,同时需要考虑任务失败后,临时文件没有残留** - [ ] **数组访问需要校验越界场景,对除法需要做除零校验** - [ ] **需要对递归方法做递归深度校验,正则表达式必须做 ReDoS 校验** - [ ] **需要充分进行接口输入和返回值异常情况的校验** - [ ] **日志打印不要出现拼写或语法错误,不要暴露代码细节和敏感信息** ### C++ - [ ] **指针使用前需要判空** - [ ] **数值计算校验溢出和反转** - [ ] **不可存在内存泄漏(异常场景需要释放内存)** - [ ] **类型转换不能出现数据截断** - [ ] **拷贝字符串时,目的缓冲区至少比源缓冲区大 1** - [ ] **拷贝内存时,目的缓冲区不小于源缓冲区** - [ ] **内存释放后指针赋值为 nullptr** ---- ## 6. 变更知会 - [ ] **资料修改** - [ ] **变更通知(消息知会 + 邮件知会)** ---- See merge request: Ascend/mspti!791 个月前
msPTI冒烟 Co-authored-by: xfeng<zhaiyibo@h-partners.com> # message auto-generated for no-merge-commit merge: !2 merge main into master msPTI冒烟 Created-by: zyb_230 Commit-by: xfeng Merged-by: ascend-robot Description: # PR 合入模板 **注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。** ---- ## 1. 修改描述 - **修改原因:** 添加冒烟框架 - **修改内容:** 冒烟代码 ---- ## 2. 功能验证 - [ ] **功能自验** 验证没问题,CI暂未添加。 - [ ] **本地自验用例截图** - [ ] **冒烟是否通过** (填入群链接的自验证报告中,如未通过,请说明原因:____________________ ,功能代码请主动申报添加冒烟) ---- ## 3. 分支合并要求 - [ ] **代码合并**(请确保将 master 分支的最新代码同步合并至 poc 分支及 pre-research 分支,同时保证 poc 分支的代码也已正确合并到 pre-research 分支。) ---- ## 3. 代码检视 - **要求:** - 合入代码超过 200 行,需三人以上会议检视。 - 检视密度≥1个/100行。 - 检视缺陷密度未达要求需提供说明。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备 UT 测试用例看护** (如不符合,请说明原因:____________________) - **检视意见数:____ 条** (请填写本次检视的意见总数,用于commit合入前审视) ---- ## 4. 安全自检 ### Python、C++: - [ ] **对外接口新增/删除/变更后,资料要同步新增/删除/变更,新增接口入参校验参考外部输入表格** - [ ] **不允许私有的文件操作,需要使用公共模块的安全函数** - [ ] **任务结束后需要删除临时文件,同时需要考虑任务失败后,临时文件没有残留** - [ ] **数组访问需要校验越界场景,对除法需要做除零校验** - [ ] **需要对递归方法做递归深度校验,正则表达式必须做 ReDoS 校验** - [ ] **需要充分进行接口输入和返回值异常情况的校验** - [ ] **日志打印不要出现拼写或语法错误,不要暴露代码细节和敏感信息** ### C++: - [ ] **指针使用前需要判空** - [ ] **数值计算校验溢出和反转** - [ ] **不可存在内存泄漏(异常场景需要释放内存)** - [ ] **类型转换不能出现数据截断** - [ ] **拷贝字符串时,目的缓冲区至少比源缓冲区大 1** - [ ] **拷贝内存时,目的缓冲区不小于源缓冲区** - [ ] **内存释放后指针赋值为 nullptr** ---- ## 5. 变更知会 - [ ] **资料修改** - [ ] **变更通知(消息知会 + 邮件知会)** ---- See merge request: Ascend/mspti!23 个月前