| Files | Last commit | Last update |
|---|---|---|
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 | 18 days ago | |
fix(ada_layer_norm_grad): 前置拒绝非 ND 格式并修复 aclnn golden dtype 语义 Co-authored-by: qq_37917228<yanmingkui@huawei.com> # message auto-generated for no-merge-commit merge: !13835 merge fix/ada_layer_norm_grad_harden into master fix(ada_layer_norm_grad): 前置拒绝非 ND 格式并修复 aclnn golden dtype 语义 Created-by: qq_37917228 Commit-by: qq_37917228 Merged-by: cann-robot Description: ## 描述 ### 背景 aclnnAdaLayerNormBackward 内部按最后一维连续归约,仅支持 ND 格式;现有实现未在 op_api 层拒绝 NZ 等私有格式,会把逻辑视图当连续数据计算,结果错误且不报错。GE 侧 tiling 已有同类校验,前端缺失。 ### 改动 1) op_api 前置格式校验(aclnn_ada_layer_norm_backward.cpp) - 新增 CheckFormat,遍历 13 个入/出参(跳过空指针的可选张量),非 FORMAT_ND 时上报 OP_LOGE_FOR_INVALID_FORMAT_WITH_REASON 并返回 ACLNN_ERR_PARAM_INVALID;置于 CheckParams 首位执行。 2) TTK aclnn golden 修复(tests/assets/golden.py) - 签名按 C header 全位置参数对齐:补 normalizedShape 与 5 个输出张量,避免 TTK 按 header 顺序喂参时 TypeError。 - aclnn 通路不传 output_dtypes,改为取 tensor_dtypes 末尾 5 项。 - 入参先提升计算精度(Promote 时 fp64,否则 fp32)再计算,出口 cast 回各输出声明 dtype,对齐算子内部 fp32 累加语义,避免 b16 中间舍入导致 pd_gamma/pd_beta 判据必然 FAIL。 - 输出张量为 None 时 golden 返回 None,避免 NO_OUTPUT 误判。 ## 关联的Issue - https://gitcode.com/cann/ops-nn/issues/8320 ## 测试 - [x] 已通过 TTK aclnn 通路验证(fp32/fp16/bf16 及 Promote 模式) ## 文档更新 无(接口契约与文档一致,仅补齐缺失的前置校验) ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13835 | 13 days 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 | 18 days 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 | 18 days ago | |
refactor(add_layer_norm): reuse NUM_TWO in reduce-empty kernel Co-authored-by: rk<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !13973 merge aln_magic_num into master refactor(add_layer_norm): reuse NUM_TWO in reduce-empty kernel Created-by: wangpengbo26 Commit-by: rk Merged-by: cann-robot Description: ## 描述 将 add_layer_norm_regbase_reduce_empty.h 中 InitBuffer 的裸数字 2 替换为公共头文件定义的 NUM_TWO,消除魔法数字,行为不变。 ### 改动原因 outQueue_ 需同时容纳 mean(0 填充)与 rstd(NaN 填充)两段 rowsPerLoop_ 长度的 float,原代码直接写 2 * rowsPerLoop_ * sizeof(float),其中 2 为魔法数字,不符合编码规范要求。 ### 改动方法 1. add_layer_norm_regbase_reduce_empty.h 增加 #include "add_layer_norm_regbase_common.h",NUM_TWO 定义于该头文件(constexpr int64_t NUM_TWO = 2;)。 2. pipe_.InitBuffer(outQueue_, 1, 2 * rowsPerLoop_ * sizeof(float)) 改为 NUM_TWO * rowsPerLoop_ * sizeof(float)。 涉及文件(1 个,+2 -1): - norm/add_layer_norm/op_kernel/arch35/add_layer_norm_regbase_reduce_empty.h(+2 -1) ## 关联的Issue 不涉及 ## 测试 纯常量替换,缓冲区大小(NUM_TWO == 2)与运行逻辑均不变,无需额外测试;由现有 AddLayerNorm ST/UT 覆盖回归。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:编码规范整改(魔法数字具名化) ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13973 | 12 days 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 | 18 days ago | |
[Docs] 为 7 个文档中的图片补充 alt 文本 Co-authored-by: aodebiao<18003961989@163.com> # message auto-generated for no-merge-commit merge: !12484 merge docs/fix-empty-img-alt into master [Docs] 为 7 个文档中的图片补充 alt 文本 Created-by: gxhgxh2475698 Commit-by: aodebiao Merged-by: cann-robot Description: ## 描述 仓库内 7 个文档共 97 处图片使用空 alt( ),在图片加载失败、读屏或纯文本导出场景下无法传达图片内容。本次以图片文件名作为 alt 补齐,图片路径与正文不变。 ## 改动内容 - matmul/batch_mat_mul_v3/docs/EinsumPass.md(57 处) - norm/layer_norm/docs/LayerNormONNXFusionPass.md(12 处) - norm/add_layer_norm/docs/AddLayerNormFusionPass.md(8 处) - norm/layer_norm/docs/LayerNormONNXMULFusionPass.md(8 处) - activation/softmax_grad_ext/docs/SoftmaxGradExtV2FusionPass.md(4 处) - norm/add_layer_norm_quant/docs/QuantizeAddLayerNormPass.md(4 处) - norm/layer_norm/docs/LayerNormFusionPass.md(4 处) 改动示例: →  共 7 个文件、97 行变更(每处仅新增 alt 文本)。 ## 关联的Issue 修复 #7124([Documentation|文档反馈]: 7 个文档中共 97 处图片缺少 alt 文本) ## 测试 纯文档改动,不涉及代码,未运行编译与 UT。 验证方式: - 对本次 7 个文件扫描,修复前 grep -c '!\[\](' 命中 97 处,修复后为 0 处; - 图片目标路径未改动,引用的图片文件均存在,改动前后断链数一致; - git diff --stat:7 个文件、97 行变更,均为 alt 文本新增。 ## 文档更新 上述 7 个文档。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!12484 | 15 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days 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 | 18 days 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 | 18 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days ago | |
fix: report graph fusion results with compatible APIs Co-authored-by: rk<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !13440 merge pass_result into master fix: report graph fusion results with compatible APIs Created-by: wangpengbo26 Commit-by: rk Merged-by: cann-robot Description: ## 描述 新增融合结果上报的公共兼容工具,并将四条 norm 融合规则接入 GE 融合结果上报 API:运行时支持时自动上报匹配与融合结果,不支持时静默回退。 ### 改动原因 GE 9.1.0+ 提供 SubgraphRewriter::Replace(带 CustomPassContext 的重载)与 GraphFuseInspectorUtils::ReportFuse/ReportMatch(9.2.0+)等融合结果上报接口。此前融合规则调用不带 context 的旧 Replace,无上报能力;且新接口需编译期版本宏与运行时弱符号双重探测,各规则分散接入易出错。 ### 改动方法 1. **新增公共工具 norm/common/op_graph/fusion_report_utils.h**(+110): - 本地声明 GE 上报接口(与 GE 对齐,弱符号):带 context 的 Replace 重载(GE 9.1.0+)、CanFuse/ReportFuse(9.1.0+)、ReportMatch(9.2.0+); - 提供三个兼容封装: - ReplaceSubgraphWithReport:优先调用带 context 的 Replace(替换并自动上报),运行时重载不可用时回退普通 Replace; - ReportMatchNodes:上报匹配节点集,运行时不可用时返回 SUCCESS; - ReportFuseNodes:上报融合前后节点,运行时不可用时返回 SUCCESS。 2. **四条融合规则接入**: - add_layer_norm_fusion_pass / add_rms_norm_dynamic_quant_fusion_pass / inplace_add_rms_norm_fusion_pass:替换调用改为 ops::fusion::ReplaceSubgraphWithReport(Run 的 CustomPassContext 透传); - inplace_add_layer_norm_fusion_pass(单节点替换流程):候选匹配后调用 ReportMatchNodes 上报,ReplaceOneNode 完成输出/控制边重接后、删除旧节点前调用 ReportFuseNodes 上报。 涉及文件(5 个,+131 -13): - norm/common/op_graph/fusion_report_utils.h(新增,+110) - norm/add_layer_norm/op_graph/fusion_pass/add_layer_norm_fusion_pass.cpp(+4 -4) - norm/add_rms_norm_dynamic_quant/op_graph/fusion_pass/add_rms_norm_dynamic_quant_fusion_pass.cpp(+4 -3) - norm/inplace_add_layer_norm/op_graph/fusion_pass/inplace_add_layer_norm_fusion_pass.cpp(+9 -2) - norm/inplace_add_rms_norm/op_graph/fusion_pass/inplace_add_rms_norm_fusion_pass.cpp(+4 -4) ## 关联的Issue - #8107 ## 测试 - 验证高版本(≥9.1.0/9.2.0)运行时融合结果正常上报、融合行为不变。 - 验证低版本运行时弱符号不可用,规则静默回退(不报错、融合正常)。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:融合结果上报接入 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13440 | 17 days 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 | 18 days ago | |
fix: resolve coding standard findings in norm operators Co-authored-by: rk<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !12931 merge cpp_rule_2610 into master fix: resolve coding standard findings in norm operators Created-by: wangpengbo26 Commit-by: rk Merged-by: cann-robot Description: ## 描述 对 norm 系算子( add_rms_norm_hi_f4_quant、rms_norm_hi_f4_quant、batch_norm_grad_v3、rms_norm_dynamic_mx_quant)的编码规范问题进行整改,无功能逻辑变更。 ### 改动原因 编码规范检查发现以下问题: 1. kernel/tiling 代码中存在魔法数字(裸 2、16、8、32 及硬编码 sysRegLen_ = 256 等); 2. lambda 使用 [&] 隐式捕获,不符合显式捕获要求; 3. GetCompileInfo() 返回值转换使用 reinterpret_cast,应使用更安全的 static_cast。 ### 改动方法 1. **魔法数字具名化**: - add_rms_norm_hi_f4_quant / rms_norm_hi_f4_quant(arch92,两算子对称整改):新增具名常量 HIF4_MAX_PER4_ELEMENTS_PER_GROUP(16)、HIF4_MAX_PER8_ELEMENTS_PER_GROUP(8)、HIF4_TMP_SCALE_ELEMENTS_PER_GROUP(32)、HIF4_DEINTERLEAVE_REGISTERS_PER_LOAD(2) 替代 InitBuffer 中的裸数字;sysRegLen_ = 256 硬编码改为 VECTOR_LENGTH(由 platform::GetVRegSize() 派生);scaleRank - 2 改为 scaleRank - NUM_TWO。 - batch_norm_grad_v3:k / 2、copies *= 2、rows /= 2 等裸 2 改用 TWO 常量;rowsPerGroup_ 增长因子、终止行数改用具名常量(PACKED_GROUP_GROWTH_FACTOR、FINAL_REDUCTION_ROWS)。 2. **lambda 显式捕获**:batch_norm_grad_v3_tiling_infer.cpp 的 ubUsed 与 rms_norm_dynamic_mx_quant_full_load_tiling.cpp 的 getUbSize 由 [&] 隐式捕获改为显式捕获列表。 3. **类型转换规范**:两处 GetCompileInfo() 的 reinterpret_cast 改为 static_cast。 4. 日志长参数换行等格式调整,删除多余空行。 涉及文件(14 个,+60 -45): - norm/add_rms_norm_hi_f4_quant/op_host/op_tiling/arch92/add_rms_norm_hi_f4_quant_tiling_base.cpp(+5 -5) - norm/add_rms_norm_hi_f4_quant/op_kernel/arch92/add_rms_norm_hi_f4_quant_common.h(+7 -1) - norm/add_rms_norm_hi_f4_quant/op_kernel/arch92/add_rms_norm_hi_f4_quant_hif4_r_full_load.h(+6 -6) - norm/add_rms_norm_hi_f4_quant/op_kernel/arch92/add_rms_norm_hi_f4_quant_hif4_split_d.h(+6 -6) - norm/rms_norm_hi_f4_quant/ 对称 4 个文件(同模式整改) - norm/batch_norm_grad_v3/op_host/batch_norm_grad_v3_tiling_infer.cpp(+1 -1) - norm/batch_norm_grad_v3/op_host/batch_norm_grad_v3_tiling_ra_split_r.cpp(+3 -2) - norm/batch_norm_grad_v3/op_kernel/arch35/ 3 个 kernel 文件 - norm/rms_norm_dynamic_mx_quant/op_host/arch35/rms_norm_dynamic_mx_quant_full_load_tiling.cpp(+2 -1) ## 关联的Issue -https://gitcode.com/cann/ops-nn/issues/7767 ## 测试 编码规范整改,不涉及功能逻辑变更,无需测试。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:编码规范整改 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12931 | 22 days 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 | 18 days ago | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !13817 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 - Changed the product name. - Adjust the error code table and correct the value of rowspand. ## 关联的Issue none ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13817 | 13 days ago | |
feat(5162a): norm/quant 系算子注册适配 ascend5162 并整改 _apt 命名 Co-authored-by: wuxuening<wuxuening2@huawei.com> # message auto-generated for no-merge-commit merge: !13514 merge br_5162a_norm_quant into master feat(5162a): norm/quant 系算子注册适配 ascend5162 并整改 _apt 命名 Created-by: wuxuening Commit-by: wuxuening Merged-by: cann-robot Description: ## 描述 **1. batch_norm/layer_norm/ascend_quant/instance_norm/rms_norm 五算子注册适配 ascend5162**: - 5 个 def.cpp 追加 AddConfig("ascend5162", ...),复用 950 全量配置 - 5 个 CMakeLists 的 SUPPORT_COMPUTE_UNIT 追加 ascend5162,SUPPORT_TILING_DIR 追加 arch35 - cmake/func.cmake get_target_dir 追加 ascend5162 → arch35(UT 可收集 arch35 测试文件) - kernel 侧适配(instance_norm VL 派生搬出步长 32B 粒度、rms_norm VRegSize 动态化等) **2. ascend_quant 算子 _apt 后缀整改**(参照 chenqi317 检视意见): - ascend_quant_apt.cpp → ascend_quant.cpp(kernel 入口标准命名,参照 bnll/celu 等 523 个已完成整改的算子模式) - test_ascend_quant_apt.cpp → test_ascend_quant.cpp(UT 同步改名) - def.cpp opFile.value: "ascend_quant_apt" → "ascend_quant" - 修复 UT 版权头缺少 except(存量问题,OAT 通过) ## 测试 - pre-commit 全量 hook 通过(含 clang-format/codespell/OAT) ## 文档更新 无 See merge request: cann/ops-nn!13514 | 17 days ago | |
fix(batch_norm3_d): 恢复 RAR 模板并修复设备崩溃及 ±inf 输入均值异常 Co-authored-by: qq_37917228<yanmingkui@huawei.com> # message auto-generated for no-merge-commit merge: !13753 merge fix/batch_norm3d_rar_inf_protect into master fix(batch_norm3_d): 恢复 RAR 模板并修复设备崩溃及 ±inf 输入均值异常 Created-by: qq_37917228 Commit-by: qq_37917228 Merged-by: cann-robot Description: ## 描述 BatchNorm3D 的 RAR 模板此前因设备侧异常被整类禁用( IsCapable() 直接 return false),全部流量由 Welford 模板承接。本次修复两个独立缺陷并重新启用该模板: 1. **设备崩溃**:Process() 标量主流程中存在两行错位的 LocalMemBar<VEC_STORE, VEC_LOAD>,它们位于 __VEC_SCOPE__ 之外,导致编译器在向量区与标量流之间的切分错位,两条向量指令落入标量指令流,设备报 errcode 259(The scalar instruction is abnormal)。删除这两行后,4 个 .o 共 48 个 kernel 的坏指令从 8 条降为 0 条。 2. **非有限输入**:WelfordParallelUpdate() 缺少 ±inf 保护,全 inf 输入下 inf - inf = NaN 污染本核均值,使 batch_mean / reserve_space_1 输出 NaN(golden 为 +inf)。移植 batch_norm_ext2 同款 inf 保护后结果与 golden 一致。 恢复后的 IsCapable() 在 r1_ 小于核数(R0 多核切分,tail A 统计量有误)或 a_ * 2 >= 核数时仍返回 false,交由 Welford 模板处理。 ## 关联的Issue - 关联 Issue #8234 (https://gitcode.com/cann/ops-nn/issues/8234) ## 测试 环境:CANN 9.3.0 / Ascend950DT,原始 golden。 - [x] 二进制检查:重编后 4 个 .o × 12 kernel = 48 个 kernel,坏指令 0 条 - [x] 设备回归:L0_004 / L0_015 / L0_017 / L0_024 / L0_026 / L0_027 / L0_034 / L0_036 / L0_bound_032 全部 PASS(L0_017 原为设备崩溃) - [x] L0_007(全 inf 输入):修复后 5 个输出全部与 golden 一致,两次运行结果一致 ## 文档更新 无 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13753 | 16 days 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 | 18 days ago | |
docs: update English translations for markdown files Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !13600 merge docs/update-english-translations into master docs: update English translations for markdown files Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## 描述 英文译稿合入后的增量同步与链接更新,共39个文件(37改2删): 1. 增量翻译(8篇):hard_shrink、squared_relu、foreach_lerp_list、foreach_maximum_scalar_list、quant_matmul_reduce_sum、deep_norm、apply_centered_rms_prop、torch_extension,同步最新中文源文档的变更内容。 2. 删除2篇译稿:rotate_quant/tests/st/arch35、grouped(上游已删除对应中文源文件)。 3. 链接改写(31篇):指向本仓已有英文版文档的链接统一改写为 _en 版本(含CONTRIBUTING/SECURITY/README、24处贡献流程链接、fast_kernel_launch_example等),并将残留的中文链接文字(贡献流程/贡献指南/安全声明等)译为英文。 ## 关联的Issue 无 ## 测试 文档类变更,无需算子测试。已通过:全量1135篇译稿链接有效性校验(全部指向master已有文件);残留中文/全角标点扫描(仅存数学公式内源文件原文、无英文版目标文档的中文锚点等允许例外)。 ## 文档更新 更新37个英文译稿文件、删除2个(对应源文件已上游删除),不修改任何中文源文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13600 | 18 days 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 | 18 days ago | |
feat: 4个算子新增ascend350平台支持(norm系第四波) Co-authored-by: zhuzixian-lr<zhuzixian1@h-partners.com> # message auto-generated for no-merge-commit merge: !12408 merge ascend350_adapt_w4 into master feat: 4个算子新增ascend350平台支持(norm系第四波) Created-by: zhuzixian-lr Commit-by: zhuzixian-lr Merged-by: cann-robot Description: ## 描述 4个norm系算子新增 ascend350 平台支持(350适配第四波): - **batch_norm_grad**:def 增加 AddConfig("ascend350");config/ascend350 新增 binary.json(cp自950,语义一致);binary_config 登记 ascend350(对齐 BatchNormGradV3 增补 --cce-no-dcache-flush 编译选项) - **sync_bn_training_update**:顶层 CMake SUPPORT_COMPUTE_UNIT/TILING_DIR 补 ascend350/arch35;def 增加 AddConfig("ascend350");config/ascend350 新增 binary.json - **rms_norm_quant_v2**:def 增加 AddConfig("ascend350");config/ascend350 新增 binary.json;binary_config 登记 ascend350 - **rms_norm_quant_v3**:顶层 CMake SUPPORT_COMPUTE_UNIT/TILING_DIR 补 ascend350/arch35;op_kernel COMPUTE_UNITS 补 ascend350;def 增加 AddConfig("ascend350");config/ascend350 新增 binary.json 适配遵循仓内惯例:350 与 950 同属 dav_3510(arch35),def 复用 950 同一 config 对象;json 为 950 平行目录拷贝(逐字节一致或仅末尾换行差异);binary_config 仅对已有条目算子增补 ascend350。 ## 关联的Issue #7464 https://gitcode.com/cann/ops-nn/issues/7464 ## 测试 - 四件套完整性已自查(def/CMake/json/kernel 注册) - pre-commit 全量文件通过(codespell/OAT/EOF) - TTK kernel/aclnn 用例与 golden 已构造,上板验证通过 ## 文档更新 无需更新文档 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12408 | 22 days 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 | 18 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days ago | |
docs(norm): 补充aclnnBatchNorm推理场景下saveMean/saveInvstd参数语义 Co-authored-by: HelloWorld-LX<luxin67@h-partners.com> # message auto-generated for no-merge-commit merge: !13617 merge docs/batchnorm-save-outputs-inference-semantics into master docs(norm): 补充aclnnBatchNorm推理场景下saveMean/saveInvstd参数语义 Created-by: HelloWord-LuXin Commit-by: HelloWorld-LX Merged-by: cann-robot Description: ## 问题背景 error_stress 异常压测(清单内算子)发现 aclnnBatchNorm 有 8 个「意外成功」待澄清场景,全部集中在 training=false(推理场景)下对 saveMean/saveInvstd 传入非法参数时接口仍返回 ret=0: | 场景 | 参数 | 注入异常 | |---|---|---| | #39/#40、#45/#46 | saveMean、saveInvstd | dtype=INT8/INT32 | | #42/#48 | saveMean、saveInvstd | 2D shape(维度超限) | | #44/#50 | saveMean、saveInvstd | nullptr | 现行资料中该两参数仅写「只在训练场景输出」,未说明推理场景下这些参数的约束口径,导致无法判定实现放行是缺陷还是预期行为。 ## 实现行为(现状核对) norm/batch_norm_v3/op_host/op_api/aclnn_batch_norm.cpp 中对 saveMean/saveInvstd 的全部校验均门控在 training 分支: - CheckNotNull:if (training) { OP_CHECK_NULL(saveMean/saveInvstd, ...) } - CheckDtypeValid:if (training) { OP_CHECK_DTYPE_NOT_SUPPORT(saveMean/saveInvstd, ...) } - CheckParams:if (training) { OP_CHECK_SHAPE_NOT_EQUAL_WITH_EXPECTED_SIZE(...) } 计算路径上,推理走 l0op::BNInfer,仅使用 input/weight/bias/runningMean/runningVar,不读写该两参数;950 平台 BatchNormProcRegbase 中有明确注释:推理 kernel 不计算 batch 统计量、不向可选输出写入无效内容。 即实现将该两参数定位为「训练态统计量输出,推理场景被忽略」——传任意值均放行且不写入,为有意设计而非漏校验。 ## 参考语义 - CUDA(PyTorch batch_norm_cuda_out,aten/src/ATen/native/cuda/Normalization.cu):eval 模式同样不计算 batch 统计量;区别在于 ATen 的 save_mean/save_invstd 由框架内部分配并返回,不存在用户传入非法 buffer 的语义。 - 仓内家族先例: - aclnnBatchNormBackward 对同名参数已按场景写约束:「shape长度与入参input中channel轴的长度相等,**或在推理场景下长度为0**」; - aclnnAddRmsNormQuantV2 对可选输出 rmsNormOut 写明「可选输出,支持传入空指针」。 ## 修改内容 按实现现状与家族先例,在中文资料参数表中为 saveMean/saveInvstd 补充场景化语义: - 训练场景:必选输出,shape 长度与 input channel 轴长度相等(dtype/shape 约束生效); - 推理场景:该参数被忽略,可传入空指针,数据类型和 shape 不作校验,输出内容为未定义值,不应参与数值比对。 仅资料修改,不涉及实现变更。修改后上述 8 个压测场景可判定为符合资料的预期放行(用例期望偏差),fuzz 用例生成配置可据此同步更新。 See merge request: cann/ops-nn!13617 | 17 days 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 | 18 days ago | |
fix(bn3_d_training_update): 图模式 InferDataType 增加统计量 dtype 校验并移除冗余 ST 用例 Co-authored-by: LuckySun<sunwenlong8@huawei.com> # message auto-generated for no-merge-commit merge: !13776 merge fix_November_BN into master fix(bn3_d_training_update): 图模式 InferDataType 增加统计量 dtype 校验并移除冗余 ST 用例 Created-by: LuckySun Commit-by: LuckySun Merged-by: cann-robot Description: ## 描述 BN3DTrainingUpdate 图模式数据类型推导此前未校验 6 路统计量输入(sum、square_sum、scale、offset、mean、variance)的 dtype。由于 GE 的 precision_reduce 会把非法 dtype(如 bf16)自动 Cast 成 fp32,下游 tiling 看到的是 Cast 后的 dtype,导致执行图模式时tiling中 dtype 契约校验失效,放行违法输入。 本次改动: - 在 norm/bn3_d_training_update/op_graph/bn3_d_training_update_graph_infer.cpp 的 InferDataTypeForBN3DTrainingUpdate 中,对输入索引 1~6(sum ~ variance)逐个校验必须为 DT_FLOAT;不满足时通过 OP_LOGE_FOR_INVALID_DTYPE 打印节点名、输入名、实际 dtype 与期望 dtype,并返回 ge::GRAPH_FAILED。图声明 dtype 尚未被 precision_reduce 抹平,此处是唯一能拒绝非法输入的权威校验点。 - 删除 4 个冗余 ST 用例 CSV(共 1408 行):ttk_geir_bn3_d_training_update_st.csv、ttk_kernel_bn3_d_training_update_dfx_st.csv、ttk_kernel_bn3_d_training_update_generalization_st.csv、ttk_kernel_bn3_d_training_update_perf_st.csv,保留 ttk_kernel_bn3_d_training_update_precision_st.csv。 ## 关联的Issue - #8288 ## 测试 - 保留 arch35 ttk_kernel_bn3_d_training_update_precision_st.csv 精度 ST 用例(50 条)。 - 删除的 4 个 CSV 为 geir / dfx / generalization / perf 冗余用例,本次未新增用例。 - 校验行为:统计量输入为 float32 时保持原有推导逻辑(y 跟随 x 的 dtype,4 路统计量输出跟随 sum 的 dtype);统计量输入非 float32(如 bf16/fp16)时 InferDataType 返回 GRAPH_FAILED 并输出 OP_LOGE_FOR_INVALID_DTYPE。 ## 文档更新 无 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!13776 | 16 days ago | |
fix(bn3d_training_reduce): preserve FP16 full-R slot merge precision Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !13622 merge fix/bn3d-fullr-precision-20261104_103151 into master fix(bn3d_training_reduce): preserve FP16 full-R slot merge precision Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 描述 修复 FP16 普通 full-R 多槽归约在槽间合并时丢失新舍入低位的问题。 BN3DTrainingReduce_L1_149 的 sum 因此相差 1 ULP,三方 RMSE ratio 为 2.0,超过 L1 门槛 1.5。该路径改用已有 TwoSum 补偿合并,并补充原场景 ST;Host tiling、UB 分配、golden 和精度阈值不变。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8106 ## 测试 - 相同原始输入及 CPU/GPU 参考:旧代码 kernel 3/3、GEIR 1/1 失败,修复后 4/4 通过。 - 24 条边界、16 条仓内 ST 和固定输入两方验证通过;全量结果如下。 原报告 588 条全部纳入本次计划,取得新的 TTK 结果 586/588。 - 正向两方 mixed:实际执行 562 条,562 条通过。 - 正向三方 cross_check L1:实际执行 562 条,562 条通过;两组为同一批正向用例,不累加为独立用例数。 - 修复版本本次回归精度失败:0。按用户明确要求不测的超大内存用例:2,为 BN3DTrainingReduce_L1_upboundary_highpre_078, BN3DTrainingReduce_L1_upboundary_highpre_094;不计为通过。其他正向用例均已完成两方与三方验证。 - 24 条反向用例:11 条非法输入被拒绝,13 条合法 GEIR 输入被接受或重新推导输出,原报错预期需修订。原备注中的精确 ACL 错误码未由 GEIR 拒绝结果证明;这 24 条单独核对,不记为精度通过。 - 原失败场景 NPU 10.968 μs,A100 GPU torch.compile 复合实现 14.0672 μs;GPU/NPU×0.9728=1.247682,满足 ≥0.1。 - TTK 5bc080fe42c25b2a11654e514de10ac08771cb02,全程 --pc=1;构建 jobs=2。完整证据位于任务 validation/round3_full_20261104_103821。本地 CI 已通过,受测版本与明细见下方补充。 <!-- BN3D_FULLR_LOCAL_CI_20261104_BEGIN --> 本地CI补充:受测提交7e5d8c6a889c3098d70a687092377e61df68d718,主仓master快照1566185bf41ab3fc1c2cdda13aeff45fcbcb95f3。 - PR原先已有1个提交,无需重复squash;已保留备份,核对整理前后完整diff和tree一致,rebase后相对主线仍为1个提交。 - 通过指定/workspace/CI-skills/ci_local_check.sh入口,pre-commit、隔离OAT、链接、示例SKIP契约和Check_Example检查均通过。 - 仅对bn3d_training_reduce执行定向检查,构建参数--soc=ascend950、--soc=ascend910b的package和kernelUT目标构建均通过;-j2。该算子没有独立kernelUT用例,本次不宣称执行了kernelUT数值用例。 - 算子实现、构建文件、测例及已核对的共享依赖与此前TTK精度受测提交6e2e4ab33230b06f9b5306cf398aa7f63ca98055一致;主线仅在算子目录新增README_en.md,已单独核对,不属于本PR改动。本轮未重复执行数值回归,也未修改README/API文档或示例。 - PR远端HEAD已核对与本地CI受测SHA一致。[compile触发评论](https://gitcode.com/cann/ops-nn/merge_requests/13622#note_198244962)及[线上流水线](https://gitcode.com/CANN/ops-nn/actions/runs/da5d2ac77ae749ac8d86f330fe7ae017)已确认;最终线上通过状态尚未核实。 <!-- BN3D_FULLR_LOCAL_CI_20261104_END --> ## 文档更新 无接口文档或示例变更。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13622 | 17 days 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 | 18 days ago | |
feat(optim): add InplaceApplyAdagrad and harden ApplyCamePart3 Co-authored-by: tianyu52<tianyu52@huawei.com> # message auto-generated for no-merge-commit merge: !13878 merge master into master feat(optim): add InplaceApplyAdagrad and harden ApplyCamePart3 Created-by: tianyu52 Commit-by: tianyu52 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ApplyAdagrad:当前库上已存在带D算子,从兼容性考虑,ApplyAdagrad在950上应该映射为InplaceApplyAdagrad,修正原型为InplaceApplyAdagrad。 ApplyCamePart3:闭环两个检视意见 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> UT/ST 泛化 PASS ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13878 | 12 days ago | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !13817 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 - Changed the product name. - Adjust the error code table and correct the value of rowspand. ## 关联的Issue none ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13817 | 13 days ago | |
fix(norm): batch BNInference channel-first tiles and preserve folded precision Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !13781 merge fix/bn-inference-folding-precision-20261105 into master fix(norm): batch BNInference channel-first tiles and preserve folded precision Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 描述 BNInference 的 FP32 输入与 FP16 统计量组合在折叠系数相消时会放大 sqrt 和 offset/scale 的舍入误差,原始 700 三方精度失败。本次对安全范围内的开方及折叠除法采用已有的 0 ULP 配置,保留完整数值范围的回退路径。 原始性能 022 的 NCDHW shape 为 (4, 424138, 2, 2, 2),通道优先 generic 路径产生大量仅 8 元素的搬运。本次在空间维不超过 256 的 generic 路径中合并相邻通道和多个 batch,按 UB 预算选择分组,复用系数和索引。参数计算次序和精度标准保持不变;通道尾块、batch 尾块和大空间维回退均有覆盖。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8250 ## 测试 - 最终受测提交 1c6e1b0697acc8f6d8f96790c64fd2e9cae8fd9f,基于主仓 master 46ff6fdb827968cede75ef3570a7fc7edbd27c4a,PR 为单提交;squash 前后完整 diff 与 tree 一致,rebase 后另行核对。 - TTK 1ae0fedcc0f727ccfdddca1195060b87301edf6d,CANN 9.3.0 C25B114,Ascend950PR_9579,GPU A100;TTK 全部 --pc=1。 - 本地 CI:pre-commit、OAT、Check_Example、950/A2 定向构建和相关 UT 通过;不等同于线上 CI 结论。 - 同一提交的[线上 CI](https://gitcode.com/CANN/ops-nn/actions/runs/bebb75d3b14c407c996d101644c8664f)已获平台 ci-pipeline-passed 标记。 - 本地 CI 原始 950 安装包部署核对通过,55 个预编译 binary;44 条紧凑 ST 和原始 700 两方/真实 GPU 三方全部 PASS、BINARY_MATCH。外部精度 Issue #39 的原始 145、187、292 已在本轮最终代码全量回归中两方/真实 GPU 三方全部通过,原始形状和精度要求不变。 - 逻辑一致的候选修复已复测外部性能问题中的全部 26 个场景,精度、确定性及当前机器的带宽折算指标全部通过;提交前仅经 clang-format 排版,代码 token 一致性已核对。最终 CI 包重新验证 022、017 和本轮余量最小的场景,均完整采集 5 轮、剔除首轮取 4 轮中位数。 - BNInference_L1_accuracy_perf_d_b_022:NPU 63.290 μs,GPU 362.000 μs,(362.000/63.290)×(1.55/1.6)=5.540962 ≥ 0.1。 - BNInference_L1_accuracy_perf_d_b_017:NPU 66.058 μs,GPU 129.000 μs,(129.000/66.058)×(1.55/1.6)=1.891803 ≥ 0.1。 - BNInference_L1_tolerance_d_b_169:NPU 1934.532 μs,GPU 475.000 μs,(475.000/1934.532)×(1.55/1.6)=0.237864 ≥ 0.1。 - 性能数据来自当前 cannlab 机器,NPU/GPU 带宽使用 1.6/1.55 TB/s;没有宣称在外部 L20 机器上复跑。 - 截至 2026-11-06T11:06:36,最终代码的原始 996 条回归 epoch full_v8_20261106_cf_grouped:两方 PASS 951/958,真实 GPU 三方 PASS 951/958,负向已有结果 38/38;当前状态 EXECUTION_FINISHED_USER_SCOPE。资源受限和负向预期问题单独保留,未计为精度通过,未复用旧版本的 PASS。尚未声明全部 996 条通过。负向逐条审计:35 条在 GE 的类型、格式、维数或必需输入检查中被拒绝;2 条在 TTK 输入大小检查时被拒绝,未进入算子;1 条原“维度上溢”负向用例实际不违反形状约束,其接受结果不计为精度 PASS。原测例的 ACL 错误码预期不能直接用 GE 拒绝代替。最新负向证据已补充到[原跟踪 Issue #8097](https://gitcode.com/cann/ops-nn/issues/8097),该 Issue 原本已关闭,本次保留其关闭状态;测例预期问题仍在本报告中明确保留。已实际执行的 951 条正向两方、三方均已完成且通过,精度失败 0 条。另外 6 条超大原始正向用例未执行:内存准入估计超过当前 32 GiB 主机容器上限,不是精度失败,也没有按通过统计;估计值不是实测最小内存需求。用户最新明确要求不再执行最后一条 BNInference_L1_tolerance_d_b_744;调度器已在该例尚未启动时退出,记为 NOT_RUN_USER_REQUEST。合计 7 条正向未执行,不计为 PASS;按调整后的用户要求完成收尾。TTK 统计核对:同一候选代码 017 的旧/新 TTK 为 664.642/666.732 μs(约 +0.31%);原始主线 0761 在最新 TTK 复跑为 2030.492 μs,旧 TTK 为 2131.466/2028.748 μs,8 份输入、CPU、NPU、GPU 文件哈希均一致,全部完整 5 轮、剔首轮统计 4 轮,无缺轮警告。旧版本基线的性能问题仍存在;本次算子优化后的提升不是缺轮统计造成的假象。 ## 文档更新 无公共接口或文档修改。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [x] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13781 | 16 days 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 | 18 days ago | |
fix(bn_training_reduce_grad): 主循环改为先差后乘,消除大 diff_scale 下的灾难性抵消 Co-authored-by: tianqiguang<tianqiguang@huawei.com> # message auto-generated for no-merge-commit merge: !13555 merge master into master fix(bn_training_reduce_grad): 主循环改为先差后乘,消除大 diff_scale 下的灾难性抵消 Created-by: tianqiguang Commit-by: tianqiguang Merged-by: cann-robot Description: ## 描述 本 PR 修复 bn_training_reduce_grad 在大 diff_scale 场景下的数值精度问题:主循环由「先乘后加」改为「先差后乘」的等价形式,消除灾难性抵消。共 6 个文件(+92 / -63),涉及 kernel、tiling、golden、example 与 README。 ### 一、问题:大 diff_scale 且 x == batch_mean 时发生灾难性抵消 原实现的公式为: text multiplier[c] = (diff_scale[c] * negNumRecip) / sqrtVar[c] addend[c] = (batch_mean[c] / sqrtVar[c]) * (diff_scale[c] * numRecip) + diff_offset[c] * negNumRecip y[n,c,r] = ((grads[n,c,r] + multiplier[c] * x[n,c,r]) + addend[c]) * mulScale[c] 当 |diff_scale| 接近 FLT_MAX 且 x == batch_mean 时: - multiplier * x 与 addend 的首项 (batch_mean / sqrtVar) * (diff_scale / num) 都是 **~1e37 量级**的数; - 两者在数学上应当精确相消(代码注释指出 (batch_mean/sqrtVar)*(diff_scale/num) == -batch_mean*multiplier); - 但 fp32 无法保真表示该量级的中间结果,舍入噪声会把应有的相消结果淹没,最终输出退化为噪声。 ### 二、方法:按代数恒等式重排为「先差后乘」 由 multiplier = (diff_scale * (-1/num)) / sqrtVar 直接可得: text (batch_mean / sqrtVar) * (diff_scale / num) == -batch_mean * multiplier 据此把 addend 的首项折进主循环: text addend[c] = diff_offset[c] * negNumRecip y[n,c,r] = ((grads[n,c,r] + multiplier[c] * (x[n,c,r] - batch_mean[c])) + addend[c]) * mulScale[c] 两种写法数学等价。新序先计算 x - batch_mean(fp32 下相近数相减由 Sterbenz 引理保证精确),再乘 multiplier,不再产生两个大数相减的中间结果。 ### 三、改动明细 **op_kernel/arch35/bn_training_reduce_grad.h** - 新增 meanBuf_(TBuf,MERGE_CHANNELS = 256 项 fp32),用于 staging 每 chunk 的 batch_mean。 - PrecomputeCoeffs:删除旧 addend 首项的 5 步计算(Div → Muls → Mul → Muls → Add),简化为 Muls(addReg, diffOffsetReg, negNumRecip);同时把 batch_mean 原样写入 meanBuf_。 - ProcessPlane / ComputeTile 增加 meanAddr 参数;主循环在 Mul 之前插入 Sub(xReg, xReg, meanReg),满块与尾块各一处。 - 主循环每 VL 的 VF 指令由 Mul→Add→Add→Mul 变为 Sub→Mul→Add→Add→Mul。 **op_kernel/arch35/bn_training_reduce_grad_merged.h** - R==1 合并路径:每 VL 加载 batch_mean 切片后执行 Sub。 - R==2 合并路径:每 tile 加载一次 meanReg,对 xEven / xOdd 各执行一次 Sub。 **op_host/arch35/bn_training_reduce_grad_tiling_arch35.cpp** - COEFF_PRECOMPUTE_BYTES 由 3 路改为 4 路 MERGE_CHANNELS * FLOAT_BYTES,为新增的 mean TBuf 预留 UB 空间。 **tests/assets/golden.py** - CPU 真值路径 _compute 与三方 compose 路径 _BNTrainingReduceGradCompose 同步改为先 x_centered = x - batch_mean 再乘 multiplier; - 运算序与 kernel 对齐为 sub(x, batch_mean) → mul → add(grads) → add(addend) → mul(mul_scale); - 两条路径的 addend 均简化为 diff_offset * negNumRecip。 **README.md / examples/arch35/test_geir_bn_training_reduce_grad.cpp** - README 的 addend 与 y 公式同步更新,并补充代数恒等式与灾难性抵消的说明。 - example 中两个 case 的期望值推导说明由「multiplier*x 与 addend 首项相消」改为「x == batch_mean 时 multiplier*(x-batch_mean) == 0」。 > **已知遗留**:op_kernel/arch35/bn_training_reduce_grad_tiling_data.h 的文件头注释仍为旧公式(addend 含 batch_mean 项、y 使用 multiplier * x),本 PR 未同步修改。 ## 关联的Issue - #8050 ## 测试 - golden.py 的 CPU 真值路径与三方 compose 路径均已同步为与 kernel 一致的运算序,可作为本次改动的比对基准。 - example 的两个 case 以 x == batch_mean 构造,改动后仍有确定期望值 y = (grads + diff_offset*(-1/num)) * scale / sqrt(batch_variance + epsilon)。 - 合并路径(R==1 / R==2)与逐 plane 路径使用同一组预计算系数与同一运算序,代码注释声明三者位级一致。 > 注:本 PR 未附 ST 执行报告。 ## 文档更新 - norm/bn_training_reduce_grad/README.md:addend 与 y 的计算公式更新,并补充「先差后乘」等价形式的说明。 - norm/bn_training_reduce_grad/examples/arch35/test_geir_bn_training_reduce_grad.cpp:示例注释中的公式与期望值推导说明同步更新。 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13555 | 17 days ago | |
fix(bn_training_update): 修复GEIR统计量及FP16相消精度问题 Co-authored-by: dong-yanrong<dongyanrong@h-partners.com> # message auto-generated for no-merge-commit merge: !13722 merge dev_cw_bn into master fix(bn_training_update): 修复GEIR统计量及FP16相消精度问题 Created-by: dong-yanrong Commit-by: dong-yanrong Merged-by: cann-robot Description: ## 描述 fix(bn_training_update): 修复GEIR统计量及FP16相消精度问题,长尾算子质量加固 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13722 | 12 days 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 | 18 days 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 | 18 days 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 | 18 days ago | |
修复 Centralization 算子在 axes 契约、UB buffer 切分与路径回退上的问题,并附带 LargeTrailing 的溢出保护。 Co-authored-by: 岩80<1611150171@qq.com> Co-authored-by: tianyu52<tianyu52@huawei.com> # message auto-generated for no-merge-commit merge: !13577 merge master into master 修复 Centralization 算子在 axes 契约、UB buffer 切分与路径回退上的问题,并附带 LargeTrailing 的溢出保护。 Created-by: 2403_87792773 Commit-by: tianyu52;岩80 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修复 Centralization 算子在 axes 契约、UB buffer 切分与路径回退上的问题,并附带 LargeTrailing 的溢出保护(非精度修复)。 **改动原因** 1. tiling 原先按固定常量/独立公式分配 UB buffer,没有按“每条路径的峰值存活 buffer 数 + UB 总量”计算;小 UB 下可能生成非法配置,DataCopyExtParams 计数超限还会被当作 shape 非法直接拒绝。 2. axes 语义与 canndev DSL/TBE 工具链不一致: - 重复轴被直接拒绝;canndev 实际是归约去重,但其均值系数会因重复轴多乘,不能直接照搬; - 显式空 [] 被当作“最后一轴”,而 canndev DSL 下 reduce_sum(axis=[]) 为 identity(输出 0); - 未设置与显式空未区分; - rank 0/8 在 infershape、tiling、TBE 之间处理不一致(TBE RANK_LIMIT=8)。 3. LargeTrailing 在补偿归约前未做 2 的幂缩放,大有限值求和存在溢出风险; **采取的方法** - axes: - 重复轴改为 sort + unique 去重,reduceCount 按唯一轴重算; - 未设置 → 默认 {-1}(最后一轴);显式空 → no-reduce(Fast 路径输出 x-x=0); - infershape/tiling 统一 rank 1–8;rank0 用 gert::Shape::IsScalar() 拒绝;unknown rank 继续透传,tiling 拒绝未解析负维。 - UB: - 按路径峰值存活节点数均分 UB-8192;per-buffer 32B 对齐;LargeTrailing 固定 128B 只计一次; - Fast rowsPerLoop、lcsi reduceTile 按预算反算; - DataCopyExtParams 计数改为 clamp(≤65535),不再判 shape 非法; - 小 UB 回退:Fast→7030/7020、LargeTrailing→7020、small→scalar、contiguous/irregular/lcsi 最小 tile 放不下时回退;不足 8192/32B 时明确失败。 - LargeTrailing:补偿归约前做 2 的幂缩放,避免大有限值求和溢出。 - 文档/测试同步:README、proto、golden.py、Host UT。 **兼容性/风险** - rank 9–25 不支持(TBE RANK_LIMIT=8,E80012)。 - axes 行为变更:重复轴去重;显式 [] 从“最后一轴”改为“不归约(输出 0)”。 - DataCopy 超限从“拒绝 shape”改为 clamp。 - 仅支持 ND;不提供 aclnn/PyTorch/ONNX 接口。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> 关联Issue #8076 https://gitcode.com/cann/ops-nn/issues/8076 https://gitcode.com/wangyueting/changwei/issues/190 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> - Host UT:build.sh -u --ophost --soc=ascend950 --ops=centralization → **23/23 PASS** - 包构建:build.sh --pkg --soc=ascend950 --ops=centralization -j16 → **SUCCESS** - 设备 axes 契约 smoke:**7/7 PASS** - 空 axes fp32/fp16 → 输出 0;[1,1]、[-1,2] → 去重;rank8、small、lcsi - 全量 issue **编译**:**636/636**(634 rest + 2 large,0 个 COMPILE_FAILURE) - 全量 issue **设备执行**(stat_rel_err,--seed 1234): - 已完成 634 条:**528 PASS / 106 FAIL**(都为精度失败,编译全量通过),内存越界 **634/634 PASS** - 失败集中在近零输出的相对误差;不在本 PR 范围内,在后面解决。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - norm/centralization/README.md:axes 去重、空列表 no-reduce、rank 1–8、TF 通路说明 - norm/centralization/op_graph/centralization_proto.h:axes 去重/空列表/默认值描述 - norm/centralization/tests/assets/golden.py:同步 no-reduce/去重参考实现 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13577 | 18 days ago | |
fix: report graph fusion results with compatible APIs Co-authored-by: rk<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !13440 merge pass_result into master fix: report graph fusion results with compatible APIs Created-by: wangpengbo26 Commit-by: rk Merged-by: cann-robot Description: ## 描述 新增融合结果上报的公共兼容工具,并将四条 norm 融合规则接入 GE 融合结果上报 API:运行时支持时自动上报匹配与融合结果,不支持时静默回退。 ### 改动原因 GE 9.1.0+ 提供 SubgraphRewriter::Replace(带 CustomPassContext 的重载)与 GraphFuseInspectorUtils::ReportFuse/ReportMatch(9.2.0+)等融合结果上报接口。此前融合规则调用不带 context 的旧 Replace,无上报能力;且新接口需编译期版本宏与运行时弱符号双重探测,各规则分散接入易出错。 ### 改动方法 1. **新增公共工具 norm/common/op_graph/fusion_report_utils.h**(+110): - 本地声明 GE 上报接口(与 GE 对齐,弱符号):带 context 的 Replace 重载(GE 9.1.0+)、CanFuse/ReportFuse(9.1.0+)、ReportMatch(9.2.0+); - 提供三个兼容封装: - ReplaceSubgraphWithReport:优先调用带 context 的 Replace(替换并自动上报),运行时重载不可用时回退普通 Replace; - ReportMatchNodes:上报匹配节点集,运行时不可用时返回 SUCCESS; - ReportFuseNodes:上报融合前后节点,运行时不可用时返回 SUCCESS。 2. **四条融合规则接入**: - add_layer_norm_fusion_pass / add_rms_norm_dynamic_quant_fusion_pass / inplace_add_rms_norm_fusion_pass:替换调用改为 ops::fusion::ReplaceSubgraphWithReport(Run 的 CustomPassContext 透传); - inplace_add_layer_norm_fusion_pass(单节点替换流程):候选匹配后调用 ReportMatchNodes 上报,ReplaceOneNode 完成输出/控制边重接后、删除旧节点前调用 ReportFuseNodes 上报。 涉及文件(5 个,+131 -13): - norm/common/op_graph/fusion_report_utils.h(新增,+110) - norm/add_layer_norm/op_graph/fusion_pass/add_layer_norm_fusion_pass.cpp(+4 -4) - norm/add_rms_norm_dynamic_quant/op_graph/fusion_pass/add_rms_norm_dynamic_quant_fusion_pass.cpp(+4 -3) - norm/inplace_add_layer_norm/op_graph/fusion_pass/inplace_add_layer_norm_fusion_pass.cpp(+9 -2) - norm/inplace_add_rms_norm/op_graph/fusion_pass/inplace_add_rms_norm_fusion_pass.cpp(+4 -4) ## 关联的Issue - #8107 ## 测试 - 验证高版本(≥9.1.0/9.2.0)运行时融合结果正常上报、融合行为不变。 - 验证低版本运行时弱符号不可用,规则静默回退(不报错、融合正常)。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:融合结果上报接入 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13440 | 17 days ago | |
docs: update English translations for markdown files Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !13600 merge docs/update-english-translations into master docs: update English translations for markdown files Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## 描述 英文译稿合入后的增量同步与链接更新,共39个文件(37改2删): 1. 增量翻译(8篇):hard_shrink、squared_relu、foreach_lerp_list、foreach_maximum_scalar_list、quant_matmul_reduce_sum、deep_norm、apply_centered_rms_prop、torch_extension,同步最新中文源文档的变更内容。 2. 删除2篇译稿:rotate_quant/tests/st/arch35、grouped(上游已删除对应中文源文件)。 3. 链接改写(31篇):指向本仓已有英文版文档的链接统一改写为 _en 版本(含CONTRIBUTING/SECURITY/README、24处贡献流程链接、fast_kernel_launch_example等),并将残留的中文链接文字(贡献流程/贡献指南/安全声明等)译为英文。 ## 关联的Issue 无 ## 测试 文档类变更,无需算子测试。已通过:全量1135篇译稿链接有效性校验(全部指向master已有文件);残留中文/全角标点扫描(仅存数学公式内源文件原文、无英文版目标文档的中文锚点等允许例外)。 ## 文档更新 更新37个英文译稿文件、删除2个(对应源文件已上游删除),不修改任何中文源文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13600 | 18 days 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 | 18 days ago | |
fix(dua_quantize_add_layer_norm): 修正 arch35 GEIR 示例的 proto 头相对路径 Co-authored-by: zhou-liang1027<zhouliang88@huawei.com> # message auto-generated for no-merge-commit merge: !13979 merge fix/dua-quantize-example-include into master fix(dua_quantize_add_layer_norm): 修正 arch35 GEIR 示例的 proto 头相对路径 Created-by: zhou-liang1027 Commit-by: zhou-liang1027 Merged-by: cann-robot Description: ## 描述 修正 dua_quantize_add_layer_norm 算子 arch35 GEIR 示例的 proto 头文件相对路径,使示例可正常编译。 主要改动: - norm/dua_quantize_add_layer_norm/examples/arch35/test_geir_dua_quantize_add_layer_norm.cpp:proto 头引用由 ../op_graph/dua_quantize_add_layer_norm_proto.h 改为 ../../op_graph/dua_quantize_add_layer_norm_proto.h。示例文件位于 examples/arch35/,原路径解析到不存在的 examples/op_graph/,正确路径需再上一级到算子目录下的 op_graph/。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> - https://atomgit.com/cann/ops-nn/issues/8433 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> - 修正后 arch35 GEIR 示例 test_geir_dua_quantize_add_layer_norm.cpp 可正常编译。 - CI 流水线验证(ci-pipeline)。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> - 无。 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13979 | 12 days 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 | 18 days ago | |
fix issue Co-authored-by: liuyun_nj<liuyun90@h-partners.com> # message auto-generated for no-merge-commit merge: !13356 merge master into master fix issue Created-by: liuyun_nj Commit-by: liuyun_nj Merged-by: cann-robot Description: ## 描述 批量修复issue,主要改动点: AddLayerNorm tiling 中权重缓冲区不再乘 bufferNum:add_layer_norm_tiling.cpp 中 betaGammaBufSize、biasBufSize、ubCacheSize、singleRowBufSize、ubConstSlice、ubColNumSlice 等公式均去掉 * bufferNum,并在注释中说明 gamma/beta/bias 为常驻参数、只在 Process() 起始处加载一次并全核复用,不参与 CopyIn->Compute->CopyOut 轮转。 RmsNorm 增加非 regbase 平台的 rstd 元素数校验:在 CheckInputShape4RmsNorm 中,当 shape 全部已知时校验 rstd 元素数等于归一化行数 x.numel / gamma.numel,不满足则通过 OP_LOGE_FOR_INVALID_SHAPE_WITH_REASON 报错返回失败,防止内核按行写 rstd 造成越界写。 aclnnRmsNormQuant 的 scale 校验与错误码表达统一:将 scale 维度/长度及 x、y 形状相关的 OP_LOGE 替换为 OP_LOGE_FOR_INVALID_SHAPEDIM、OP_LOGE_FOR_INVALID_SHAPEDIM_WITH_REASON 等结构化错误宏,并把 scaleLength 的取值移入各平台分支内部。 x/y 前置维度一致性校验扩展到所有平台:DT_INT32 输出分支中 CheckShapeDimWithFrontN 不再仅在 regbase 生效;非 INT32 分支也新增了对 x、y 前置 n 维一致性的校验,不一致时报 "x shape should be the same as y shape"。 INT4 打包条件收紧与非 regbase 空 Tensor 空转:Int42Int32PackedTensor 仅在 yType == DT_INT4 且 y 的 dtype 为 DT_INT32 时执行;非 regbase 路径在 CheckParams 通过后若 x->IsEmpty(),直接返回 workspaceSize = 0 与 ACLNN_SUCCESS,不进入第二段计算。相应 UT 用例被替换为 scale 非法、x/y 前置维不匹配及空 Tensor 成功返回等新场景。 ## 关联的Issue [#7400](https://gitcode.com/cann/ops-nn/issues/7400) [#7401](https://gitcode.com/cann/ops-nn/issues/7401) [#7402](https://gitcode.com/cann/ops-nn/issues/7402) [#7403](https://gitcode.com/cann/ops-nn/issues/7403) [#7333](https://gitcode.com/cann/ops-nn/issues/7333) [#7213](https://gitcode.com/cann/ops-nn/issues/7213) [#7348](https://gitcode.com/cann/ops-nn/issues/7348) [#7405](https://gitcode.com/cann/ops-nn/issues/7405) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 aclnnGemmaRmsNorm.md aclnnGroupNorm.md aclnnRmsNormQuant.md ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13356 | 17 days 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 | 18 days ago | |
docs(gn_training_update): 明确 epsilon 属性必须大于 0 Co-authored-by: qq_37917228<yanmingkui@huawei.com> # message auto-generated for no-merge-commit merge: !13939 merge docs/gn_training_update_epsilon_doc into master docs(gn_training_update): 明确 epsilon 属性必须大于 0 Created-by: qq_37917228 Commit-by: qq_37917228 Merged-by: cann-robot Description: ## 描述 gn_training_update 的 epsilon 在 Host tiling 阶段已强制 > 0(!(epsilon_ > 0.0f) 同时拒绝 0、负值和 NaN),并由 UT epsilon_zero_rejected 固化,但中英文 README 只写了默认值 0.0001,未说明值域约束。使用者若参照 batch_norm 系列(部分算子允许 0)传参会得到 GRAPH_FAILED 却查不到原因。 本次仅补充文档: - 参数表 epsilon 行明确“必须大于0(0、负值或NaN在Host侧拒绝)”; - “约束说明”新增一条,说明该值只参与 rstd 计算、batch_variance 输出未加 epsilon; - 英文 README 同步。 ## 关联的Issue 无(文档补充,非缺陷修复)。 ## 测试 纯文档改动,未执行编译与测试。所述约束与代码一致: - CheckAttrValueRange:op_host/arch35/gn_training_update_tiling_arch35.cpp - UT epsilon_zero_rejected:tests/ut/op_host/arch35/test_gn_training_update_tiling.cpp ## 文档更新 更新 norm/gn_training_update/README.md 与 README_en.md。 ## 类型标签 - [x] 文档更新 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13939 | 12 days ago | |
feat: SwiGluQuant 等 7 算子补充 ascend960dt 平台注册适配 Co-authored-by: wychencc_<wangyuchen53@huawei.com> # message auto-generated for no-merge-commit merge: !12748 merge 960DT into master feat: SwiGluQuant 等 7 算子补充 ascend960dt 平台注册适配 Created-by: wychencc_ Commit-by: wychencc_ Merged-by: cann-robot Description: ## 描述 为 7 个算子补充 ascend960dt(Ascend960DT,NpuArch DAV_9201)平台注册适配,复用 ascend950 同族 regbase kernel/tiling,按 950 已登记面同步登记: - SwiGluQuant / SituGlu / SituGluGrad / SituMxQuant / GroupNorm / SwigluGroupQuantWithDualAxis / SwigluBackwardGroupQuantWithDualAxis:def.cpp 紧随 ascend950 追加 AddConfig("ascend960dt"),复用同一 config 对象 - SwiGluQuant / SituGlu / SituGluGrad / SituMxQuant / GroupNorm:ascend950 binary json 原样拷贝至 op_host/config/ascend960dt(逐字节一致;Swiglu 双轴两算子 950 侧无 per-SoC json,按规跳过) - SwiGluQuant:scripts/kernel/binary_config/ascendc_config.json compute_units 紧随 ascend950 登记 ascend960dt - SituGlu / SituGluGrad:tiling IsCapable 复用公共 IsRegbaseSocVersion 支持 DAV_9201(960dt 无独立 SocVersion 枚举) - 相关 CMakeLists SUPPORT_COMPUTE_UNIT 追加 ascend960dt、SUPPORT_TILING_DIR 补位同值 arch35、op_kernel COMPUTE_UNITS 同步 op_api 复核:GroupNorm 与 aclnnBinaryCrossEntropyWithLogits 均走公共 IsRegbase()(common/inc/op_api/aclnn_util.h 集合已含 DAV_9201/9202),无需新增芯片判断;其余算子无平台门控。 ## 关联的Issue 关联 Issue #7214 ## 测试 - 5 个拷贝的 binary json 与 ascend950 版哈希校验一致 - ascendc_config.json 修改后 JSON 解析校验通过(704 条目) - 待 CI:Linux 环境 build.sh --soc=ascend960dt 出包冒烟、全量 UT ## 文档更新 无(960dt 文档条目待 npu 标签码值统一定义后另行批量补齐) ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12748 | 16 days 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 | 18 days 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 | 18 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days 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 | 18 days ago | |
[Docs] 移除 7 个文件中的 UTF-8 BOM Co-authored-by: aodebiao<18003961989@163.com> # message auto-generated for no-merge-commit merge: !12485 merge docs/fix-utf8-bom into master [Docs] 移除 7 个文件中的 UTF-8 BOM Created-by: gxhgxh2475698 Commit-by: aodebiao Merged-by: cann-robot Description: ## 描述 6 个源码文件以 UTF-8 BOM( EF BB BF)开头,而仓库其余源码与文档均为无 BOM 的 UTF-8。本次仅移除文件头 3 字节 BOM,其余内容零改动。 ## 改动内容 - rnn/dynamic_rnn/op_api/aclnn_lstm.cpp - rnn/gru/op_api/aclnn_gru.cpp - rnn/gru/op_host/gru_tiling.cpp - rnn/gru/op_host/gru_tiling.h - rnn/gru/op_kernel/gru_fp32.h - norm/group_norm_swish_grad/op_kernel/arch35/group_norm_swish_grad.h 共 6 个文件、6 行变更(每行仅去掉行首 BOM)。 说明:另有 1 个测试文件 也存在 BOM,但该文件另有既存的 clang-format 格式问题(本仓 .clang-format 校验会报告需重排),故本次未纳入改动范围,避免与本次改动无关的格式问题触发门禁。 ## 关联的Issue 修复 #7125([Documentation|文档反馈]: 源码文件带 UTF-8 BOM,与仓库其余文件编码不一致) ## 测试 仅编码层面改动,不涉及逻辑,未运行编译与 UT。 验证方式: - 修改前 head -c 3 <file> | od -An -tx1 输出 ef bb bf,修改后首字节为文件首个有效字符; - 去掉 BOM 后文件其余内容与修改前逐字节一致; - 6 个文件均已通过仓库 .clang-format 本地校验(无格式改动建议)。 ## 文档更新 上述 6 个文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!12485 | 15 days 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 | 18 days 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 | 18 days 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 | 18 days ago | |
perf(in_training_reduce_v2): 优化短规约连续行计算 Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !13846 merge perf/intrainingreducev2-r1-20261106 into master perf(in_training_reduce_v2): 优化短规约连续行计算 Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 描述 优化Ascend 950上INTrainingReduceV2的短规约AR路径。原实现按每个N/C行搬运、对齐并执行水平规约,R较小时逐行开销较大。复测原issue报告失败的88例时,仅有R=1优化的版本仍有13例不达标,规约长度为3~12。 - R=1:连续搬运多行,直接计算FP32原值和平方。 - 2≤R≤64:连续搬运多行,每个向量通道处理一个输出行,按规约列Gather并累加,减少逐行搬运和水平规约开销。使用补偿求和,并对FP32输入采用二次幂缩放保护中间累加范围;平方仍基于原输入计算。短R的累加顺序发生变化,数学定义不变。 - Host侧按输入和两个输出的双缓冲UB预算、AIV核数分块,保留64位GM偏移,并限制VF循环计数及DMA字节数。小UB场景保留原路径回退。 - 复用现有tiling key和数据结构。R>64及多通道ARA路径保持原运算逻辑;优化仅涉及arch35。新增6项Host UT和8条小规模仓内ST,原有20条ST保留。 本PR仅涉及INTrainingReduceV2的7个文件。提交已整理为一个,受测提交为 8de2039bbd2b1f27ef112d9f949ece15b68afb20,基于本轮实际fetch的官方master 47b9e324a4686f7f42c54da69eab4dbfd1c2e83a完成rebase。squash前后同基点完整diff及Git tree一致;rebase后任务diff及算子运行源码哈希保持一致。 ## 关联的Issue 主仓跟踪:[#8324](https://gitcode.com/cann/ops-nn/issues/8324)。 原始问题来源:[wangyueting/changwei #206](https://gitcode.com/wangyueting/changwei/issues/206)。已按原附件全部300例复测,包括原报告的88个失败用例;下列结论来自本地950PR/A100实测,未代替原L20环境执行复测。 ## 测试 线上CI:[已提交compile触发并回查](https://gitcode.com/cann/ops-nn/pull/13846#note_198875729),受测提交与PR HEAD一致;此处仅确认触发,线上最终结果待平台返回。 环境:Ascend950PR_9579、A100-PCIE-40GB;任务内独立CANN_Master/CANN_Revise,CANN 9.3.0、20261028包;TTK提交a996a41594dc9e81430d7f169b0ad42f917d16e9。所有TTK执行显式--pc=1,所有构建不超过8并行任务。 本轮按原issue的eager Torch组合计算作为GPU主验收基准。NPU/A100共用冻结输入,与未修改的仓内FP64 golden执行cross_check L1,两个输出均检查。没有修改golden或放宽精度阈值;原R=1阶段的compiled GPU结果仅作为补充,不用于本轮原issue闭环。 同带宽折算:(A100耗时/950PR耗时)×(1.55/1.6),要求≥0.1。NPU每例采集10轮设备耗时,排除首轮后取9轮中位数;A100按原eager计算使用CUDA profiler,预热后采集10轮,统计设备计算时间。 | 验证范围 | 结果 | | --- | --- | | 原附件全部300例 | 三方精度300/300、性能300/300通过,最低折算0.110197 | | 最终掩码整理后的43个受影响原始用例 | 三方精度和性能43/43通过 | | 新增8个大规模短R边界用例 | 三方精度和性能8/8通过,最低折算1.507567 | | 最终包kernel release回归100例 | 100/100通过,全部BINARY_MATCH,两个输出均通过 | | 最终包GEIR 28例 | 静态、动态两种模式的两个输出均通过 | | 最终包OOM专项8例 | 实际OOM编译和执行通过,核对FP16/FP32产物的OOM元数据,越界检查通过 | | 最终包手工数值专项16例 | 消减、大小数混合等场景的两个输出均通过三方精度检查 | | 950/A2本地CI | 定向编包、Host/Kernel检查、pre-commit、OAT及文档链接检查通过;Host UT分别106项、12项通过 | 全量300例运行后,仅将VF中的三目掩码计数改为等价算式。5个FP32 kernel二进制和5个Host共享库逐字节一致;5个FP16二进制的变化限定在短R VF及对应调用长度/地址重定位。最终包重测全部43个受影响原始用例,另外257例使用已通过的未变计算路径结果;最终包同时完成上述100例release、28例GEIR、8例OOM和16例数值回归。 剩余13个失败场景修复后,相对仅有R=1优化的版本,NPU加速比为85.7~343.2,输入及FP64 golden哈希一致。示例: | 原始用例 | 短R优化前NPU/μs | 最终NPU/μs | A100 eager/μs | 同带宽折算 | | --- | ---: | ---: | ---: | ---: | | 013,FP16,R=9 | 956.777 | 11.161 | 94.0 | 8.1590 | | 019,FP32,R=7 | 5290.612 | 28.206 | 195.0 | 6.6974 | | 142,FP32,R=4 | 13813.188 | 40.250 | 383.0 | 9.2182 | 全量中最低折算来自219(FP32、ND、[271,213,137]):NPU 1353.825μs、A100 154.0μs,折算0.110197。大R对照358:NPU 761.521μs、A100 141.0μs,折算0.179370。本轮原始300例及新增8例均无低于0.1的场景,不以这些结果推断未测试的全部shape。 A2隔离检查:编译命令中没有本算子的arch35源文件,A2 Host产物无本算子的950 tiling符号,12项Host UT为通用推导测试,没有混入arch35 tiling UT。 安装环境说明:主线公共graph库安装校验涉及aclsysGetVersionNum加载依赖,仅安装器进程预加载同一套CANN的libascendcl.so。实际TTK执行均无LD_PRELOAD,未改公共模块或绕过推导回调。 ## 文档更新 按当前文档指引,将README_en.md中产品差异表整理为“Constraints”下的分产品列表,保留原有支持范围和约束事实。中文README和调用示例未改,无公开接口、数据类型、格式或数学定义变化。tiling字段注释同步说明短R路径的复用含义。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [x] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13846 | 13 days 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 | 18 days 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 | 18 days ago | |
fix(norm): 保留INTrainingUpdateV2方差减法残差 Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !13756 merge fix/in-training-update-v2-round4-variance-20261105 into master fix(norm): 保留INTrainingUpdateV2方差减法残差 Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 描述 第四轮全量回归发现 INTrainingUpdateV2_L1_rangebound_highpre_470 的运行方差三方 RMSE 比值为 1.607104909,超过 L1 上限 1.5。固定原始输入连续三次复现;去掉运行统计或将 momentum 设为 1,基础方差仍有误差。 基础方差已保留乘法残差,但计算 square_sum/R - mean² 时遗漏减法的舍入残差。本次用已有 SumError 恢复这部分误差,再参与方差补偿、Bessel 校正和标准差计算。复用现有寄存器,补充四条各含 3 个 x 元素的布局/dtype 回归。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8236 ## 测试 - Ascend950PR_9579,任务独立 CANN 9.3,预编译包以单任务构建,安装和部署内容核对通过。 - TTK ad177f0b9c7b336c3e0ce6778721489df08b5f36,所有执行显式 --pc=1;沿用原 Golden 和 cross_check L1 判据,参考设备为 A100-PCIE-40GB。 - 11 条真实三方定向回归全部 PASS/BINARY_MATCH:470 原输入三次重复、基础方差/动量对照两条、小输入四条、第三轮原始 147 和 483 两条。470 所有输入 SHA256 保持一致,修复后方差与本次 GPU 输出逐值一致。 - 本地 CI(2026-11-06):受测 d67f536e39aaa26ac0be0063bdcf2114ef241bb0,基线 886bfe76783c116ce7aea99db7abbd17d01bb292。指定入口 /workspace/CI-skills/ci_local_check.sh 完整通过;Ascend 950、A2 的定向包构建、Host/API/Kernel UT 阶段及 Graph ASan 门禁均 PASS,JOBS=1。编译阶段无实际用例的目标不计数值覆盖。 - 本次 rebase 前后两份任务文件字节一致,相关主线依赖无差异。此前三方数值证据保留原受测 SHA,不改标为本次 CI 提交的上板结果。 - 原始 707 条全量回归按用户指示暂停 NPU 使用,尚未完成;本次仅完成编译和 CPU UT,未恢复上板测试。内存超限、原始元数据无法解析等情况单列,不计数值 PASS。 ## 文档更新 本次修改算子实现及精度回归数据生成器,无接口或规格变更。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写(Codex / GPT-6) See merge request: cann/ops-nn!13756 | 16 days ago | |
norm: add LN goldens and align empty-shape semantics Co-authored-by: wangpengbo<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !13856 merge ln_golden into master norm: add LN goldens and align empty-shape semantics Created-by: wangpengbo26 Commit-by: wangpengbo Merged-by: cann-robot Description: ## 描述 补全 LayerNorm / LayerNormV3 的 golden 参考实现,并统一 AddLayerNorm / InplaceAddLayerNorm golden 在归一化维度为空及可选输出关闭时的输出语义。全部为测试参考实现(golden)变更,不涉及算子计算逻辑。 ### 改动原因 - LayerNorm(V1)与 LayerNormV3 缺少 tests/assets/golden.py,对应 Kernel/GEIR 用例无法加载参考实现; - AddLayerNorm golden 原先只按最后一维归一化、固定返回 x 输出,且 dtype 规则仅参考 x1,无法覆盖多维归一化、FP64 输入、空归一化维度与 additional_output=false 场景; - InplaceAddLayerNorm golden 在空归一化维度时将 mean 填为 NaN,与 950 平台 mean=0 的语义不一致;additional_output=false 时返回 3 元组,丢失可选输出槽位。 ### 改动方法 1. **新增 norm/layer_norm/tests/assets/golden.py(+79)**: - 注册 __golden__ 与 __spec__(LayerNormTestSpec); - _check_axes_and_params 校验 begin_norm_axis/begin_params_axis 范围及 gamma/beta 形状; - FP64 计算 mean/variance/rstd 与 y;y 输出 x dtype,mean/variance 输出 gamma dtype(与 op def 一致); - epsilon 默认 1e-12(与 LayerNorm op def 一致); - 提供 LayerNormTorchThirdParty 三方对照(低精度输入用 FP32 累积)。 2. **新增 norm/layer_norm_v3/tests/assets/golden.py(+79)**:与 V1 对称,第三输出为 rstd,epsilon 默认 1e-5(与 LayerNormV3 op def 一致)。 3. **更新 norm/add_layer_norm/tests/assets/golden.py(+75 -33)**: - 新增 __spec__、AddLayerNormTestSpec 与 AddLayerNormTorchThirdParty; - 归一化维度由 gamma.shape 决定,统计量形状按 x 前缀维 + 1 推导,支持多维归一化; - dtype:FP32/FP64 输入用 FP64 累积、低位宽输入用 FP32 累积;输出 dtype 按 x1/x2 提升(FP64→float64,含 FP32→float32,否则 x1 dtype); - 空归一化维度(0 in normalized_shape):y 为空,mean=0,rstd=NaN(950 语义); - additional_output=false 时 x 输出返回 None,保留输出槽位并跳过比较。 4. **更新 norm/inplace_add_layer_norm/tests/assets/golden.py(+3 -3)**: - 空归一化维度 mean 由 NaN 改为 0(rstd 仍为 NaN); - additional_output=false 返回 (y, mean, rstd, None),补齐可选输出槽位。 涉及文件(4 个,+236 -36): - norm/add_layer_norm/tests/assets/golden.py(+75 -33) - norm/inplace_add_layer_norm/tests/assets/golden.py(+3 -3) - norm/layer_norm/tests/assets/golden.py(新增,+79) - norm/layer_norm_v3/tests/assets/golden.py(新增,+79) ## 关联的Issue - https://gitcode.com/cann/ops-nn/issues/8336 ## 测试 - 本 PR 为 ST/GEIR golden 参考实现变更,未修改算子计算逻辑。 - 新增 LayerNorm/LayerNormV3 golden 后,对应 Kernel/GEIR 用例可加载参考结果;AddLayerNorm/InplaceAddLayerNorm 补充多维归一化、FP64/FP32 dtype 组合、空归一化维度及 additional_output 开关场景的参考结果。 - 每个 golden 均注册 third_party torch 对照,可用于参考实现自校验。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:测试 golden 补全与输出语义对齐 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13856 | 15 days ago | |
norm: add LN goldens and align empty-shape semantics Co-authored-by: wangpengbo<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !13856 merge ln_golden into master norm: add LN goldens and align empty-shape semantics Created-by: wangpengbo26 Commit-by: wangpengbo Merged-by: cann-robot Description: ## 描述 补全 LayerNorm / LayerNormV3 的 golden 参考实现,并统一 AddLayerNorm / InplaceAddLayerNorm golden 在归一化维度为空及可选输出关闭时的输出语义。全部为测试参考实现(golden)变更,不涉及算子计算逻辑。 ### 改动原因 - LayerNorm(V1)与 LayerNormV3 缺少 tests/assets/golden.py,对应 Kernel/GEIR 用例无法加载参考实现; - AddLayerNorm golden 原先只按最后一维归一化、固定返回 x 输出,且 dtype 规则仅参考 x1,无法覆盖多维归一化、FP64 输入、空归一化维度与 additional_output=false 场景; - InplaceAddLayerNorm golden 在空归一化维度时将 mean 填为 NaN,与 950 平台 mean=0 的语义不一致;additional_output=false 时返回 3 元组,丢失可选输出槽位。 ### 改动方法 1. **新增 norm/layer_norm/tests/assets/golden.py(+79)**: - 注册 __golden__ 与 __spec__(LayerNormTestSpec); - _check_axes_and_params 校验 begin_norm_axis/begin_params_axis 范围及 gamma/beta 形状; - FP64 计算 mean/variance/rstd 与 y;y 输出 x dtype,mean/variance 输出 gamma dtype(与 op def 一致); - epsilon 默认 1e-12(与 LayerNorm op def 一致); - 提供 LayerNormTorchThirdParty 三方对照(低精度输入用 FP32 累积)。 2. **新增 norm/layer_norm_v3/tests/assets/golden.py(+79)**:与 V1 对称,第三输出为 rstd,epsilon 默认 1e-5(与 LayerNormV3 op def 一致)。 3. **更新 norm/add_layer_norm/tests/assets/golden.py(+75 -33)**: - 新增 __spec__、AddLayerNormTestSpec 与 AddLayerNormTorchThirdParty; - 归一化维度由 gamma.shape 决定,统计量形状按 x 前缀维 + 1 推导,支持多维归一化; - dtype:FP32/FP64 输入用 FP64 累积、低位宽输入用 FP32 累积;输出 dtype 按 x1/x2 提升(FP64→float64,含 FP32→float32,否则 x1 dtype); - 空归一化维度(0 in normalized_shape):y 为空,mean=0,rstd=NaN(950 语义); - additional_output=false 时 x 输出返回 None,保留输出槽位并跳过比较。 4. **更新 norm/inplace_add_layer_norm/tests/assets/golden.py(+3 -3)**: - 空归一化维度 mean 由 NaN 改为 0(rstd 仍为 NaN); - additional_output=false 返回 (y, mean, rstd, None),补齐可选输出槽位。 涉及文件(4 个,+236 -36): - norm/add_layer_norm/tests/assets/golden.py(+75 -33) - norm/inplace_add_layer_norm/tests/assets/golden.py(+3 -3) - norm/layer_norm/tests/assets/golden.py(新增,+79) - norm/layer_norm_v3/tests/assets/golden.py(新增,+79) ## 关联的Issue - https://gitcode.com/cann/ops-nn/issues/8336 ## 测试 - 本 PR 为 ST/GEIR golden 参考实现变更,未修改算子计算逻辑。 - 新增 LayerNorm/LayerNormV3 golden 后,对应 Kernel/GEIR 用例可加载参考结果;AddLayerNorm/InplaceAddLayerNorm 补充多维归一化、FP64/FP32 dtype 组合、空归一化维度及 additional_output 开关场景的参考结果。 - 每个 golden 均注册 third_party torch 对照,可用于参考实现自校验。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:测试 golden 补全与输出语义对齐 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13856 | 15 days ago | |
feat(5162a): norm/quant 系算子注册适配 ascend5162 并整改 _apt 命名 Co-authored-by: wuxuening<wuxuening2@huawei.com> # message auto-generated for no-merge-commit merge: !13514 merge br_5162a_norm_quant into master feat(5162a): norm/quant 系算子注册适配 ascend5162 并整改 _apt 命名 Created-by: wuxuening Commit-by: wuxuening Merged-by: cann-robot Description: ## 描述 **1. batch_norm/layer_norm/ascend_quant/instance_norm/rms_norm 五算子注册适配 ascend5162**: - 5 个 def.cpp 追加 AddConfig("ascend5162", ...),复用 950 全量配置 - 5 个 CMakeLists 的 SUPPORT_COMPUTE_UNIT 追加 ascend5162,SUPPORT_TILING_DIR 追加 arch35 - cmake/func.cmake get_target_dir 追加 ascend5162 → arch35(UT 可收集 arch35 测试文件) - kernel 侧适配(instance_norm VL 派生搬出步长 32B 粒度、rms_norm VRegSize 动态化等) **2. ascend_quant 算子 _apt 后缀整改**(参照 chenqi317 检视意见): - ascend_quant_apt.cpp → ascend_quant.cpp(kernel 入口标准命名,参照 bnll/celu 等 523 个已完成整改的算子模式) - test_ascend_quant_apt.cpp → test_ascend_quant.cpp(UT 同步改名) - def.cpp opFile.value: "ascend_quant_apt" → "ascend_quant" - 修复 UT 版权头缺少 except(存量问题,OAT 通过) ## 测试 - pre-commit 全量 hook 通过(含 clang-format/codespell/OAT) ## 文档更新 无 See merge request: cann/ops-nn!13514 | 17 days 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 | 18 days ago | |
docs: update English translations for markdown files Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !13600 merge docs/update-english-translations into master docs: update English translations for markdown files Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## 描述 英文译稿合入后的增量同步与链接更新,共39个文件(37改2删): 1. 增量翻译(8篇):hard_shrink、squared_relu、foreach_lerp_list、foreach_maximum_scalar_list、quant_matmul_reduce_sum、deep_norm、apply_centered_rms_prop、torch_extension,同步最新中文源文档的变更内容。 2. 删除2篇译稿:rotate_quant/tests/st/arch35、grouped(上游已删除对应中文源文件)。 3. 链接改写(31篇):指向本仓已有英文版文档的链接统一改写为 _en 版本(含CONTRIBUTING/SECURITY/README、24处贡献流程链接、fast_kernel_launch_example等),并将残留的中文链接文字(贡献流程/贡献指南/安全声明等)译为英文。 ## 关联的Issue 无 ## 测试 文档类变更,无需算子测试。已通过:全量1135篇译稿链接有效性校验(全部指向master已有文件);残留中文/全角标点扫描(仅存数学公式内源文件原文、无英文版目标文档的中文锚点等允许例外)。 ## 文档更新 更新37个英文译稿文件、删除2个(对应源文件已上游删除),不修改任何中文源文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13600 | 18 days 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 | 18 days ago | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !13602 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Modify issues. ## 关联的Issue [#7337](https://gitcode.com/cann/ops-nn/issues/7337) [#7474](https://gitcode.com/cann/ops-nn/issues/7474) [#7941](https://gitcode.com/cann/ops-nn/issues/7941) [#6792](https://gitcode.com/cann/ops-nn/issues/6792) [#7345](https://gitcode.com/cann/ops-nn/issues/7345) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13602 | 16 days ago | |
[Docs] 为 7 个文档中的图片补充 alt 文本 Co-authored-by: aodebiao<18003961989@163.com> # message auto-generated for no-merge-commit merge: !12484 merge docs/fix-empty-img-alt into master [Docs] 为 7 个文档中的图片补充 alt 文本 Created-by: gxhgxh2475698 Commit-by: aodebiao Merged-by: cann-robot Description: ## 描述 仓库内 7 个文档共 97 处图片使用空 alt( ),在图片加载失败、读屏或纯文本导出场景下无法传达图片内容。本次以图片文件名作为 alt 补齐,图片路径与正文不变。 ## 改动内容 - matmul/batch_mat_mul_v3/docs/EinsumPass.md(57 处) - norm/layer_norm/docs/LayerNormONNXFusionPass.md(12 处) - norm/add_layer_norm/docs/AddLayerNormFusionPass.md(8 处) - norm/layer_norm/docs/LayerNormONNXMULFusionPass.md(8 处) - activation/softmax_grad_ext/docs/SoftmaxGradExtV2FusionPass.md(4 处) - norm/add_layer_norm_quant/docs/QuantizeAddLayerNormPass.md(4 处) - norm/layer_norm/docs/LayerNormFusionPass.md(4 处) 改动示例: →  共 7 个文件、97 行变更(每处仅新增 alt 文本)。 ## 关联的Issue 修复 #7124([Documentation|文档反馈]: 7 个文档中共 97 处图片缺少 alt 文本) ## 测试 纯文档改动,不涉及代码,未运行编译与 UT。 验证方式: - 对本次 7 个文件扫描,修复前 grep -c '!\[\](' 命中 97 处,修复后为 0 处; - 图片目标路径未改动,引用的图片文件均存在,改动前后断链数一致; - git diff --stat:7 个文件、97 行变更,均为 alt 文本新增。 ## 文档更新 上述 7 个文档。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!12484 | 15 days 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 | 18 days 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 | 18 days 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 | 18 days ago | |
feat(layer_norm): reuse LayerNormV3 two-pass perf template Co-authored-by: rk<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !13207 merge ln_pref into master feat(layer_norm): reuse LayerNormV3 two-pass perf template Created-by: wangpengbo26 Commit-by: rk Merged-by: cann-robot Description: ## 描述 为 LayerNorm(V1)接入 LayerNormV3 已有的二趟高性能(two-pass perf)tiling/kernel 模板,使 V1 在满足条件的 shape 上复用同一套寄存器级实现;并通过模板参数区分 V1/V3 第三个输出的语义(V1 输出 variance,V3 输出 rstd),保证共用 kernel 时结果正确。 ### 改动原因 - LayerNormV3 已实现 two-pass perf 模板(tiling key 500/510/511/520/522),但此前只注册给 LayerNormV3( REGISTER_OPS_TILING_TEMPLATE(LayerNormV3, ..., 150))。LayerNorm(V1)在同 shape 下只能命中 two-pass 模板(priority 200)等路径,未复用该高性能实现。 - V1 的第三个输出是 variance,V3 是 rstd。原 perf kernel 在输出缓冲区上原地把 variance 转成 rstd,直接复用于 V1 会导致第三输出错误,因此需要按算子区分输出语义。 ### 改动方法 1. **kernel 输出语义参数化**:LayerNormV3RegbaseTwoPassPerf 与 RegbaseTwoPassPerfImpl 新增 bool IsOutRstd 模板参数;layer_norm_impl 将该参数透传到五个 two-pass perf tiling key 分支(V3 传 true、V1 传 false)。 2. **V1(IsOutRstd=false)路径**: - 输出缓冲区保留原始 variance 作为 lastout,新增 rstdBuf_ 存放 rstd; - CalculateRstdVF 增加 variance 入参,改为 ComputeRstdNewtonRaphson(variance, rstd) 非原地计算;y 归一化使用 rstd,第三输出写 variance; - rstdGm_/rstdQueue_/rstdOutUb_ 更名为 lastout*,CopyOutMeanRstd/CastMeanRstd 更名为 CopyOutMeanLastout/CastMeanLastout。 3. **tiling 注册与 UB 预算**: - 新增 REGISTER_OPS_TILING_TEMPLATE(LayerNorm, LayerNormV3RegBaseTwoPassPerfTiling, 150); - CanFitInBuffer 在 commonParams.isV1 时额外扣除 curAAlign * sizeof(float) 的 rstd 缓冲区,避免 UB 超限。 4. **UT**:LayerNorm tiling UT 重命名为 layer_norm_tiling_regbase_two_pass_perf,并启用 tiling key 断言((64,4096) FP32 → key 500)。 涉及文件(4 个,+53 -40): - norm/layer_norm/tests/ut/op_host/arch35/test_layer_norm_tiling.cpp(+2 -2) - norm/layer_norm_v3/op_host/arch35/layer_norm_v3_regbase_two_pass_perf_tiling.cpp(+6 -2) - norm/layer_norm_v3/op_kernel/arch35/layer_norm_v3_two_pass_perf.h(+36 -27) - norm/layer_norm_v3/op_kernel/layer_norm_v3_apt.h(+9 -9) ## 关联的Issue - https://gitcode.com/cann/ops-nn/issues/8329 ## 测试 - UT:layer_norm_tiling_regbase_two_pass_perf 覆盖 (64,4096) FP32,校验命中 two-pass perf 模板(tiling key=500)。 - 回归关注点:V1 第三输出 variance、V3 第三输出 rstd 以及 y 的数值一致性,由现有 LayerNorm/LayerNormV3 ST 用例覆盖。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [x] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13207 | 15 days ago | |
perf(layer_norm_v4): 独立SplitR执行类实现小A大R跨核归约 Co-authored-by: pipiman<1184988868@qq.com> # message auto-generated for no-merge-commit merge: !13181 merge feat/layer-norm-v4-split-r-separate-kernel into master perf(layer_norm_v4): 独立SplitR执行类实现小A大R跨核归约 Created-by: gcw_QAn8CO53 Commit-by: pipiman Merged-by: cann-robot Description: ## 描述 LayerNormV4 在小 A、大 R 场景下,完整行 Welford 只能利用少量 Vector 核。本 PR 新增独立的 LayerNormV4RegbaseSplitR:各核计算连续片段的局部统计,通过 workspace 交换并执行一次 SyncAll(),合并整行统计后分别输出自己的 y 片段。 跨核合并沿用 BatchNormV3 的算法,将实际使用的函数实现集中迁入 norm/layer_norm_v4/op_kernel/arch35/layer_norm_v4_split_r.h 的公共辅助类 LayerNormV4SplitRCommon,便于逐函数审阅: - 四个 public static 入口:FindCofFactor、CopyInAllMeanVarPad、FillCountBlock、LastFinalizeVF;内部树归约函数 BinaryAddVF 为 private。注释注明 BatchNormV3 原文件、参考版本和行范围。 - 迁移保留原计算顺序、寄存器操作、mask 和内存屏障;SplitR 调用 LastFinalizeVF<false>,沿用 BatchNormV3 已有通用寻址路径。此次仅改变函数归属及调用限定名,不另写合并算法。 - 移除 BatchNormV3 include 与 Host CMake 的 batch_norm_v3 依赖,仅保留 norm_common。未增加新的公共头文件。 - 各核的 mean 与 population variance 分别存入两个 GM 平面,每项占 32B。workspace 为系统空间加 64 * A * S 字节,partial UB 预算为 2 * ((S - 1) * 32 + 256) 字节,保证末行完整向量加载有足够空间。 - count 采用 BatchNormV3 CaculateCountBuf 的前缀覆盖方式:先填末段,再覆盖普通段和较长的前缀段;三个填充循环次数按 ceil(num / 64) 计算。 - 复用已结束的局部 Welford 缓冲区存 float counts,复用 Normalize 前空闲的 rstd 缓冲区作为树归约 scratch。 - 完整行 LayerNormV4RegbaseWelford 与 SplitR 继承公共 LayerNormV4WelfordBase,共享局部 Welford 和 Normalize 实现。 支持范围:V4、DAV_3510 regbase、确定性等级 0、R≥65536 且 A≤floor(AIV 核数/4),每行最多 16 核,其余场景使用原模板。Host UT 覆盖非 2 幂分组、尾段、workspace/UB 预算及 mainBlockFactor=1 不变量。 这是 [!12801](https://gitcode.com/cann/ops-nn/merge_requests/12801) 的独立执行类版本,两个 PR 不应重复合入。 ## Host 分流条件及依据 记 A=colSize(独立归一化行数)、R=rowSize(每行归约长度)、C=可用 AIV 核数、S=每行协作核数。BatchNormV3 的 A 是通道数,不能直接照搬其 A/R 阈值。 | 判断 | 为什么这样取 | 性质 | | --- | --- | --- | | DAV_3510 且 isRegBase | 本次新增的寄存器实现和验证范围是 arch35;其他架构沿用原模板 | 实现覆盖范围 | | !isV3 | V3 共享部分基础设施,但本 PR 仅接管 V4,保留 V3 分发 | 兼容边界 | | deterministicLevel==0 | 跨核分段与树归约改变浮点累加顺序,本 PR 未建立确定性模式下的等价保证 | 保守准入范围,不表示每次运行必然随机 | | A>0,R≤INT32_MAX | 排除空行;保持当前长度、count/接口参数的受支持范围。不是硬件不能处理更大 R | 实现边界 | | R≥65536 | 行足够长时,分核减少的计算时间才更可能覆盖同步、partial 搬运和统计合并开销 | 历史调优形成的保守性能阈值 | | A≤floor(C/4) | 仅接管行间并行度不足的场景;让每行有至少四个核的分配空间,避免接管本来已能充分按行并行的输入 | 保守性能阈值 | | S≤floor(R/16384) | 用每段约 16384 元素的目标工作量限制分段数,避免把单核任务切得太碎;按 16 元素对齐并裁剪尾段后,实际最短段可能略小于 16384 | 分段策略,不是每段真实 count 的严格下限 | | S≤16 | 控制同步后各核重复读取统计量及合并的开销,并限定本次实现/验证范围 | 策略上限,不是设备最多只有 16 核 | | S≤floor(C/A) | 保证启动核数 A×S 不超过可用核数 C | 资源约束 | 最终 S=min(16,floor(C/A),floor(R/16384)),并保留 S>=2 的多核有效性检查;在当前长行和小 A 条件下,实际准入 S 至少为 4。未命中准入时选择原模板,不代表进入本模板后的任意执行错误都会自动回退。 例如 C=64、A=1、R=81921,S=min(16,64,5)=5;A=3、R=65537 时 S=min(16,21,4)=4,共启动 12 核。 阈值历史:早期探索采用过 R≥32768、A≤C/2;设计记录中 R=32768 的收益约为 5%~12%,A=32、R=65536 的 FP16 收益约 1%,随后收紧为当前范围。这些是旧版本的历史调优记录,并非本次迁入 BatchNormV3 合并实现的版本重新扫描所得,也不能证明 65536、16384、16、C/4 是所有 dtype/shape 的最优选择。当前提交的功能验证结果另列,性能对比保留实际测试版本说明。 ## 性能对比(相对优化前整行 Welford 路径) 性能提升见学习工作区文档 **《LayerNormV4_reduce轴多核优化设计_小A大R_20261026.md》第 12.11 节**。该节记录的是 2026-10-31 独立执行类版本 b2e5fa278(代码树 aaa530a01)相对原完整行 Welford 路径的真机结果;不能直接作为本次提交的性能验收。 测试为同一 Ascend950 设备上的 TTK Kernel release,seed=20261026、--compare close,三轮交错采集,以 bin_perf_us 中位数计算加速比。15 个准入场景为 **1.51~8.49×**;5 个 R=32768 回退对照约 **0.98~1.00×**。采样窗口存在其他用户任务,不把 Kernel 收益外推为 ACLNN 或模型吞吐收益。 | 历史形状 | x/参数 dtype | 原整行路径 μs | 历史 SplitR μs | 加速比 | | --- | --- | --- | --- | --- | | 1×1048576 | BF16/BF16 | 139.42 | 16.42 | 8.49× | | 1×1048576 | FP16/FP32 | 160.11 | 18.91 | 8.47× | | 1×1048576 | FP32/FP32 | 172.41 | 20.73 | 8.32× | | 2×65537 | BF16/BF16 | 11.76 | 7.77 | 1.51× | | 3×262145 | FP16/FP32 | 51.90 | 10.22 | 5.08× | ## 当前提交构建与功能验证(2026-11-03) 被测提交 **98723b368056f534db84332438b38240b8bd3ecd**,Ascend950 device 0、CANN 9.1.0、TTK 9a05ded0a5f7e95db860aa92efd2998e621a7ae9。独立源码副本由固定 base 加累计补丁生成,通过独立临时 Git index 重建得到的完整源码树,与已发布代码树完全一致;真实源码 index 未改动。 - **完整定向包构建通过**;100 个 LayerNormV4/norm_common 源码摘要构建前后相同。私有安装及关键头文件身份通过,安装包中无 BatchNormV3 源码目录。 - **冒烟 3/3、针对性 17/17、原 CSV 启用回归 68/68 通过**,精度、输入输出越界、tiling key、blockDim、workspace 校验均通过;用例集合完整且无重复。三组存在覆盖重叠,不计为88个独立场景。原 CSV 的 1 个禁用用例未执行。 - 迁移函数独立等价性复核通过;本轮两个修改文件 pre-commit、clang-format 18.1.8、OAT 1.0.3 通过。移除 BN 源码目录后的单 OPC 编译亦通过。 包 SHA256:e63e3d58daaffb8929c9b950acb4c0113fd7fcd70acdff576a2e355a44e4d8d8。验证记录:工作区 validation-runs/pr-13181-bn-direct-reuse-20261102/candidate-v6-validation/。 范围仅上述定向包与TTK Kernel NPU;本轮未新跑Host UT,未覆盖完整ci-local-check、Harness Full/静态DAG、A2 NPU或ACLNN端到端,未触发平台CI。 ## 关联的 Issue https://gitcode.com/cann/ops-nn/issues/7420 ## AI/Agent 生成声明 - [x] AI 辅助编写 See merge request: cann/ops-nn!13181 | 13 days ago | |
fix(lp_norm_reduce): improve fp32 integer power precision Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !13708 merge fix/lp-norm-reduce-fp32-power-20261105 into master fix(lp_norm_reduce): improve fp32 integer power precision Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 描述 FP32 输入在 p=16、shape=(1,1,131072)、axes=[1] 时,整数幂的连续舍入导致三方 RMSE 比为 7.033040637,超过原门槛 1.5。该用例归约长度为 1,问题位于幂计算。 为 FP32 有限 2 < p < 2147483647 的快速幂保留乘积舍入残差;用融合乘加恢复低位,随平方和相乘传递。高位乘积溢出时先缩放,再恢复量级,修复 p=3、x=6981463572480 本应得到有限 FP32 最大值却返回 Inf 的边界。补充 4 条小 shape ST,覆盖 p16 精度、p3 有限边界、实际溢出及 Inf/NaN。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8177 ## 测试 - 本地 CI(2026-11-05)受测提交 18fefffa5474d393f0265f23bfdfb511b894e9bc:指定统一入口的 pre-commit、隔离 OAT、Check_Example、Ascend 950 / A2 定向 package 和 Kernel UT 入口均通过。Kernel UT 入口未提供本算子的数值用例,不作为新增数值验证结论。先前的 ST/精度/性能结果对应 rebase 前 0cacc4f46ff6f493d8ee695fc3146f34ff43eb88;两个修改文件在 rebase 前后逐字节相同。本次 CI 未额外执行 TTK。 - 主线基点:7efcca69a7a049a0c488d9d39aeeae16559906fd;修复提交:18fefffa5474d393f0265f23bfdfb511b894e9bc。 - Ascend950PR_9579 / CANN 9.3.0 C25B114:定向预编译包构建及 host/source/binary 部署核验通过;源码 Kernel ST 18/18。 - 原始 671 的输入、FP64 真值和实际 GPU 输出哈希保持不变,连续 3 次严格 cross_check 通过;RMSE 比降至 0.953876791,仍使用原门槛 1.5;golden 未修改。 - 报告相同 C12B126 环境:修复逻辑的原始 671 回放 3/3、源码 ST 18/18 通过。 - 16 组整数幂边界、14 条已冻结相关幂用例及旧失败 590 三方回放通过。 - 报告中的 21 条标量选择失败单独定界为 TTK 输入标量物化造成的描述不一致:保留原形状传参后 21/21;原生 GEIR 代表用例 4/4。框架诊断补丁及兼容测例在任务验证目录保存,不改算子输出校验。 - 3 组定向性能:671、590 和 AR17/p16。按 GPU 1555 GB/s、NPU 1600 GB/s 折合,保守最低比值 0.15699,高于要求 0.1。NPU 采用任务现有 TTK 11 次运行、排除首轮后取中位数;GPU p16 使用报告相同的 native Torch pow,p2 使用已核对精度的 fullgraph 编译实现;GPU 两次测量取较小时延作保守折合。 - pre-commit(含 clang-format、OAT)与 git diff 检查通过。所有 TTK 显式 --pc=1,构建并行度不超过 8。 本次为失败复现与定向回归;没有将 689 条整轮或内存受限未执行项计作通过;本轮本地 CI 定向门禁通过。 ## 文档更新 无接口或公共文档变更。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13708 | 17 days ago | |
lp_norm_update和scatter_non_aliasing_add算子质量加固 Co-authored-by: ly_cann_coder<liyao152@huawei.com> # message auto-generated for no-merge-commit merge: !13541 merge dev_1103 into master lp_norm_update和scatter_non_aliasing_add算子质量加固 Created-by: ly_cann_coder Commit-by: ly_cann_coder Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> lp_norm_update和scatter_non_aliasing_add算子质量加固 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/8395 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13541 | 13 days ago | |
fix(lp_norm_update_v2): align tiling/golden semantics and document special values Co-authored-by: wuchengwen_oh<wuchengwen4@huawei.com> # message auto-generated for no-merge-commit merge: !13734 merge fix/lp-norm-update-v2-tbe-align-20261105 into master fix(lp_norm_update_v2): align tiling/golden semantics and document special values Created-by: wuchengwen_oh Commit-by: wuchengwen_oh Merged-by: cann-robot Description: ## 变更内容 ### Tiling / Kernel - 对齐 TBE 的 p/epsilon 分支语义:sqrt 判定使用 TBE 的 math.isclose 默认参数(rel_tol=1e-9, abs_tol=0);FP16 epsilon=0 不再提升到 1e-7。 - 兼容编码 ±2^31: - op-plugin 的 calculate_p 将 ord=±inf 分别编码为 float(INT_MAX) 和 float(INT_MIN);p 是 float32,INT_MAX 实际舍入为 2^31,INT_MIN 精确为 -2^31。 - TBE 的 lp_norm_update_v2_compute 对 ±inf、2147483647 和 -2147483648 都通过 math.isclose 判定为 identity 分支,返回 res=x,随后执行 vmaxs(res, epsilon)。 - 因此 kernel 增加 INT_SENTINEL_MAX/MIN,把 ±2^31 识别为 ±inf 并走恒等分支,避免外部 ±inf 兼容编码被当作普通有限 p 进入 pow 分支。 - 增加 shape 负维和元素数溢出校验;coreNum 改为 MulOverflow + CeilDiv(totalBits, MIN_TILING_BITS),避免 dim0 * minDtypeBits 溢出。 - 示例 GEIR 增加错误/资源处理:临时缓冲区释放、fopen/Session 空指针检查、失败路径 GEFinalize、输出不一致时返回失败。 ### Golden - 两份 Golden 统一为 torch 实现:pow 使用 torch.pow,sqrt 使用 torch.sqrt,epsilon 使用 torch.maximum;numpy 仅做输入输出转换。 - 两份 Golden 逐字一致(sha256 d638bf78...),统一使用 TTK 默认精度标准,不再自定义 tolerance。 - third_party 复用 _compute;x 在 __init__ 绑定,__call__ 只执行计算。 ### 文档与测试 - README 明确合法输入契约:x>=0;x=0 单独描述;负值、p=NaN、负 epsilon 等越界输入不保证。 - 补充英文 README,保持中英文约束一致。 - op_list 将 op_api 标记为不支持,与当前无 ACLNN 接口一致。 - 新增 p=NaN Tiling UT;Tiling UT 仅在 ascend950 编译,InferShape UT 保持通用;补充 Host Tiling UT。 ## 验证 - Host UT:默认构建仅 InferShape 5/5 PASS;--soc=ascend950 构建 Tiling 12 + InferShape 5,共 17/17 PASS。 - PR 9 个变更文件 pre-commit 通过(仅对变更文件执行,未跑全仓)。 - 最新 TTK 5b90935e: - L0 kernel regular 40/40 PASS - L0 GEIR const 40/40 PASS - L0 GEIR dynamic 40/40 PASS - 负值 x 10/10、epsilon 16/16、p=1e-40 2/2、p=NaN 3/3 PASS - L2 非 large 按预期拒绝/跳过,无 unexpected PASS - 两份 Golden 一致性:2688 例,0 mismatch。 - GEIR 示例 PASS(短工作目录 + ASCEND_RT_VISIBLE_DEVICES=4)。 ## 关联 Issue - https://gitcode.com/cann/ops-nn/issues/8409 - Fixes #8409 See merge request: cann/ops-nn!13734 | 12 days ago | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !13817 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 - Changed the product name. - Adjust the error code table and correct the value of rowspand. ## 关联的Issue none ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13817 | 13 days ago | |
docs: 修正 masked_softmax_with_rel_pos_bias 算子 aclnn 接口文档中 attenMaskOptional 可空性与 161001 错误码描述矛盾 Co-authored-by: aiteer<lujiale4@huawei.com> # message auto-generated for no-merge-commit merge: !13934 merge docs/masked-softmax-attenmask-nullable-issue7390 into master docs: 修正 masked_softmax_with_rel_pos_bias 算子 aclnn 接口文档中 attenMaskOptional 可空性与 161001 错误码描述矛盾 Created-by: aiteer Commit-by: aiteer Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修正 masked_softmax_with_rel_pos_bias 算子的 aclnn 接口文档,统一了中英文两个版本 aclnnMaskedSoftmaxWithRelPosBias.md / aclnnMaskedSoftmaxWithRelPosBias_en.md 中关于入参 attenMaskOptional 可空性的说明,使其与该接口的 161001(ACLNN_ERR_PARAM_NULLPTR)错误码描述保持一致,解决原文档中“允许为空”与“空指针会报错”之间的矛盾。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> [#7390](https://gitcode.com/cann/ops-nn/issues/7390) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 纯文档更新。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 更新了aclnnMaskedSoftmaxWithRelPosBias.md / aclnnMaskedSoftmaxWithRelPosBias_en.md文件。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13934 | 12 days ago | |
fix(multi_add_rms_norm_dynamic_quant): insert graph example TensorList at input zero Co-authored-by: qq_57796320<zhushuqin1@huawei.com> # message auto-generated for no-merge-commit merge: !13852 merge fix/multi-add-rms-norm-dynamic-quant-graph-example into master fix(multi_add_rms_norm_dynamic_quant): insert graph example TensorList at input zero Created-by: qq_57796320 Commit-by: qq_57796320 Merged-by: cann-robot Description: ## 描述 修复 MultiAddRmsNormDynamicQuant graph example 执行失败的问题。 算子原型将动态输入 x1 定义在第 0 个输入端口。原 example 使用 create_dynamic_input_x1 创建 TensorList,动态端口被追加到静态输入之后, 导致组图时的输入端口顺序与原型不一致,进而出现输出 shape 推导错误和 设备地址异常。 将创建方式改为 create_dynamic_input_byindex_x1(x1Num, 0),显式在第 0 个位置创建动态输入。同时增加 example 的输出检查,校验六个输出的 shape、dtype 和数值 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue 关联 Issue #8331:https://gitcode.com/cann/ops-nn/issues/8331 <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 在 Ascend950 环境下,使用原算子包运行 graph example。 - x1 TensorList 长度为 1、2、5 时,图执行均成功。 - 六个输出 y1、y2、x、y、scale1、scale2 的 shape、 dtype 和数值均通过 example 内的确定性参考检查。 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13852 | 15 days 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 | 18 days ago | |
feat(5162a): norm/quant 系算子注册适配 ascend5162 并整改 _apt 命名 Co-authored-by: wuxuening<wuxuening2@huawei.com> # message auto-generated for no-merge-commit merge: !13514 merge br_5162a_norm_quant into master feat(5162a): norm/quant 系算子注册适配 ascend5162 并整改 _apt 命名 Created-by: wuxuening Commit-by: wuxuening Merged-by: cann-robot Description: ## 描述 **1. batch_norm/layer_norm/ascend_quant/instance_norm/rms_norm 五算子注册适配 ascend5162**: - 5 个 def.cpp 追加 AddConfig("ascend5162", ...),复用 950 全量配置 - 5 个 CMakeLists 的 SUPPORT_COMPUTE_UNIT 追加 ascend5162,SUPPORT_TILING_DIR 追加 arch35 - cmake/func.cmake get_target_dir 追加 ascend5162 → arch35(UT 可收集 arch35 测试文件) - kernel 侧适配(instance_norm VL 派生搬出步长 32B 粒度、rms_norm VRegSize 动态化等) **2. ascend_quant 算子 _apt 后缀整改**(参照 chenqi317 检视意见): - ascend_quant_apt.cpp → ascend_quant.cpp(kernel 入口标准命名,参照 bnll/celu 等 523 个已完成整改的算子模式) - test_ascend_quant_apt.cpp → test_ascend_quant.cpp(UT 同步改名) - def.cpp opFile.value: "ascend_quant_apt" → "ascend_quant" - 修复 UT 版权头缺少 except(存量问题,OAT 通过) ## 测试 - pre-commit 全量 hook 通过(含 clang-format/codespell/OAT) ## 文档更新 无 See merge request: cann/ops-nn!13514 | 17 days 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 | 18 days 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 | 18 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days ago | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !13817 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 - Changed the product name. - Adjust the error code table and correct the value of rowspand. ## 关联的Issue none ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13817 | 13 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days 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 | 18 days 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 | 18 days 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 | 18 days ago | |
fix: resolve coding standard findings in norm operators Co-authored-by: rk<wangpengbo26@huawei.com> # message auto-generated for no-merge-commit merge: !12931 merge cpp_rule_2610 into master fix: resolve coding standard findings in norm operators Created-by: wangpengbo26 Commit-by: rk Merged-by: cann-robot Description: ## 描述 对 norm 系算子( add_rms_norm_hi_f4_quant、rms_norm_hi_f4_quant、batch_norm_grad_v3、rms_norm_dynamic_mx_quant)的编码规范问题进行整改,无功能逻辑变更。 ### 改动原因 编码规范检查发现以下问题: 1. kernel/tiling 代码中存在魔法数字(裸 2、16、8、32 及硬编码 sysRegLen_ = 256 等); 2. lambda 使用 [&] 隐式捕获,不符合显式捕获要求; 3. GetCompileInfo() 返回值转换使用 reinterpret_cast,应使用更安全的 static_cast。 ### 改动方法 1. **魔法数字具名化**: - add_rms_norm_hi_f4_quant / rms_norm_hi_f4_quant(arch92,两算子对称整改):新增具名常量 HIF4_MAX_PER4_ELEMENTS_PER_GROUP(16)、HIF4_MAX_PER8_ELEMENTS_PER_GROUP(8)、HIF4_TMP_SCALE_ELEMENTS_PER_GROUP(32)、HIF4_DEINTERLEAVE_REGISTERS_PER_LOAD(2) 替代 InitBuffer 中的裸数字;sysRegLen_ = 256 硬编码改为 VECTOR_LENGTH(由 platform::GetVRegSize() 派生);scaleRank - 2 改为 scaleRank - NUM_TWO。 - batch_norm_grad_v3:k / 2、copies *= 2、rows /= 2 等裸 2 改用 TWO 常量;rowsPerGroup_ 增长因子、终止行数改用具名常量(PACKED_GROUP_GROWTH_FACTOR、FINAL_REDUCTION_ROWS)。 2. **lambda 显式捕获**:batch_norm_grad_v3_tiling_infer.cpp 的 ubUsed 与 rms_norm_dynamic_mx_quant_full_load_tiling.cpp 的 getUbSize 由 [&] 隐式捕获改为显式捕获列表。 3. **类型转换规范**:两处 GetCompileInfo() 的 reinterpret_cast 改为 static_cast。 4. 日志长参数换行等格式调整,删除多余空行。 涉及文件(14 个,+60 -45): - norm/add_rms_norm_hi_f4_quant/op_host/op_tiling/arch92/add_rms_norm_hi_f4_quant_tiling_base.cpp(+5 -5) - norm/add_rms_norm_hi_f4_quant/op_kernel/arch92/add_rms_norm_hi_f4_quant_common.h(+7 -1) - norm/add_rms_norm_hi_f4_quant/op_kernel/arch92/add_rms_norm_hi_f4_quant_hif4_r_full_load.h(+6 -6) - norm/add_rms_norm_hi_f4_quant/op_kernel/arch92/add_rms_norm_hi_f4_quant_hif4_split_d.h(+6 -6) - norm/rms_norm_hi_f4_quant/ 对称 4 个文件(同模式整改) - norm/batch_norm_grad_v3/op_host/batch_norm_grad_v3_tiling_infer.cpp(+1 -1) - norm/batch_norm_grad_v3/op_host/batch_norm_grad_v3_tiling_ra_split_r.cpp(+3 -2) - norm/batch_norm_grad_v3/op_kernel/arch35/ 3 个 kernel 文件 - norm/rms_norm_dynamic_mx_quant/op_host/arch35/rms_norm_dynamic_mx_quant_full_load_tiling.cpp(+2 -1) ## 关联的Issue -https://gitcode.com/cann/ops-nn/issues/7767 ## 测试 编码规范整改,不涉及功能逻辑变更,无需测试。 ## 文档更新 不涉及 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:编码规范整改 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12931 | 22 days ago | |
fix issue Co-authored-by: liuyun_nj<liuyun90@h-partners.com> # message auto-generated for no-merge-commit merge: !13356 merge master into master fix issue Created-by: liuyun_nj Commit-by: liuyun_nj Merged-by: cann-robot Description: ## 描述 批量修复issue,主要改动点: AddLayerNorm tiling 中权重缓冲区不再乘 bufferNum:add_layer_norm_tiling.cpp 中 betaGammaBufSize、biasBufSize、ubCacheSize、singleRowBufSize、ubConstSlice、ubColNumSlice 等公式均去掉 * bufferNum,并在注释中说明 gamma/beta/bias 为常驻参数、只在 Process() 起始处加载一次并全核复用,不参与 CopyIn->Compute->CopyOut 轮转。 RmsNorm 增加非 regbase 平台的 rstd 元素数校验:在 CheckInputShape4RmsNorm 中,当 shape 全部已知时校验 rstd 元素数等于归一化行数 x.numel / gamma.numel,不满足则通过 OP_LOGE_FOR_INVALID_SHAPE_WITH_REASON 报错返回失败,防止内核按行写 rstd 造成越界写。 aclnnRmsNormQuant 的 scale 校验与错误码表达统一:将 scale 维度/长度及 x、y 形状相关的 OP_LOGE 替换为 OP_LOGE_FOR_INVALID_SHAPEDIM、OP_LOGE_FOR_INVALID_SHAPEDIM_WITH_REASON 等结构化错误宏,并把 scaleLength 的取值移入各平台分支内部。 x/y 前置维度一致性校验扩展到所有平台:DT_INT32 输出分支中 CheckShapeDimWithFrontN 不再仅在 regbase 生效;非 INT32 分支也新增了对 x、y 前置 n 维一致性的校验,不一致时报 "x shape should be the same as y shape"。 INT4 打包条件收紧与非 regbase 空 Tensor 空转:Int42Int32PackedTensor 仅在 yType == DT_INT4 且 y 的 dtype 为 DT_INT32 时执行;非 regbase 路径在 CheckParams 通过后若 x->IsEmpty(),直接返回 workspaceSize = 0 与 ACLNN_SUCCESS,不进入第二段计算。相应 UT 用例被替换为 scale 非法、x/y 前置维不匹配及空 Tensor 成功返回等新场景。 ## 关联的Issue [#7400](https://gitcode.com/cann/ops-nn/issues/7400) [#7401](https://gitcode.com/cann/ops-nn/issues/7401) [#7402](https://gitcode.com/cann/ops-nn/issues/7402) [#7403](https://gitcode.com/cann/ops-nn/issues/7403) [#7333](https://gitcode.com/cann/ops-nn/issues/7333) [#7213](https://gitcode.com/cann/ops-nn/issues/7213) [#7348](https://gitcode.com/cann/ops-nn/issues/7348) [#7405](https://gitcode.com/cann/ops-nn/issues/7405) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 aclnnGemmaRmsNorm.md aclnnGroupNorm.md aclnnRmsNormQuant.md ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13356 | 17 days 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 | 18 days ago | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !13817 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 - Changed the product name. - Adjust the error code table and correct the value of rowspand. ## 关联的Issue none ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13817 | 13 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days 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 | 18 days ago | |
修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Co-authored-by: liujing987913<liujing407@h-partners.com> # message auto-generated for no-merge-commit merge: !13766 merge master into master 修复 ops-nn 接口文档扫描问题(错别字/标点/多字,117处) Created-by: liujing987913 Commit-by: liujing987913 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> - 背景:大模型扫描发现 ops-nn 接口文档问题 117 处 - 修改分类:多字/中文多字 70、同音字 17、形近字 3、引号未成对 4、代码括号 2、术语拼写 2、字母顺序 2(文本替换 100 处);MD 结构 17 处(tab→空格 6、列表空行 9、连续空行 2) - 涉及文件:docs 目录下 85 个接口文档 md - 验证:git diff 确认为纯文本替换(100 处)+ 纯结构操作(17 处),无代码内容误改;已人工复核 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue [#8245](https://gitcode.com/cann/ops-nn/issues/8245) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 本次 PR 更新了 ops-nn 接口文档 85 个 md 文件,修正错别字/标点/多字 100 处、MD 结构 17 处,详见 diff。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!13766 | 16 days 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 | 18 days ago | |
docs: update English translations for markdown files Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !13600 merge docs/update-english-translations into master docs: update English translations for markdown files Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## 描述 英文译稿合入后的增量同步与链接更新,共39个文件(37改2删): 1. 增量翻译(8篇):hard_shrink、squared_relu、foreach_lerp_list、foreach_maximum_scalar_list、quant_matmul_reduce_sum、deep_norm、apply_centered_rms_prop、torch_extension,同步最新中文源文档的变更内容。 2. 删除2篇译稿:rotate_quant/tests/st/arch35、grouped(上游已删除对应中文源文件)。 3. 链接改写(31篇):指向本仓已有英文版文档的链接统一改写为 _en 版本(含CONTRIBUTING/SECURITY/README、24处贡献流程链接、fast_kernel_launch_example等),并将残留的中文链接文字(贡献流程/贡献指南/安全声明等)译为英文。 ## 关联的Issue 无 ## 测试 文档类变更,无需算子测试。已通过:全量1135篇译稿链接有效性校验(全部指向master已有文件);残留中文/全角标点扫描(仅存数学公式内源文件原文、无英文版目标文档的中文锚点等允许例外)。 ## 文档更新 更新37个英文译稿文件、删除2个(对应源文件已上游删除),不修改任何中文源文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!13600 | 18 days 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 | 18 days ago | |
Format update: Adjusted the license description format in all relevant files. Co-authored-by: jiangqi<jiangqi47@h-partners.com> # message auto-generated for no-merge-commit merge: !365 merge license5 into master Format update: Adjusted the license description format in all relevant files. Created-by: jiangqi2025 Commit-by: jiangqi Merged-by: turing_project1 Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #123--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!365 | 11 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 18 days ago | ||
| 13 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 18 days ago | ||
| 15 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 22 days ago | ||
| 18 days ago | ||
| 13 days ago | ||
| 17 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 22 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 13 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 17 days ago | ||
| 12 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 18 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 15 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 13 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 15 days ago | ||
| 15 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 15 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 15 days ago | ||
| 13 days ago | ||
| 17 days ago | ||
| 13 days ago | ||
| 12 days ago | ||
| 13 days ago | ||
| 12 days ago | ||
| 15 days ago | ||
| 18 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 13 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 22 days ago | ||
| 17 days ago | ||
| 18 days ago | ||
| 13 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 11 months ago |