| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: 为 example 目录下的 run.sh 添加 set -e Co-authored-by: wangtao43<wangtao43@huawei.com> # message auto-generated for no-merge-commit merge: !2160 merge fix/add-set-e-to-run-sh into master fix: 为 example 目录下的 run.sh 添加 set -e Created-by: wangtao43 Commit-by: wangtao43 Merged-by: cann-robot Description: # Pull Request ## 描述 在 example 目录下的 run.sh 脚本中添加 set -e 指令,确保脚本在遇到错误时立即退出,提高脚本的健壮性和错误处理能力。 ## 变更类型 请选择本次引入的变更类型(勾选对应项): - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 变更详情 - 修改了 36 个 run.sh 脚本文件 - 在版权声明之后添加 set -e 指令 - 涉及目录: - example/1_basic_features/ - example/2_advanced_features/ - example/5_performance/ ## 如何测试 无需测试,脚本修改不影响功能,仅增强错误处理。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md) ## 其他信息 此修改提高了脚本的健壮性,当脚本中的命令执行失败时,脚本会立即退出,避免后续错误。 See merge request: cann/runtime!2160 | 2 个月前 | |
fix: 为 example 目录下的 run.sh 添加 set -e Co-authored-by: wangtao43<wangtao43@huawei.com> # message auto-generated for no-merge-commit merge: !2160 merge fix/add-set-e-to-run-sh into master fix: 为 example 目录下的 run.sh 添加 set -e Created-by: wangtao43 Commit-by: wangtao43 Merged-by: cann-robot Description: # Pull Request ## 描述 在 example 目录下的 run.sh 脚本中添加 set -e 指令,确保脚本在遇到错误时立即退出,提高脚本的健壮性和错误处理能力。 ## 变更类型 请选择本次引入的变更类型(勾选对应项): - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 变更详情 - 修改了 36 个 run.sh 脚本文件 - 在版权声明之后添加 set -e 指令 - 涉及目录: - example/1_basic_features/ - example/2_advanced_features/ - example/5_performance/ ## 如何测试 无需测试,脚本修改不影响功能,仅增强错误处理。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md) ## 其他信息 此修改提高了脚本的健壮性,当脚本中的命令执行失败时,脚本会立即退出,避免后续错误。 See merge request: cann/runtime!2160 | 2 个月前 | |
fix: 为 example 目录下的 run.sh 添加 set -e Co-authored-by: wangtao43<wangtao43@huawei.com> # message auto-generated for no-merge-commit merge: !2160 merge fix/add-set-e-to-run-sh into master fix: 为 example 目录下的 run.sh 添加 set -e Created-by: wangtao43 Commit-by: wangtao43 Merged-by: cann-robot Description: # Pull Request ## 描述 在 example 目录下的 run.sh 脚本中添加 set -e 指令,确保脚本在遇到错误时立即退出,提高脚本的健壮性和错误处理能力。 ## 变更类型 请选择本次引入的变更类型(勾选对应项): - [ ] 🐛 Bug 修复 - [ ] ✨ 新功能 - [ ] 💄 代码风格更新(格式化,局部变量) - [x] ♻️ 重构(既不修复错误也不增加功能的代码变动) - [ ] 📦 构建过程或辅助工具的变动 - [ ] 📝 文档内容更新 ## 变更详情 - 修改了 36 个 run.sh 脚本文件 - 在版权声明之后添加 set -e 指令 - 涉及目录: - example/1_basic_features/ - example/2_advanced_features/ - example/5_performance/ ## 如何测试 无需测试,脚本修改不影响功能,仅增强错误处理。 ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [ ] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签(如:feat:, fix:) - [x] 我已经详细阅读了贡献指南(CONTRIBUTING.md) ## 其他信息 此修改提高了脚本的健壮性,当脚本中的命令执行失败时,脚本会立即退出,避免后续错误。 See merge request: cann/runtime!2160 | 2 个月前 | |
feat: 添加 aclGraph 条件操作 sample(IF/WHILE/SWITCH 及嵌套组合) Co-authored-by: good_luck_to_me<qiaoruimin@huawei.com> # message auto-generated for no-merge-commit merge: !2809 merge sample/acl_graph_cond_model into master feat: 添加 aclGraph 条件操作 sample(IF/WHILE/SWITCH 及嵌套组合) Created-by: good_luck_to_me Commit-by: good_luck_to_me Merged-by: cann-robot Description: # Pull Request ## 描述 添加 aclGraph 条件操作(IF/WHILE/SWITCH 及嵌套组合)的可运行 sample,覆盖 对应典型场景: 1. IF 条件双分支验证(true/false) 2. WHILE 单次迭代循环 3. SWITCH 多分支选择 ## 变更类型 - [x] ✨ 新功能 ## 如何测试 1. 设置 CANN 环境变量 2. cd example/2_advanced_features/model_ri/3_cond_model 3. bash run.sh 注意:需要 CANN 版本支持 aclGraph 条件操作 API ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签 See merge request: cann/runtime!2809 | 1 个月前 | |
feat: 添加 aclGraph 条件操作 sample(IF/WHILE/SWITCH 及嵌套组合) Co-authored-by: good_luck_to_me<qiaoruimin@huawei.com> # message auto-generated for no-merge-commit merge: !2809 merge sample/acl_graph_cond_model into master feat: 添加 aclGraph 条件操作 sample(IF/WHILE/SWITCH 及嵌套组合) Created-by: good_luck_to_me Commit-by: good_luck_to_me Merged-by: cann-robot Description: # Pull Request ## 描述 添加 aclGraph 条件操作(IF/WHILE/SWITCH 及嵌套组合)的可运行 sample,覆盖 对应典型场景: 1. IF 条件双分支验证(true/false) 2. WHILE 单次迭代循环 3. SWITCH 多分支选择 ## 变更类型 - [x] ✨ 新功能 ## 如何测试 1. 设置 CANN 环境变量 2. cd example/2_advanced_features/model_ri/3_cond_model 3. bash run.sh 注意:需要 CANN 版本支持 aclGraph 条件操作 API ## 核对清单 - [x] 我的代码遵循了项目的代码风格 - [x] 我已对代码进行了自测 - [x] 我已更新了相关的文档 - [x] 我在标题中使用了合适的类型标签 See merge request: cann/runtime!2809 | 1 个月前 | |
优化example目录结构易用性及补充用例 Co-authored-by: qiang_zq<qiang.zhangqiang@huawei.com> # message auto-generated for no-merge-commit merge: !1163 merge sample into master 优化example目录结构易用性及补充用例 Created-by: qiang_zq Commit-by: qiang_zq Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 1、example 目录结构优化,按学习阶段重新组织目录结构(0_quickstart ~ 6_scenarios) 2、补充部分API的example用例 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/runtime/issues/284 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 部分用例执行过程 source /home/developer/Ascend/cann/set_env.sh && export SOC_VERSION=ascend910b3 && export ASCENDC_CMAKE_DIR=/home/developer/Ascend/cann/aarch64-linux/tikcpp/ascendc_kernel_cmake && export ASCEND_INSTALL_PATH=/home/developer/Ascend/cann && cd /mnt/workspace/gitCode/qiang_zq/runtime/example/3_memory_advanced/allocator/0_custom_allocator && rm -rf build && dos2unix run.sh 2>/dev/null || sed -i 's/\\r$//' run.sh && bash run.sh Configuring CMake... -- The C compiler identification is GNU 13.3.0 -- The CXX compiler identification is GNU 13.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /mnt/workspace/gitCode/qiang_zq/runtime/example/3_memory_advanced/allocator/0_custom_allocator/build Building... [ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o [100%] Linking CXX executable main [100%] Built target main Build completed successfully! Executable location: /mnt/workspace/gitCode/qiang_zq/runtime/example/3_memory_advanced/allocator/0_custom_allocator/build/main Run the sample: ./build/main ./build/main [INFO] CustomAlloc size=256 [INFO] CustomAllocAdvise size=128 [INFO] CustomAlloc size=128 [INFO] CustomFree invoked [INFO] CustomFree invoked [INFO] Allocator desc queried: descOut=0xaaaabd6a3780 allocCount=2 freeCount=2 用例执行报告 0_quickstart (3/3) ✅ ✅ 0_hello_cann ✅ 1_error_handling ✅ 2_system_info 1_basic_features (23/23) ✅ ✅ device/0_device_normal ✅ device/1_device_multi_thread ✅ device/2_device_P2P ✅ event/0_event_status ✅ event/1_event_timestamp ✅ memory/0_h2h_memory_copy ✅ memory/10_ipc_memory_withpid ✅ memory/11_ipc_memory_withoutpid ✅ memory/1_h2d_sync_memory_copy ✅ memory/2_h2d_async_memory_copy ✅ memory/3_d2h_sync_memory_copy ✅ memory/4_d2h_async_memory_copy ✅ memory/5_d2d_sync_memory_copy ✅ memory/6_d2d_async_memory_copy ✅ memory/7_physical_memory_sharing_withpid ✅ memory/8_physical_memory_sharing_withoutpid ✅ memory/9_multistream_sync_memory ✅ stream/0_simple_stream ✅ stream/1_stream_with_failure_mode ✅ stream/2_multi_stream 2_advanced_features (17/17) ✅ ✅ built_in_task/0_reduce_task ✅ built_in_task/1_random_num_task ✅ callback/0_simple_callback ✅ callback/1_callback_hostfunc ✅ callback/2_callback_exception ✅ group/0_compute_group ✅ kernel/0_launch_kernel ✅ kernel/1_launch_kernel_with_reslimit ✅ label/0_simple_label ✅ model_ri/0_simple_model ✅ model_ri/1_model_update ✅ model_ri/2_model_switch ✅ notify/0_ipc_notify_withpid ✅ notify/1_ipc_notify_withoutpid ✅ notify/2_cntnotify ✅ tdt_buffer/0_shared_buffer ✅ tdt_channel/0_simple_channel ✅ tdt_channel/1_channel_capacity ✅ tdt_queue/0_simple_queue ✅ tdt_queue/1_queue_route ✅ tdt_queue/2_queue_grant_attach 3_memory_advanced (1/1) ✅ ✅ allocator/0_custom_allocator 4_reliability (2/2) ✅ ✅ overflow_detection/0_overflow_detection ✅ snapshot/0_snapshot_management 5_performance (6/6) ✅ ✅ adump/0_adump_args ✅ adump/1_adump_callback ✅ adump/2_model_dump_config ✅ profiling/0_create_config ✅ profiling/1_msproftx ✅ profiling/2_subscribe_model ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> docs/02_dev_guide/初始化.md example/*.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/runtime!1163 | 4 个月前 | |
优化example目录结构易用性及补充用例 Co-authored-by: qiang_zq<qiang.zhangqiang@huawei.com> # message auto-generated for no-merge-commit merge: !1163 merge sample into master 优化example目录结构易用性及补充用例 Created-by: qiang_zq Commit-by: qiang_zq Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 1、example 目录结构优化,按学习阶段重新组织目录结构(0_quickstart ~ 6_scenarios) 2、补充部分API的example用例 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/runtime/issues/284 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 部分用例执行过程 source /home/developer/Ascend/cann/set_env.sh && export SOC_VERSION=ascend910b3 && export ASCENDC_CMAKE_DIR=/home/developer/Ascend/cann/aarch64-linux/tikcpp/ascendc_kernel_cmake && export ASCEND_INSTALL_PATH=/home/developer/Ascend/cann && cd /mnt/workspace/gitCode/qiang_zq/runtime/example/3_memory_advanced/allocator/0_custom_allocator && rm -rf build && dos2unix run.sh 2>/dev/null || sed -i 's/\\r$//' run.sh && bash run.sh Configuring CMake... -- The C compiler identification is GNU 13.3.0 -- The CXX compiler identification is GNU 13.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /mnt/workspace/gitCode/qiang_zq/runtime/example/3_memory_advanced/allocator/0_custom_allocator/build Building... [ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o [100%] Linking CXX executable main [100%] Built target main Build completed successfully! Executable location: /mnt/workspace/gitCode/qiang_zq/runtime/example/3_memory_advanced/allocator/0_custom_allocator/build/main Run the sample: ./build/main ./build/main [INFO] CustomAlloc size=256 [INFO] CustomAllocAdvise size=128 [INFO] CustomAlloc size=128 [INFO] CustomFree invoked [INFO] CustomFree invoked [INFO] Allocator desc queried: descOut=0xaaaabd6a3780 allocCount=2 freeCount=2 用例执行报告 0_quickstart (3/3) ✅ ✅ 0_hello_cann ✅ 1_error_handling ✅ 2_system_info 1_basic_features (23/23) ✅ ✅ device/0_device_normal ✅ device/1_device_multi_thread ✅ device/2_device_P2P ✅ event/0_event_status ✅ event/1_event_timestamp ✅ memory/0_h2h_memory_copy ✅ memory/10_ipc_memory_withpid ✅ memory/11_ipc_memory_withoutpid ✅ memory/1_h2d_sync_memory_copy ✅ memory/2_h2d_async_memory_copy ✅ memory/3_d2h_sync_memory_copy ✅ memory/4_d2h_async_memory_copy ✅ memory/5_d2d_sync_memory_copy ✅ memory/6_d2d_async_memory_copy ✅ memory/7_physical_memory_sharing_withpid ✅ memory/8_physical_memory_sharing_withoutpid ✅ memory/9_multistream_sync_memory ✅ stream/0_simple_stream ✅ stream/1_stream_with_failure_mode ✅ stream/2_multi_stream 2_advanced_features (17/17) ✅ ✅ built_in_task/0_reduce_task ✅ built_in_task/1_random_num_task ✅ callback/0_simple_callback ✅ callback/1_callback_hostfunc ✅ callback/2_callback_exception ✅ group/0_compute_group ✅ kernel/0_launch_kernel ✅ kernel/1_launch_kernel_with_reslimit ✅ label/0_simple_label ✅ model_ri/0_simple_model ✅ model_ri/1_model_update ✅ model_ri/2_model_switch ✅ notify/0_ipc_notify_withpid ✅ notify/1_ipc_notify_withoutpid ✅ notify/2_cntnotify ✅ tdt_buffer/0_shared_buffer ✅ tdt_channel/0_simple_channel ✅ tdt_channel/1_channel_capacity ✅ tdt_queue/0_simple_queue ✅ tdt_queue/1_queue_route ✅ tdt_queue/2_queue_grant_attach 3_memory_advanced (1/1) ✅ ✅ allocator/0_custom_allocator 4_reliability (2/2) ✅ ✅ overflow_detection/0_overflow_detection ✅ snapshot/0_snapshot_management 5_performance (6/6) ✅ ✅ adump/0_adump_args ✅ adump/1_adump_callback ✅ adump/2_model_dump_config ✅ profiling/0_create_config ✅ profiling/1_msproftx ✅ profiling/2_subscribe_model ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> docs/02_dev_guide/初始化.md example/*.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/runtime!1163 | 4 个月前 |
model_ri
本目录聚焦模型运行实例的捕获、更新与切换能力。
样例列表
- 0_simple_model:演示任务捕获、模型运行实例创建和执行。
- 1_model_update:演示对已捕获模型运行实例的任务更新。
- 2_model_switch:演示模型运行实例中的 Stream 绑定、跳转与切换。
- 3_cond_model:演示 aclGraph 条件操作(IF/WHILE/SWITCH 及嵌套组合)的图捕获与执行。