| fix issue 189 Co-authored-by: ning_x<chenning54@huawei.com> # message auto-generated for no-merge-commit merge: !489 merge fix_issue_189 into test fix issue 189 Created-by: ning_x Commit-by: ning_x Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 针对以下意见进行优化/修改 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.03_cann_arch_ascend_npu_principle.ipynb 1. CANN 软件栈架构图有点老,换成最新的。 2.“950 的 STARS2.0 任务流下沉”章节介绍内容可以简化一下。对入门阶段不需要了解太多硬件细节。 3. 使用统一术语,把910B/C换成 Altas A2/A3. 4.“分离架构的核心优势” 这个也描述不太合适。Altas A2/A3也是分离架构的。修改成相对上一代架构的优化。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.04_operator_basic_concepts.ipynb 6. 01.04章节中4.1 “kernel_name<<<blockDim, l1>>>(x, ...);”调用是错的,新的是“kernel_name<<<numBlocks, dynUBufSize, stream>>>”。同时block索引可以通过内置变量block_idx或单独函数asc_get_block_idx()均可获取。 7. 01.04章节4.2章节Tilign搬入的图不太准确。数据搬入搬出不一定都是Tpipe/Tque编程的核心概念CopyIn/CopyOut,同时搬入的数据也不一定是Tensor。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/README.md 8. 02.09 matmul算子怎么放到02.08章节(测试)之后? 13. 2.9章节matmul基于高阶api实现,建议移到04章节。-》**由于2.9章内容过于简单也不适合移至04章,因此先删除** - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.01_chapter_intro.ipynb 9. 02.01 章节可以将“Tensor C++编程”换成Tensor API。同时SIMT 也是C API层级。“各节API选用与芯片兼容”中 “API层级”描述不对 (“核函数直调”、Tque/Tpipe),应该是“C API”、“Tensor API”等。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.04_hello_world.ipynb 10. 02.04 章节, “hello_world<<<8, nullptr, stream>>>();”修改成“hello_world<<<8, 0, stream>>>();”。同时SIMD编程不使用blockDim概念,使用的numBlocks。另外,为啥要包含“#include "basic_api/kernel_operator_dump_tensor_intf.h"? 可直接使用 "utils/debug/asc_printf.h"。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.05_simd_continuous_vector_c_api.ipynb 11. Add 使用的c api实现,可直接使用 “#include "c_api/asc_simd.h”,无需包含kernel_operator.h(里面包含Tque/Tpipe等)。另外,标题写的是“c api”实现,为啥示例还是Tpipe/Tque实现? 同时 add_custom<<<NUM_BLOCKS, nullptr, stream>>>(xd, yd, zd); 换成 add_custom<<<NUM_BLOCKS, 0, stream>>>(xd, yd, zd)。 未解决问题: 5. 01.03章节中硬件架构介绍太偏硬件底层了,要从Ascend C编程模型角度,包括抽象硬件架构、Altas 950硬件架构来介绍。 https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.03_cann_arch_ascend_npu_principle.ipynb 12. 2.6章节SIMD 矩阵算子示例改用Tensor API + C API实现 (不是静态Tensor),同时同步全部从WaitFlag/SetFlag 换成asc_lock/asc_unlock。 同时矩阵Mamtul最好从第二个章节“快速入门”删除,移到04章节。 02.06章节5.2 中tensor api和c api不是互斥的,tensor api重点是tensor 计算和数据搬运,其他的如同步、寄存器操作等还需要依赖c api提供能力。 https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.06_simd_matrix_tensor_api.ipynb ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [x] 内容优化 - [ ] 其他,请描述: ## 其他信息 <!-- 在这里可以添加任何与这个 Pull Request 相关的其他说明。 --> See merge request: cann/cann-learning-hub!489 | 1 天前 |
| fix issue 189 Co-authored-by: ning_x<chenning54@huawei.com> # message auto-generated for no-merge-commit merge: !489 merge fix_issue_189 into test fix issue 189 Created-by: ning_x Commit-by: ning_x Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 针对以下意见进行优化/修改 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.03_cann_arch_ascend_npu_principle.ipynb 1. CANN 软件栈架构图有点老,换成最新的。 2.“950 的 STARS2.0 任务流下沉”章节介绍内容可以简化一下。对入门阶段不需要了解太多硬件细节。 3. 使用统一术语,把910B/C换成 Altas A2/A3. 4.“分离架构的核心优势” 这个也描述不太合适。Altas A2/A3也是分离架构的。修改成相对上一代架构的优化。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.04_operator_basic_concepts.ipynb 6. 01.04章节中4.1 “kernel_name<<<blockDim, l1>>>(x, ...);”调用是错的,新的是“kernel_name<<<numBlocks, dynUBufSize, stream>>>”。同时block索引可以通过内置变量block_idx或单独函数asc_get_block_idx()均可获取。 7. 01.04章节4.2章节Tilign搬入的图不太准确。数据搬入搬出不一定都是Tpipe/Tque编程的核心概念CopyIn/CopyOut,同时搬入的数据也不一定是Tensor。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/README.md 8. 02.09 matmul算子怎么放到02.08章节(测试)之后? 13. 2.9章节matmul基于高阶api实现,建议移到04章节。-》**由于2.9章内容过于简单也不适合移至04章,因此先删除** - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.01_chapter_intro.ipynb 9. 02.01 章节可以将“Tensor C++编程”换成Tensor API。同时SIMT 也是C API层级。“各节API选用与芯片兼容”中 “API层级”描述不对 (“核函数直调”、Tque/Tpipe),应该是“C API”、“Tensor API”等。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.04_hello_world.ipynb 10. 02.04 章节, “hello_world<<<8, nullptr, stream>>>();”修改成“hello_world<<<8, 0, stream>>>();”。同时SIMD编程不使用blockDim概念,使用的numBlocks。另外,为啥要包含“#include "basic_api/kernel_operator_dump_tensor_intf.h"? 可直接使用 "utils/debug/asc_printf.h"。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.05_simd_continuous_vector_c_api.ipynb 11. Add 使用的c api实现,可直接使用 “#include "c_api/asc_simd.h”,无需包含kernel_operator.h(里面包含Tque/Tpipe等)。另外,标题写的是“c api”实现,为啥示例还是Tpipe/Tque实现? 同时 add_custom<<<NUM_BLOCKS, nullptr, stream>>>(xd, yd, zd); 换成 add_custom<<<NUM_BLOCKS, 0, stream>>>(xd, yd, zd)。 未解决问题: 5. 01.03章节中硬件架构介绍太偏硬件底层了,要从Ascend C编程模型角度,包括抽象硬件架构、Altas 950硬件架构来介绍。 https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.03_cann_arch_ascend_npu_principle.ipynb 12. 2.6章节SIMD 矩阵算子示例改用Tensor API + C API实现 (不是静态Tensor),同时同步全部从WaitFlag/SetFlag 换成asc_lock/asc_unlock。 同时矩阵Mamtul最好从第二个章节“快速入门”删除,移到04章节。 02.06章节5.2 中tensor api和c api不是互斥的,tensor api重点是tensor 计算和数据搬运,其他的如同步、寄存器操作等还需要依赖c api提供能力。 https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.06_simd_matrix_tensor_api.ipynb ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [x] 内容优化 - [ ] 其他,请描述: ## 其他信息 <!-- 在这里可以添加任何与这个 Pull Request 相关的其他说明。 --> See merge request: cann/cann-learning-hub!489 | 1 天前 |
| c api入门课程检视意见修改 Co-authored-by: pangfd<pangfudong@huawei.com> # message auto-generated for no-merge-commit merge: !325 merge test into test c api入门课程检视意见修改 Created-by: pangfd Commit-by: pangfd Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> c api中级课程修改 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 内容优化 - [ ] 其他,请描述: ## 其他信息 <!-- 在这里可以添加任何与这个 Pull Request 相关的其他说明。 --> See merge request: cann/cann-learning-hub!325 | 14 天前 |
| docs: 优化静态Tensor CV融合高级课程代码生成 Co-authored-by: ApeiriaNode_Booker<renjie88@huawei.com> # message auto-generated for no-merge-commit merge: !485 merge test into test docs: 优化静态Tensor CV融合高级课程代码生成 Created-by: ApeiriaNode_Booker Commit-by: ApeiriaNode_Booker Merged-by: cann-robot Description: ## 主要变更 - 环境准备时创建 Source 学习工作目录,并从 src 复制课程提供的固定代码和脚本,保持 src 原有结构不变。 - 算子头文件先声明完整接口,各章节使用 %%writefile -a 按教学顺序追加实现。 - 移除基于 TODO 标记的 Python 文件查找替换逻辑,课程源码写入统一使用 %%writefile。 - 编译、性能采集和课后练习统一在 Source/07_02_static_tensor_cv_fusion_advanced 下执行。 ## 验证 - 在 3510NPU 的 rj 容器中按顺序执行全部 15 个代码单元,errors=0。 - 主算子和课后练习均重新编译成功,精度校验为 error ratio: 0.0000、test pass!。 - msprof 性能采集完成。 - Notebook JSON 检查与 git diff --check 通过。 See merge request: cann/cann-learning-hub!485 | 1 天前 |
| 修改AscendC V2 课程第四章节课程顺序 Co-authored-by: YANXI_ZHAO<zhaoyanxi3@hisilicon.com> # message auto-generated for no-merge-commit merge: !481 merge test into test 修改AscendC V2 课程第四章节课程顺序 Created-by: YANXI_ZHAO Commit-by: YANXI_ZHAO Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 章节顺序调整 04.01(Reg矢量编程算子,基于c api, softmax)-> 04.02 矩阵编程算子(Tensor API)- > 04.03 融合算子 ->04.04 离散场景SIMT算子。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 内容优化 - [ ] 其他,请描述: ## 其他信息 <!-- 在这里可以添加任何与这个 Pull Request 相关的其他说明。 --> See merge request: cann/cann-learning-hub!481 | 5 天前 |
| 添加aclnn算子工程化开发课程 Co-authored-by: zhanglong99<zhanglong170@huawei.com> # message auto-generated for no-merge-commit merge: !260 merge test into test 添加aclnn算子工程化开发课程 Created-by: zhanglong99 Commit-by: zhanglong99 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 内容优化 - [ ] 其他,请描述: ## 其他信息 <!-- 在这里可以添加任何与这个 Pull Request 相关的其他说明。 --> See merge request: cann/cann-learning-hub!260 | 7 天前 |
| docs: 优化静态Tensor CV融合高级课程代码生成 Co-authored-by: ApeiriaNode_Booker<renjie88@huawei.com> # message auto-generated for no-merge-commit merge: !485 merge test into test docs: 优化静态Tensor CV融合高级课程代码生成 Created-by: ApeiriaNode_Booker Commit-by: ApeiriaNode_Booker Merged-by: cann-robot Description: ## 主要变更 - 环境准备时创建 Source 学习工作目录,并从 src 复制课程提供的固定代码和脚本,保持 src 原有结构不变。 - 算子头文件先声明完整接口,各章节使用 %%writefile -a 按教学顺序追加实现。 - 移除基于 TODO 标记的 Python 文件查找替换逻辑,课程源码写入统一使用 %%writefile。 - 编译、性能采集和课后练习统一在 Source/07_02_static_tensor_cv_fusion_advanced 下执行。 ## 验证 - 在 3510NPU 的 rj 容器中按顺序执行全部 15 个代码单元,errors=0。 - 主算子和课后练习均重新编译成功,精度校验为 error ratio: 0.0000、test pass!。 - msprof 性能采集完成。 - Notebook JSON 检查与 git diff --check 通过。 See merge request: cann/cann-learning-hub!485 | 1 天前 |
| fix issue 189 Co-authored-by: ning_x<chenning54@huawei.com> # message auto-generated for no-merge-commit merge: !489 merge fix_issue_189 into test fix issue 189 Created-by: ning_x Commit-by: ning_x Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 针对以下意见进行优化/修改 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.03_cann_arch_ascend_npu_principle.ipynb 1. CANN 软件栈架构图有点老,换成最新的。 2.“950 的 STARS2.0 任务流下沉”章节介绍内容可以简化一下。对入门阶段不需要了解太多硬件细节。 3. 使用统一术语,把910B/C换成 Altas A2/A3. 4.“分离架构的核心优势” 这个也描述不太合适。Altas A2/A3也是分离架构的。修改成相对上一代架构的优化。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.04_operator_basic_concepts.ipynb 6. 01.04章节中4.1 “kernel_name<<<blockDim, l1>>>(x, ...);”调用是错的,新的是“kernel_name<<<numBlocks, dynUBufSize, stream>>>”。同时block索引可以通过内置变量block_idx或单独函数asc_get_block_idx()均可获取。 7. 01.04章节4.2章节Tilign搬入的图不太准确。数据搬入搬出不一定都是Tpipe/Tque编程的核心概念CopyIn/CopyOut,同时搬入的数据也不一定是Tensor。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/README.md 8. 02.09 matmul算子怎么放到02.08章节(测试)之后? 13. 2.9章节matmul基于高阶api实现,建议移到04章节。-》**由于2.9章内容过于简单也不适合移至04章,因此先删除** - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.01_chapter_intro.ipynb 9. 02.01 章节可以将“Tensor C++编程”换成Tensor API。同时SIMT 也是C API层级。“各节API选用与芯片兼容”中 “API层级”描述不对 (“核函数直调”、Tque/Tpipe),应该是“C API”、“Tensor API”等。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.04_hello_world.ipynb 10. 02.04 章节, “hello_world<<<8, nullptr, stream>>>();”修改成“hello_world<<<8, 0, stream>>>();”。同时SIMD编程不使用blockDim概念,使用的numBlocks。另外,为啥要包含“#include "basic_api/kernel_operator_dump_tensor_intf.h"? 可直接使用 "utils/debug/asc_printf.h"。 - https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.05_simd_continuous_vector_c_api.ipynb 11. Add 使用的c api实现,可直接使用 “#include "c_api/asc_simd.h”,无需包含kernel_operator.h(里面包含Tque/Tpipe等)。另外,标题写的是“c api”实现,为啥示例还是Tpipe/Tque实现? 同时 add_custom<<<NUM_BLOCKS, nullptr, stream>>>(xd, yd, zd); 换成 add_custom<<<NUM_BLOCKS, 0, stream>>>(xd, yd, zd)。 未解决问题: 5. 01.03章节中硬件架构介绍太偏硬件底层了,要从Ascend C编程模型角度,包括抽象硬件架构、Altas 950硬件架构来介绍。 https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/01_basic_overview/01.03_cann_arch_ascend_npu_principle.ipynb 12. 2.6章节SIMD 矩阵算子示例改用Tensor API + C API实现 (不是静态Tensor),同时同步全部从WaitFlag/SetFlag 换成asc_lock/asc_unlock。 同时矩阵Mamtul最好从第二个章节“快速入门”删除,移到04章节。 02.06章节5.2 中tensor api和c api不是互斥的,tensor api重点是tensor 计算和数据搬运,其他的如同步、寄存器操作等还需要依赖c api提供能力。 https://gitcode.com/cann/cann-learning-hub/blob/test/tutorials/ascendc_operator_development_V2/02_ascendc_operator_basics/02.06_simd_matrix_tensor_api.ipynb ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [x] 内容优化 - [ ] 其他,请描述: ## 其他信息 <!-- 在这里可以添加任何与这个 Pull Request 相关的其他说明。 --> See merge request: cann/cann-learning-hub!489 | 1 天前 |