| Files | Last commit | Last update |
|---|---|---|
fix(example): 修复 IPC Notify 样例的失败退出状态 Co-authored-by: 梁晋轩<19303092837@163.com> # message auto-generated for no-merge-commit merge: !6390 merge fix-ci-nov18-notify-result into master fix(example): 修复 IPC Notify 样例的失败退出状态 Created-by: liangjinxuan-2026 Commit-by: 梁晋轩 Merged-by: cann-robot Description: # Pull Request ## 描述 两个 IPC Notify 样例收集两侧退出状态,保留输出文件,并在数据不同或缺少有效数据时返回非零。 - example/2_advanced_features/notify/0_ipc_notify_withpid/run.sh - example/2_advanced_features/notify/1_ipc_notify_withoutpid/run.sh ## 变更类型 - [x] 🐛 Bug 修复 - [x] 📦 构建过程或辅助工具的变动 ## 关联的Issue Fixes #1400 ## 如何测试 在 Git Bash 临时目录运行两个脚本的实际进程启动、等待与校验段。替身双方分别模拟成功、数值不同、生产者失败和消费者失败。未使用 NPU。 Baseline: 353ab6f4bea1b3e988aee37c6be7500cbd69d0c3. - results differ (2 script(s)): exit 0 → 1. Output: [FAILURE] IPC notify for task synchronization failed. Value at source is 10, but value at destination is 20. - producer failed (2 script(s)): exit 0 → 23. Output: [FAILURE] An IPC notify process failed.. - consumer failed (2 script(s)): exit 0 → 23. Output: [FAILURE] An IPC notify process failed.. - matching values (2 script(s)): exit 0 → 0. Output: [SUCCESS] IPC notify for task synchronization is successful. Values at source and destination are equal: 10. bash -n and git diff --check passed. ## 核对清单 - [x] 已做隔离自测 ## 其他信息 AI 辅助定位、修改与隔离验证。 See merge request: cann/runtime!6390 | 9 days ago | |
fix(example): 修复 IPC Notify 样例的失败退出状态 Co-authored-by: 梁晋轩<19303092837@163.com> # message auto-generated for no-merge-commit merge: !6390 merge fix-ci-nov18-notify-result into master fix(example): 修复 IPC Notify 样例的失败退出状态 Created-by: liangjinxuan-2026 Commit-by: 梁晋轩 Merged-by: cann-robot Description: # Pull Request ## 描述 两个 IPC Notify 样例收集两侧退出状态,保留输出文件,并在数据不同或缺少有效数据时返回非零。 - example/2_advanced_features/notify/0_ipc_notify_withpid/run.sh - example/2_advanced_features/notify/1_ipc_notify_withoutpid/run.sh ## 变更类型 - [x] 🐛 Bug 修复 - [x] 📦 构建过程或辅助工具的变动 ## 关联的Issue Fixes #1400 ## 如何测试 在 Git Bash 临时目录运行两个脚本的实际进程启动、等待与校验段。替身双方分别模拟成功、数值不同、生产者失败和消费者失败。未使用 NPU。 Baseline: 353ab6f4bea1b3e988aee37c6be7500cbd69d0c3. - results differ (2 script(s)): exit 0 → 1. Output: [FAILURE] IPC notify for task synchronization failed. Value at source is 10, but value at destination is 20. - producer failed (2 script(s)): exit 0 → 23. Output: [FAILURE] An IPC notify process failed.. - consumer failed (2 script(s)): exit 0 → 23. Output: [FAILURE] An IPC notify process failed.. - matching values (2 script(s)): exit 0 → 0. Output: [SUCCESS] IPC notify for task synchronization is successful. Values at source and destination are equal: 10. bash -n and git diff --check passed. ## 核对清单 - [x] 已做隔离自测 ## 其他信息 AI 辅助定位、修改与隔离验证。 See merge request: cann/runtime!6390 | 9 days ago | |
【PR】: 新增可复用 Notify 跨 Stream 数据轮转样例 Co-authored-by: 2403_89963296<2540257541@qq.com> # message auto-generated for no-merge-commit merge: !5059 merge example/2_advanced_features/notify/2_reusable_stream_handoff into master 【PR】: 新增可复用 Notify 跨 Stream 数据轮转样例 Created-by: 2403_89963296 Commit-by: 2403_89963296 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 example/2_advanced_features/notify/2_reusable_stream_handoff 单 Device 样例,演示生产 Stream 和消费 Stream 如何通过一组可复用 Notify 轮转多槽数据,并在每轮结束后批量复位 Notify。 - 创建三个数据槽及对应 Notify,调用 aclrtGetNotifyId 记录 ID,并在每轮复用前验证 ID 保持稳定。 - 生产 Stream 异步写入槽位数据并记录 Notify,消费 Stream 等待对应 Notify 后异步读回结果。 - 每轮使用带轮次、槽位和元素索引的数据模式,逐项校验 96 个值,检测跨轮次或跨槽位串扰。 - 同步当前轮任务并完成结果校验后,调用 aclrtNotifyBatchReset 一次批量复位三个 Notify。 - 连续执行三轮,任一 Runtime API、数据校验或资源清理失败时返回非零。 - 补充中英文 README、CMake 构建配置、运行脚本,并更新 Notify 主题中英文导航。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 如何测试 1. 加载 CANN 环境并进入样例目录。 bash source /home/developer/Ascend/cann/set_env.sh cd /mnt/workspace/runtime/example/2_advanced_features/notify/2_reusable_stream_handoff 2. 编译并运行样例。 bash bash run.sh 3. 检查三轮 ID、数据和批量复位结果,确认最终输出成功标记。 text [INFO] Notify slot 0 has ID .... [INFO] Notify slot 1 has ID .... [INFO] Notify slot 2 has ID .... [INFO] Round 1 verified 96 values without cross-round or cross-slot interference. [INFO] Round 1 batch-reset 3 Notifies. [INFO] Round 2 verified 96 values without cross-round or cross-slot interference. [INFO] Round 2 batch-reset 3 Notifies. [INFO] Round 3 verified 96 values without cross-round or cross-slot interference. [INFO] Round 3 batch-reset 3 Notifies. [INFO] [SUCCESS] Reusable Stream handoff sample completed successfully. [SUCCESS] Reusable Stream handoff sample executed successfully. 验证环境及结果: - CANN:9.3.0-weekly.20260916.01 - Device:Atlas A3,SOC_VERSION=Ascend910_9362 - CMake 配置、编译和 A3 实机运行通过。 - 三轮共完成 9 次槽位传递,每轮 96 个值均校验通过,每轮批量复位 3 个 Notify 成功。 - clang-format 和 OAT pre-commit 检查通过。 - git diff --check、bash -n 和 C++ 函数 50 行 NBNC 检查通过。 - 当前环境未提供 CodeCheck 可执行入口,未执行 CodeCheck。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 关键 API 的产品支持范围交集为 Atlas A2、Atlas A3 和 Ascend 950PR/Ascend 950DT。 - aclrtGetNotifyId 和 aclrtNotifyBatchReset 两个目标 API 均已纳入样例,没有未覆盖接口。 - aclrtNotifyBatchReset 不支持昇腾虚拟化实例,本样例不适用于该场景。 - 本次只新增编号样例并更新直属 Notify 主题导航,不修改已有可运行样例或共享辅助代码。 See merge request: cann/runtime!5059 | 2 months ago | |
【PR】: 新增可复用 Notify 跨 Stream 数据轮转样例 Co-authored-by: 2403_89963296<2540257541@qq.com> # message auto-generated for no-merge-commit merge: !5059 merge example/2_advanced_features/notify/2_reusable_stream_handoff into master 【PR】: 新增可复用 Notify 跨 Stream 数据轮转样例 Created-by: 2403_89963296 Commit-by: 2403_89963296 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 example/2_advanced_features/notify/2_reusable_stream_handoff 单 Device 样例,演示生产 Stream 和消费 Stream 如何通过一组可复用 Notify 轮转多槽数据,并在每轮结束后批量复位 Notify。 - 创建三个数据槽及对应 Notify,调用 aclrtGetNotifyId 记录 ID,并在每轮复用前验证 ID 保持稳定。 - 生产 Stream 异步写入槽位数据并记录 Notify,消费 Stream 等待对应 Notify 后异步读回结果。 - 每轮使用带轮次、槽位和元素索引的数据模式,逐项校验 96 个值,检测跨轮次或跨槽位串扰。 - 同步当前轮任务并完成结果校验后,调用 aclrtNotifyBatchReset 一次批量复位三个 Notify。 - 连续执行三轮,任一 Runtime API、数据校验或资源清理失败时返回非零。 - 补充中英文 README、CMake 构建配置、运行脚本,并更新 Notify 主题中英文导航。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 如何测试 1. 加载 CANN 环境并进入样例目录。 bash source /home/developer/Ascend/cann/set_env.sh cd /mnt/workspace/runtime/example/2_advanced_features/notify/2_reusable_stream_handoff 2. 编译并运行样例。 bash bash run.sh 3. 检查三轮 ID、数据和批量复位结果,确认最终输出成功标记。 text [INFO] Notify slot 0 has ID .... [INFO] Notify slot 1 has ID .... [INFO] Notify slot 2 has ID .... [INFO] Round 1 verified 96 values without cross-round or cross-slot interference. [INFO] Round 1 batch-reset 3 Notifies. [INFO] Round 2 verified 96 values without cross-round or cross-slot interference. [INFO] Round 2 batch-reset 3 Notifies. [INFO] Round 3 verified 96 values without cross-round or cross-slot interference. [INFO] Round 3 batch-reset 3 Notifies. [INFO] [SUCCESS] Reusable Stream handoff sample completed successfully. [SUCCESS] Reusable Stream handoff sample executed successfully. 验证环境及结果: - CANN:9.3.0-weekly.20260916.01 - Device:Atlas A3,SOC_VERSION=Ascend910_9362 - CMake 配置、编译和 A3 实机运行通过。 - 三轮共完成 9 次槽位传递,每轮 96 个值均校验通过,每轮批量复位 3 个 Notify 成功。 - clang-format 和 OAT pre-commit 检查通过。 - git diff --check、bash -n 和 C++ 函数 50 行 NBNC 检查通过。 - 当前环境未提供 CodeCheck 可执行入口,未执行 CodeCheck。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 关键 API 的产品支持范围交集为 Atlas A2、Atlas A3 和 Ascend 950PR/Ascend 950DT。 - aclrtGetNotifyId 和 aclrtNotifyBatchReset 两个目标 API 均已纳入样例,没有未覆盖接口。 - aclrtNotifyBatchReset 不支持昇腾虚拟化实例,本样例不适用于该场景。 - 本次只新增编号样例并更新直属 Notify 主题导航,不修改已有可运行样例或共享辅助代码。 See merge request: cann/runtime!5059 | 2 months ago | |
【PR】: 新增可复用 Notify 跨 Stream 数据轮转样例 Co-authored-by: 2403_89963296<2540257541@qq.com> # message auto-generated for no-merge-commit merge: !5059 merge example/2_advanced_features/notify/2_reusable_stream_handoff into master 【PR】: 新增可复用 Notify 跨 Stream 数据轮转样例 Created-by: 2403_89963296 Commit-by: 2403_89963296 Merged-by: cann-robot Description: # Pull Request ## 描述 新增 example/2_advanced_features/notify/2_reusable_stream_handoff 单 Device 样例,演示生产 Stream 和消费 Stream 如何通过一组可复用 Notify 轮转多槽数据,并在每轮结束后批量复位 Notify。 - 创建三个数据槽及对应 Notify,调用 aclrtGetNotifyId 记录 ID,并在每轮复用前验证 ID 保持稳定。 - 生产 Stream 异步写入槽位数据并记录 Notify,消费 Stream 等待对应 Notify 后异步读回结果。 - 每轮使用带轮次、槽位和元素索引的数据模式,逐项校验 96 个值,检测跨轮次或跨槽位串扰。 - 同步当前轮任务并完成结果校验后,调用 aclrtNotifyBatchReset 一次批量复位三个 Notify。 - 连续执行三轮,任一 Runtime API、数据校验或资源清理失败时返回非零。 - 补充中英文 README、CMake 构建配置、运行脚本,并更新 Notify 主题中英文导航。 ## 变更类型 请选择本次引入的变更类型: <!-- [x] 表示选中 --> - [ ] 🐛 Bug 修复 - [x] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [ ] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [x] 📝 文档内容更新 ## 如何测试 1. 加载 CANN 环境并进入样例目录。 bash source /home/developer/Ascend/cann/set_env.sh cd /mnt/workspace/runtime/example/2_advanced_features/notify/2_reusable_stream_handoff 2. 编译并运行样例。 bash bash run.sh 3. 检查三轮 ID、数据和批量复位结果,确认最终输出成功标记。 text [INFO] Notify slot 0 has ID .... [INFO] Notify slot 1 has ID .... [INFO] Notify slot 2 has ID .... [INFO] Round 1 verified 96 values without cross-round or cross-slot interference. [INFO] Round 1 batch-reset 3 Notifies. [INFO] Round 2 verified 96 values without cross-round or cross-slot interference. [INFO] Round 2 batch-reset 3 Notifies. [INFO] Round 3 verified 96 values without cross-round or cross-slot interference. [INFO] Round 3 batch-reset 3 Notifies. [INFO] [SUCCESS] Reusable Stream handoff sample completed successfully. [SUCCESS] Reusable Stream handoff sample executed successfully. 验证环境及结果: - CANN:9.3.0-weekly.20260916.01 - Device:Atlas A3,SOC_VERSION=Ascend910_9362 - CMake 配置、编译和 A3 实机运行通过。 - 三轮共完成 9 次槽位传递,每轮 96 个值均校验通过,每轮批量复位 3 个 Notify 成功。 - clang-format 和 OAT pre-commit 检查通过。 - git diff --check、bash -n 和 C++ 函数 50 行 NBNC 检查通过。 - 当前环境未提供 CodeCheck 可执行入口,未执行 CodeCheck。 ## 核对清单 <!-- [x] 表示选中 --> - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md),并遵守了其中的所有规定,包括但不限于commit message的格式、无效commit的合并等 ## 其他信息 - 关键 API 的产品支持范围交集为 Atlas A2、Atlas A3 和 Ascend 950PR/Ascend 950DT。 - aclrtGetNotifyId 和 aclrtNotifyBatchReset 两个目标 API 均已纳入样例,没有未覆盖接口。 - aclrtNotifyBatchReset 不支持昇腾虚拟化实例,本样例不适用于该场景。 - 本次只新增编号样例并更新直属 Notify 主题导航,不修改已有可运行样例或共享辅助代码。 See merge request: cann/runtime!5059 | 2 months ago |
notify
This directory focuses on Notify, IPC Notify, and CntNotify synchronization capabilities.
Sample List
- 0_ipc_notify_withpid: Demonstrates IPC Notify sharing with process whitelist validation enabled.
- 1_ipc_notify_withoutpid: Demonstrates IPC Notify sharing with process whitelist validation disabled.
- 2_reusable_stream_handoff: Demonstrates data rotation between producer and consumer Streams on one Device with batch Notify reset.