| master分支alcnn文档英文合入 Co-authored-by: y60124828<yanglou1@h-partners.com> # message auto-generated for no-merge-commit merge: !13019 merge master into master master分支alcnn文档英文合入 Created-by: yanglu-1 Commit-by: y60124828 Merged-by: cann-robot Description: ## 描述 master分支alcnn文档英文合入 ## 关联的Issue 关联Issue [#6089](https://gitcode.com/cann/ops-nn/issues/6089) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13019 | 23 days ago |
| format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 4 months ago |
| fix(quant_max): roundMode判空返回码改为ACLNN_ERR_PARAM_NULLPTR Co-authored-by: yuanbin_22<yuanbin22@huawei.com> # message auto-generated for no-merge-commit merge: !10231 merge fix/issue-5374-quant-max-roundmode-nullptr into master fix(quant_max): roundMode判空返回码改为ACLNN_ERR_PARAM_NULLPTR Created-by: yuanbin_22 Commit-by: yuanbin_22 Merged-by: cann-robot Description: ## 描述 修复 aclnnQuantMaxGetWorkspaceSize 中 roundMode 参数判空返回码不符合 CANN 接口规范的问题: - **代码修复**:roundMode 为空指针时返回码从 ACLNN_ERR_PARAM_INVALID(161002)改为 ACLNN_ERR_PARAM_NULLPTR(161001),符合空指针统一返回 ACLNN_ERR_PARAM_NULLPTR 的规范。 - **文档同步**:aclnnQuantMax.md 错误码说明中 ACLNN_ERR_PARAM_NULLPTR 的空指针范围补充 roundMode。 - **UT 同步**:l2_quant_max_roundmode_nullptr 用例断言更新为 ACLNN_ERR_PARAM_NULLPTR。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/5374 ## 测试 UT 用例 l2_quant_max_roundmode_nullptr 已同步更新断言,验证返回码为 ACLNN_ERR_PARAM_NULLPTR。 ## 文档更新 - 修改 quant/quant_max/docs/aclnnQuantMax.md:空指针错误说明补充 roundMode ## 类型标签 - [x] Bug修复 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!10231 | 2 months ago |
| 新增quantmax算子 Co-authored-by: Hana77<wangtianqi27@huawei.com> # message auto-generated for no-merge-commit merge: !4249 merge master into master 新增quantmax算子 Created-by: Hana77 Commit-by: Hana77 Merged-by: cann-robot Description: ## 描述 新增QuantMax算子,该算子的功能为计算输入x量化后的值,并计算x绝对值的最大值amax ## 关联的Issue 关联Issue #2368 ## 测试 测试了aclnn、pytorch单算子、图模式、geir通路,均通过 ## 文档更新 新增了文档如下: 1.aclnnQuantMax.md 2.README.md 修改了文档如下: 1.op_api_list.md:新增aclnnQuantMax接口说明 2.op_list.md:新增quant_max说明 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!4249 | 6 months ago |
| ascend_dequant等9个算子适配960dt Co-authored-by: TH<taohai2@huawei.com> # message auto-generated for no-merge-commit merge: !12955 merge backBlue1 into master ascend_dequant等9个算子适配960dt Created-by: TH_HW Commit-by: TH Merged-by: cann-robot Description: ## 描述 为 **TopKTopPSampleV2、UniqueDim、AscendAntiQuant、AscendAntiQuantV2、AscendDequant、DynamicBlockMxQuant、GroupedDynamicBlockQuant、MxToBlockMxQuant、QuantMax** 共 9 个算子补齐 **Ascend 960DT(NpuArch / __NPU_ARCH__ 9201)** 平台支持。 Ascend 960DT 与 Ascend 950 共享 arch35 AICore 架构,可直接复用 950 的 kernel 代码、tiling 逻辑与二进制配置,因此本次适配不涉及计算逻辑改动,核心是在编译配置与算子注册中登记 960DT、复用 950 的 config 对象,并在 kernel 中把 950 已有的架构相关指令(3510)以 3510 || 9201 并列宏放开给 960DT。 主要改动如下: 1. **算子注册与编译配置** - SUPPORT_COMPUTE_UNIT / COMPUTE_UNITS 追加 "ascend960dt",SUPPORT_TILING_DIR 追加对应的 "arch35":ascend_anti_quant(含 op_kernel/CMakeLists.txt)、ascend_anti_quant_v2、ascend_dequant、dynamic_block_mx_quant、grouped_dynamic_block_quant、mx_to_block_mx_quant(含 op_kernel/CMakeLists.txt)、quant_max。 - 9 个算子的 *_def.cpp 均新增 AddConfig("ascend960dt", <950 的 config 对象>),与 ascend950 **复用同一个 config 对象**,继承相同的 dtype、format 与扩展配置: - top_k_top_p_sample_v2:复用 910b/910_93/950 共用的 aicConfig; - unique_dim、ascend_anti_quant、ascend_anti_quant_v2、dynamic_block_mx_quant、grouped_dynamic_block_quant、mx_to_block_mx_quant:复用各算子 950 的 aicConfig; - ascend_dequant、quant_max:分别复用 config_950、aicoreConfig950。 - 新增 960DT 二进制配置:top_k_top_p_sample_v2、unique_dim(含 unique_dim_simplified_key.ini)、ascend_anti_quant、ascend_anti_quant_v2、dynamic_block_mx_quant、grouped_dynamic_block_quant、mx_to_block_mx_quant 各新增 op_host/config/ascend960dt/*_binary.json,内容与 ascend950 下配置一致;ascend_dequant、quant_max 直接复用 950 配置,不需要新增 json。 - scripts/kernel/binary_config/ascendc_config.json:TopKTopPSampleV2、UniqueDim、AscendAntiQuantV2、GroupedDynamicBlockQuant、DynamicBlockMxQuant、QuantMax 六个条目的 compute_units 追加 ascend960dt;编译选项沿用 950 口径(TopKTopPSampleV2 补 --cce-simd-vf-fusion=true,UniqueDim/AscendAntiQuantV2 补 --cce-no-dcache-flush,其余无额外选项)。 2. **kernel 架构宏放开(3510 → 3510 || 9201)** - index/top_k_top_p_sample_v2/op_kernel/top_k_top_p_sample_v2.h:c_api/asc_simd.h 的 include 与 asc_dcci_entire_out() 调用对 9201 放开。 - quant/dynamic_block_mx_quant/op_kernel/arch35/dynamic_block_mx_quant_base.h、op_kernel/dynamic_block_mx_quant.cpp:FLOAT_OVERFLOW_MODE_CTRL 读取/置 0/恢复对 9201 放开。 - quant/grouped_dynamic_block_quant/op_kernel/arch35/grouped_dynamic_block_quant_large_block.h、..._small_block.h、op_kernel/grouped_dynamic_block_quant.cpp:同上。 - quant/mx_to_block_mx_quant/op_kernel/arch35/mx_to_block_mx_quant.h:SetCtrlSpr<FLOAT_OVERFLOW_MODE_CTRL> 对 9201 放开。 3. **op_api 平台判断** - quant/ascend_anti_quant_v2/op_host/op_api/aclnn_ascend_anti_quant.cpp:CheckShape 中 scale/offset 必须为 1 维的校验,由仅豁免 NpuArch::DAV_3510 扩展为同时豁免 NpuArch::DAV_9201,与 950 行为对齐。 - 其余 8 个算子的 op_api 不存在 SocVersion::ASCEND950 / NpuArch::DAV_3510 判断,IsRegbase()(common/inc/op_api/aclnn_util.h)的 NpuArch 集合已包含 DAV_9201,960DT 自动覆盖。 4. **测试与工程修正(同一提交内顺带收敛)** - index/top_k_top_p_sample_v2/tests/ut/op_host:tiling UT 的错误管理接口由 ErrorManager 迁移至 error_message::ErrMgrInit / GetErrMgrErrorMessage,并在 UT CMakeLists 中显式链接 opbase_util_objs,避免 EZ 错误码静态注册被优化掉导致负向用例失效。 - quant/ascend_dequant/tests:新增 tests/tests/ut/tests/ut/op_host CMake 链与 test_ascend_dequant_infershape.cpp(3 条 op_graph 原型用例:输入输出与默认属性、属性更新、输入输出 desc 更新)。 - quant/ascend_dequant、quant/quant_max、top_k_top_p_sample_v2 UT 的许可头统一为标准格式,并补齐文件末尾换行。 ## 关联的Issue 无。 ## 测试 - 通过 ascend960dt 编译与静态检查。 - 核对 960DT 与 950 运行时路径一致性:9 个算子均 AddConfig("ascend960dt", <950 config>) 复用同一 config 对象;kernel 侧仅在 __NPU_ARCH__ == 9201 时沿用 950 已启用的 dcci / 浮点溢出模式控制指令;IsRegbase() 已覆盖 DAV_9201。 - ascend_dequant 新增 op_graph 原型 UT、top_k_top_p_sample_v2 tiling UT 迁移后通过。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 新特性 - [ ] Bug修复 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!12955 | 22 days ago |
| 算子中存在使用内部的asc api接口,需要切换为对外的api接口 Co-authored-by: cann-robot<cann-robot@cann-robot> # message auto-generated for no-merge-commit merge: !9063 merge master into master 算子中存在使用内部的asc api接口,需要切换为对外的api接口 Created-by: hw-zhangpanpan Commit-by: cann-robot Merged-by: cann-robot Description: ## 描述 算子中存在使用内部的asc api接口,需要切换为对外的api接口 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/5301 ## 测试 切换接口前后二进制文件一致 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!9063 | 2 months ago |
| fix(quant_max): roundMode判空返回码改为ACLNN_ERR_PARAM_NULLPTR Co-authored-by: yuanbin_22<yuanbin22@huawei.com> # message auto-generated for no-merge-commit merge: !10231 merge fix/issue-5374-quant-max-roundmode-nullptr into master fix(quant_max): roundMode判空返回码改为ACLNN_ERR_PARAM_NULLPTR Created-by: yuanbin_22 Commit-by: yuanbin_22 Merged-by: cann-robot Description: ## 描述 修复 aclnnQuantMaxGetWorkspaceSize 中 roundMode 参数判空返回码不符合 CANN 接口规范的问题: - **代码修复**:roundMode 为空指针时返回码从 ACLNN_ERR_PARAM_INVALID(161002)改为 ACLNN_ERR_PARAM_NULLPTR(161001),符合空指针统一返回 ACLNN_ERR_PARAM_NULLPTR 的规范。 - **文档同步**:aclnnQuantMax.md 错误码说明中 ACLNN_ERR_PARAM_NULLPTR 的空指针范围补充 roundMode。 - **UT 同步**:l2_quant_max_roundmode_nullptr 用例断言更新为 ACLNN_ERR_PARAM_NULLPTR。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/5374 ## 测试 UT 用例 l2_quant_max_roundmode_nullptr 已同步更新断言,验证返回码为 ACLNN_ERR_PARAM_NULLPTR。 ## 文档更新 - 修改 quant/quant_max/docs/aclnnQuantMax.md:空指针错误说明补充 roundMode ## 类型标签 - [x] Bug修复 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!10231 | 2 months ago |
| ascend_dequant等9个算子适配960dt Co-authored-by: TH<taohai2@huawei.com> # message auto-generated for no-merge-commit merge: !12955 merge backBlue1 into master ascend_dequant等9个算子适配960dt Created-by: TH_HW Commit-by: TH Merged-by: cann-robot Description: ## 描述 为 **TopKTopPSampleV2、UniqueDim、AscendAntiQuant、AscendAntiQuantV2、AscendDequant、DynamicBlockMxQuant、GroupedDynamicBlockQuant、MxToBlockMxQuant、QuantMax** 共 9 个算子补齐 **Ascend 960DT(NpuArch / __NPU_ARCH__ 9201)** 平台支持。 Ascend 960DT 与 Ascend 950 共享 arch35 AICore 架构,可直接复用 950 的 kernel 代码、tiling 逻辑与二进制配置,因此本次适配不涉及计算逻辑改动,核心是在编译配置与算子注册中登记 960DT、复用 950 的 config 对象,并在 kernel 中把 950 已有的架构相关指令(3510)以 3510 || 9201 并列宏放开给 960DT。 主要改动如下: 1. **算子注册与编译配置** - SUPPORT_COMPUTE_UNIT / COMPUTE_UNITS 追加 "ascend960dt",SUPPORT_TILING_DIR 追加对应的 "arch35":ascend_anti_quant(含 op_kernel/CMakeLists.txt)、ascend_anti_quant_v2、ascend_dequant、dynamic_block_mx_quant、grouped_dynamic_block_quant、mx_to_block_mx_quant(含 op_kernel/CMakeLists.txt)、quant_max。 - 9 个算子的 *_def.cpp 均新增 AddConfig("ascend960dt", <950 的 config 对象>),与 ascend950 **复用同一个 config 对象**,继承相同的 dtype、format 与扩展配置: - top_k_top_p_sample_v2:复用 910b/910_93/950 共用的 aicConfig; - unique_dim、ascend_anti_quant、ascend_anti_quant_v2、dynamic_block_mx_quant、grouped_dynamic_block_quant、mx_to_block_mx_quant:复用各算子 950 的 aicConfig; - ascend_dequant、quant_max:分别复用 config_950、aicoreConfig950。 - 新增 960DT 二进制配置:top_k_top_p_sample_v2、unique_dim(含 unique_dim_simplified_key.ini)、ascend_anti_quant、ascend_anti_quant_v2、dynamic_block_mx_quant、grouped_dynamic_block_quant、mx_to_block_mx_quant 各新增 op_host/config/ascend960dt/*_binary.json,内容与 ascend950 下配置一致;ascend_dequant、quant_max 直接复用 950 配置,不需要新增 json。 - scripts/kernel/binary_config/ascendc_config.json:TopKTopPSampleV2、UniqueDim、AscendAntiQuantV2、GroupedDynamicBlockQuant、DynamicBlockMxQuant、QuantMax 六个条目的 compute_units 追加 ascend960dt;编译选项沿用 950 口径(TopKTopPSampleV2 补 --cce-simd-vf-fusion=true,UniqueDim/AscendAntiQuantV2 补 --cce-no-dcache-flush,其余无额外选项)。 2. **kernel 架构宏放开(3510 → 3510 || 9201)** - index/top_k_top_p_sample_v2/op_kernel/top_k_top_p_sample_v2.h:c_api/asc_simd.h 的 include 与 asc_dcci_entire_out() 调用对 9201 放开。 - quant/dynamic_block_mx_quant/op_kernel/arch35/dynamic_block_mx_quant_base.h、op_kernel/dynamic_block_mx_quant.cpp:FLOAT_OVERFLOW_MODE_CTRL 读取/置 0/恢复对 9201 放开。 - quant/grouped_dynamic_block_quant/op_kernel/arch35/grouped_dynamic_block_quant_large_block.h、..._small_block.h、op_kernel/grouped_dynamic_block_quant.cpp:同上。 - quant/mx_to_block_mx_quant/op_kernel/arch35/mx_to_block_mx_quant.h:SetCtrlSpr<FLOAT_OVERFLOW_MODE_CTRL> 对 9201 放开。 3. **op_api 平台判断** - quant/ascend_anti_quant_v2/op_host/op_api/aclnn_ascend_anti_quant.cpp:CheckShape 中 scale/offset 必须为 1 维的校验,由仅豁免 NpuArch::DAV_3510 扩展为同时豁免 NpuArch::DAV_9201,与 950 行为对齐。 - 其余 8 个算子的 op_api 不存在 SocVersion::ASCEND950 / NpuArch::DAV_3510 判断,IsRegbase()(common/inc/op_api/aclnn_util.h)的 NpuArch 集合已包含 DAV_9201,960DT 自动覆盖。 4. **测试与工程修正(同一提交内顺带收敛)** - index/top_k_top_p_sample_v2/tests/ut/op_host:tiling UT 的错误管理接口由 ErrorManager 迁移至 error_message::ErrMgrInit / GetErrMgrErrorMessage,并在 UT CMakeLists 中显式链接 opbase_util_objs,避免 EZ 错误码静态注册被优化掉导致负向用例失效。 - quant/ascend_dequant/tests:新增 tests/tests/ut/tests/ut/op_host CMake 链与 test_ascend_dequant_infershape.cpp(3 条 op_graph 原型用例:输入输出与默认属性、属性更新、输入输出 desc 更新)。 - quant/ascend_dequant、quant/quant_max、top_k_top_p_sample_v2 UT 的许可头统一为标准格式,并补齐文件末尾换行。 ## 关联的Issue 无。 ## 测试 - 通过 ascend960dt 编译与静态检查。 - 核对 960DT 与 950 运行时路径一致性:9 个算子均 AddConfig("ascend960dt", <950 config>) 复用同一 config 对象;kernel 侧仅在 __NPU_ARCH__ == 9201 时沿用 950 已启用的 dcci / 浮点溢出模式控制指令;IsRegbase() 已覆盖 DAV_9201。 - ascend_dequant 新增 op_graph 原型 UT、top_k_top_p_sample_v2 tiling UT 迁移后通过。 ## 文档更新 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] 新特性 - [ ] Bug修复 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!12955 | 22 days ago |
| 修改产品名 Co-authored-by: fwx1169505<fengying27@h-partners.com> # message auto-generated for no-merge-commit merge: !11017 merge master into master 修改产品名 Created-by: fengying555682 Commit-by: fwx1169505 Merged-by: cann-robot Description: ## 描述 修改quant和activation文件夹中的md文档涉及的产品名称 ## 关联的Issue [#6056](https://gitcode.com/cann/ops-nn/issues/6056) ## 测试 已经完成文档语法和链接一致性检测 ## 文档更新 quant和activation文件夹中的md文档 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11017 | 1 month ago |
| docs: add English translations for operator READMEs and repo docs Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !13351 merge docs/add-english-docs into master docs: add English translations for operator READMEs and repo docs Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## Description Add English translations for 652 markdown documents: - Repo-level guides: README_en.md, CONTRIBUTING_en.md, SECURITY_en.md, CHANGELOG_en.md, codearts_check_rule_config_en.md - Operator READMEs under activation/, conv/, control/, foreach/, hash/, index/, loss/, matmul/, norm/, optim/, pooling/, quant/, rnn/, vfusion/, etc. - API and design docs under docs/ (aclnn_*, ascendir_*, fusion pass docs) - examples/ and torch_extension/ guides Note: a few cross-reference links whose English targets are not published yet temporarily point to their Chinese counterparts to keep links valid; they will be switched back to the English docs in a follow-up PR after this one is merged. ## Related Issue N/A ## Test - Verified all 1,344 intra-repo markdown links in the added files resolve against master: 0 broken links, 0 missing targets. ## Documentation Update - This PR only adds English documentation files (*_en.md); no existing Chinese documents are modified. ## Type Labels - [ ] Bug fix - [ ] New feature - [ ] Performance optimization - [x] Documentation update - [ ] Other, please describe: ## AI/Agent-Generated Declaration - [x] AI-assisted authoring See merge request: cann/ops-nn!13351 | 17 days ago |