| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
description: fix 0_lanch_kernel doc,add default run mode Co-authored-by: liukejin<liukejin@huawei.com> # message auto-generated for no-merge-commit merge: !770 merge fix_example_doc into master description: fix 0_lanch_kernel doc,add default run mode Created-by: liukejin Commit-by: liukejin Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> fix 0_lanch_kernel doc,add default run mode 修改方案: 1. 文档中 bash run.sh -r <mode>放到注释里,下面给出一个可以复制执行的命令bash run.sh -r simple 2. 增加 bash run.sh 执行的无参数场景,无参数时默认执行bash run.sh -r simple 3. 增加 -r 参数校验,参数不合法时报错 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> 关联Issue [#208](https://gitcode.com/cann/runtime/issues/208) ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 1. 默认参数: **bash run.sh** 5c9db40905070aa0ab4c1fe8ce1eff00 output/golden.bin 5c9db40905070aa0ab4c1fe8ce1eff00 output/output_z.bin error ratio: 0.0000, tolerance: 0.0010 [SUCCESS] result correct 2. 配置正确参数:**bash run.sh -r simple** 296f8a6f955836a953a20fe807e793eb output/golden.bin 296f8a6f955836a953a20fe807e793eb output/output_z.bin error ratio: 0.0000, tolerance: 0.0010 [SUCCESS] result correct **bash run.sh -r placeholder** b1846dcdecc4d8feef8d9b4555cfafc7 output/golden.bin b1846dcdecc4d8feef8d9b4555cfafc7 output/output_z.bin error ratio: 0.0000, tolerance: 0.0010 [SUCCESS] result correct 3. wrong params - **bash run.sh -r hello** result: 0_launch_kernel# bash run.sh -r heelo [ERROR]: Invalid run mode: hello , mode must be simple or placeholder. ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> example/kernel/0_launch_kernel/README.md ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/runtime!770 | 6 个月前 | |
修复 example/kernel/1_launch_kernel_with_reslimit 在 ubuntu 24.04 上运行失败的问题 Co-authored-by: daijinling<daijinling2@huawei.com> # message auto-generated for no-merge-commit merge: !810 merge bugfix/example_1_launch_kernel_with_reslimit into master 修复 example/kernel/1_launch_kernel_with_reslimit 在 ubuntu 24.04 上运行失败的问题 Created-by: daijinling Commit-by: daijinling Merged-by: cann-robot Description: ## 描述 修复 example/kernel/1_launch_kernel_with_reslimit 在 ubuntu 24.04 上运行失败的问题 ## 根因 缺少同步: 在代码中,PrintDo 函数被调用后(通常内部是一个异步的核函数启动 aclrtLaunchKernel),程序紧接着就执行了 aclrtDestroyStreamForce(stream)。 Ubuntu 20.04: 可能由于系统调度较慢或驱动行为差异,给 NPU 留出了足够的微秒时间完成打印。 Ubuntu 24.04: 系统内核和库版本(如 glibc)更新,主机侧代码执行速度或驱动响应可能更快,导致在第 8 个核心(AIV-7)完成打印前,Stream 已经被销毁或 Device 已经 Reset。 ## 关联的Issue 不涉及 ## 测试 在销毁资源之前,必须调用 aclrtSynchronizeStream 确保 NPU 上的任务(包括打印任务)全部执行完毕。 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/runtime!810 | 6 个月前 | |
Initial commit | 8 个月前 | |
Initial commit | 8 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 6 个月前 | ||
| 6 个月前 | ||
| 8 个月前 | ||
| 8 个月前 |