| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(V2): 新增第1章 前置知识(01_basic_overview) Co-authored-by: mlewis<137259307@qq.com> # message auto-generated for no-merge-commit merge: !358 merge test-ch01 into test feat(V2): 新增第1章 前置知识(01_basic_overview) Created-by: mlewis Commit-by: mlewis Merged-by: cann-robot Description: 新增 ascendc_operator_development_V2 第1章「前置知识」(01_basic_overview),面向 Ascend 950(dav-3510): - 1.1 章节介绍:课程定位、950 关键特性总览、与前序 A2/A3 课程迁移路径 - 1.2 人工智能与算子基础:AI 发展历程、深度学习计算流程、专用 NPU 必要性 - 1.3 CANN 架构与昇腾 950 NPU 原理:DaVinci 核心、Vector/Cube、存储层级、SIMD vs SIMT - 1.4 算子开发的基本概念:算子定义/分类、Tensor/shape/format、核函数与 Tiling 初步 - 1.5 章节测试:选择题 + 判断题 - 含 README、答案文件、教程图片(已删除未引用图片) ## 关联的Issue 无 ## 测试 - notebook 格式验证通过 - 图片引用与文件一一对应,无冗余图片 ## 文档更新 - 新增 01_basic_overview/README.md ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 内容优化 - [ ] 其他,请描述: ## 其他信息 无 See merge request: cann/cann-learning-hub!358 | 22 天前 | |
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 | 5 天前 | |
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 | 5 天前 | |
feat(V2): 新增第1章 前置知识(01_basic_overview) Co-authored-by: mlewis<137259307@qq.com> # message auto-generated for no-merge-commit merge: !358 merge test-ch01 into test feat(V2): 新增第1章 前置知识(01_basic_overview) Created-by: mlewis Commit-by: mlewis Merged-by: cann-robot Description: 新增 ascendc_operator_development_V2 第1章「前置知识」(01_basic_overview),面向 Ascend 950(dav-3510): - 1.1 章节介绍:课程定位、950 关键特性总览、与前序 A2/A3 课程迁移路径 - 1.2 人工智能与算子基础:AI 发展历程、深度学习计算流程、专用 NPU 必要性 - 1.3 CANN 架构与昇腾 950 NPU 原理:DaVinci 核心、Vector/Cube、存储层级、SIMD vs SIMT - 1.4 算子开发的基本概念:算子定义/分类、Tensor/shape/format、核函数与 Tiling 初步 - 1.5 章节测试:选择题 + 判断题 - 含 README、答案文件、教程图片(已删除未引用图片) ## 关联的Issue 无 ## 测试 - notebook 格式验证通过 - 图片引用与文件一一对应,无冗余图片 ## 文档更新 - 新增 01_basic_overview/README.md ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 内容优化 - [ ] 其他,请描述: ## 其他信息 无 See merge request: cann/cann-learning-hub!358 | 22 天前 | |
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 | 5 天前 | |
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 | 5 天前 | |
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 | 5 天前 | |
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 | 5 天前 |
第1章 前置知识
章节概述
本章为面向 Ascend 950 的算子开发入门奠基章节,主要讲解人工智能与算子基础、CANN 架构与昇腾 NPU 原理(重点介绍 950 AI Core 架构与 SIMD/SIMT 硬件执行模型)、算子开发的基本概念,帮助开发者构建从模型到硬件的基础认知,为后续算子开发实践做好准备。
章节大纲
1.1 章节介绍
- 课程定位:面向 Ascend 950PR/950DT(dav-3510),SIMD 部分跨代兼容 Atlas A2/A3
- 950 关键特性总览:SIMD 编程、SIMT 编程、SIMD/SIMT 混合编程、纯 C API、Reg 编程、Tensor API
- 与前序 A2/A3 课程(v1)的关系与迁移路径
- 学习路径图与环境前置要求
1.2 人工智能与算子基础
- AI 发展历程(图灵测试 → 深度学习 → 大模型)
- 深度学习与神经网络计算流程
- 为什么需要专用 NPU(异构计算加速)
- 算子在模型中的角色
1.3 CANN 架构与昇腾 NPU 原理
- CANN 软件栈分层架构
- 950 AI Core 架构:DaVinci 核心、Vector/Cube 计算单元、Register-Based SIMD(RegFile 寄存器堆)
- 存储层级:L1 / AUB / LUB / UB / GM
- Host-Device 异构计算模型
- SIMD vs SIMT 硬件执行模型差异
- 950 与 Atlas A2/A3 架构对比
1.4 算子开发的基本概念
- 算子定义、算子名称、算子类型
- Tensor、shape、format、Axis
- 算子按计算模式分类:连续类矢量算子 / 矩阵算子 / 离散类矢量算子
- 核函数与 Tiling 初步概念
- 算子开发全流程概览
1.5 章节测试
- 选择题 + 判断题,覆盖架构、算子分类、SIMD/SIMT 概念