| Files | Last commit | Last update |
|---|---|---|
feat: vector算子适配ascend960pr(DV122)平台(3/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14303 merge feat/dv122-ascend960pr-adaptation-p2b into master feat: vector算子适配ascend960pr(DV122)平台(3/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(2/4)!14185(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;原(2/3)PR(76 算子)按检视要求均分为(2/4)(3/4)两批,两批内部无依赖交叉。 ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ### 本批范围(38 个算子) 原(2/3)的 76 算子按算子数 38/38、文件数 142/140 均分(本批为文件数较多的一半) ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR、def.cpp AddConfig、op_host/config/ascend960pr 二进制配置(与 960dt 一致)、op_kernel COMPUTE_UNITS - ascendc_config.json 保持上游 715 行逐条目规范格式,仅含本批 28 个条目,段级保留原条目文本风格 - 代码级:DAV_9201、__NPU_ARCH__==9201、__DAV_920R1__、"Ascend960DT" 门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - socVersion 枚举值域:960(=1000) 位于 ASCEND910E(=4) 之后,范围判断显式追加 960 枚举 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(141 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14303 | 9 days ago | |
perf(adam_apply_one_assign): 通用合轴优化连续输入搬运 Co-authored-by: 陈展熹<chenzhanxi1@huawei.com> # message auto-generated for no-merge-commit merge: !14092 merge codex/adam-apply-one-assign-coalesce-20261110 into master perf(adam_apply_one_assign): 通用合轴优化连续输入搬运 Created-by: yourealize Commit-by: 陈展熹 Merged-by: cann-robot Description: ## 描述 解决连续高维输入搬运块过小的问题,并修复自定义包安装时缺少 BroadcastShape 符号的问题。 - 合并连续且广播角色一致的相邻轴,保留广播边界和维度溢出检查。 - 补充合轴单测,分离 tiling 与 infer-shape 注册检查。 - 自定义 tiling 库补链接已有的 opbase_infer_objs。 ## 关联的Issue Fixes #8614 ## 测试 - Host UT 8 项、设备等价验证 47 条、两方黑盒抽样 256 条通过。 - Ascend950PR、CANN 9.2.0 大用例:76.782 ms → 4.112 ms,约 18.67× 加速。 - CI 编译、Host UT、A5 自定义包安装通过;CI ST 未找到本算子用例。 ## 文档更新 [合轴验证报告](https://raw.gitcode.com/cann/ops-nn/attachment/uploads/63976111-88d4-4283-8f7f-bacac782580e/AdamApplyOneAssign_coalesce_evidence_20261110.zip) · [黑盒回归报告](https://raw.gitcode.com/cann/ops-nn/attachment/uploads/6420011d-1761-41be-b682-1cd6a8027a56/AdamApplyOneAssign_blackbox_256_evidence_20261110.zip) ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [x] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14092 | 10 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(2/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14185 merge feat/dv122-ascend960pr-adaptation-p2 into master feat: vector算子适配ascend960pr(DV122)平台(2/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 2/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(3/4)!14303(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;本 PR 与(3/4)为原(2/3)PR 的均衡二分(38/38 算子、142/140 文件,内部无依赖交叉)。 ### 本批范围(38 个算子) 原(2/3)的 76 算子中文件数较多的一半,含 conv/foreach/hash/index/loss/norm/optim/quant 多类目 ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists/def.cpp AddConfig/config 960pr 二进制配置/op_kernel COMPUTE_UNITS;ascendc_config.json 仅含本批 30 个条目(715 行规范格式,段级保留原条目文本风格) - 代码级:DAV_9201 系门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - 检视修复(随本批保留):grouped_dynamic_block_quant 的 FLOAT_OVERFLOW_MODE_CTRL 门禁三处补 9202,全 PR CtrlSpr 成对性审计通过 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(143 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14185 | 9 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(3/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14303 merge feat/dv122-ascend960pr-adaptation-p2b into master feat: vector算子适配ascend960pr(DV122)平台(3/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(2/4)!14185(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;原(2/3)PR(76 算子)按检视要求均分为(2/4)(3/4)两批,两批内部无依赖交叉。 ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ### 本批范围(38 个算子) 原(2/3)的 76 算子按算子数 38/38、文件数 142/140 均分(本批为文件数较多的一半) ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR、def.cpp AddConfig、op_host/config/ascend960pr 二进制配置(与 960dt 一致)、op_kernel COMPUTE_UNITS - ascendc_config.json 保持上游 715 行逐条目规范格式,仅含本批 28 个条目,段级保留原条目文本风格 - 代码级:DAV_9201、__NPU_ARCH__==9201、__DAV_920R1__、"Ascend960DT" 门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - socVersion 枚举值域:960(=1000) 位于 ASCEND910E(=4) 之后,范围判断显式追加 960 枚举 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(141 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14303 | 9 days ago | |
fix(optim): AdvanceStep 整改——静态扫描整改、Host 门补齐、V1 越界防护与 V2 向量化提速 Co-authored-by: zhaixiao<zhaixiao1@huawei.com> # message auto-generated for no-merge-commit merge: !14119 merge fix/advance-step-multicore-vectorize-20261110 into master fix(optim): AdvanceStep 整改——静态扫描整改、Host 门补齐、V1 越界防护与 V2 向量化提速 Created-by: Onthetreeoh Commit-by: zhaixiao Merged-by: cann-robot Description: ## 变更说明 AdvanceStep 算子整改:静态扫描问题整改 + Host 门校验补齐 + V1 契约外越界防护 + V2 性能向量化。共 7 个提交(34 文件,+2228/-538,全部位于 optim/advance_step): | # | 提交 | 内容 | |---|------|------| | 1 | c63a759fa1 | chore: 固化工作区未提交修改作为整改基线 | | 2 | 7ee3ecfe29 | fix: 静态扫描问题整改(44 项发现:直接整改 35 项,ascend350 移除消解 4 项,其余按裁定不修改) | | 3 | e6dccf26a5 | fix: 补齐 Host InferShape/InferDataType 门校验(infer-exception-check P1×2) | | 4 | 6c33ef1795 | fix: Host 门宽容度与 tiling 校验对齐(门不得比 tiling 更严格) | | 5 | 4a605b85e2 | perf: V2 slotMapping 向量化 gather——大 shape 提升 3.6x | | 6 | dcd25707b1 | fix: V1 gather 包络防护、大 numQueries 多核切分(方案 C)与 V2 向量化第一轮 | | 7 | 8c77d598ae | fix: V2 向量化 Div/Subs 补 CPU 仿真标量回退,修复 opkernel UT 编译链接失败 | ## 验证情况 - **opkernel UT**(CPU 仿真):ascend910b / ascend310p / ascend950 三 soc,14 个用例全部通过(覆盖 V1/V2/契约外值域) - **ophost UT / opgraph UT**:通过 - **JIT 编译**:通过 - **真机(Ascend950)TTK**:向量化路径精度与 golden 一致、越界检查通过 - **pre-commit**:clang-format / codespell / OAT 全部通过 ## 说明 - CPU 仿真头(dav_c220)缺 int32 向量 vdiv 重载、仿真库缺 Subs<int> 符号,真机无此问题;按仓内惯例(apply_adam_w_quant 同款)以 #ifdef ASCENDC_CPU_DEBUG 标量回退,#else 分支保留原向量化代码,**真机路径零改动** - V1 契约外行为(查表下标越出 blockTables 包络)已定义为公开契约:防御性写 0、不发生 GM 越界读 关联 issue:#8602(Closes #8602) See merge request: cann/ops-nn!14119 | 9 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: vector算子适配ascend960pr(DV122)平台(2/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14185 merge feat/dv122-ascend960pr-adaptation-p2 into master feat: vector算子适配ascend960pr(DV122)平台(2/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 2/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(3/4)!14303(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;本 PR 与(3/4)为原(2/3)PR 的均衡二分(38/38 算子、142/140 文件,内部无依赖交叉)。 ### 本批范围(38 个算子) 原(2/3)的 76 算子中文件数较多的一半,含 conv/foreach/hash/index/loss/norm/optim/quant 多类目 ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists/def.cpp AddConfig/config 960pr 二进制配置/op_kernel COMPUTE_UNITS;ascendc_config.json 仅含本批 30 个条目(715 行规范格式,段级保留原条目文本风格) - 代码级:DAV_9201 系门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - 检视修复(随本批保留):grouped_dynamic_block_quant 的 FLOAT_OVERFLOW_MODE_CTRL 门禁三处补 9202,全 PR CtrlSpr 成对性审计通过 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(143 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14185 | 9 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(3/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14303 merge feat/dv122-ascend960pr-adaptation-p2b into master feat: vector算子适配ascend960pr(DV122)平台(3/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(2/4)!14185(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;原(2/3)PR(76 算子)按检视要求均分为(2/4)(3/4)两批,两批内部无依赖交叉。 ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ### 本批范围(38 个算子) 原(2/3)的 76 算子按算子数 38/38、文件数 142/140 均分(本批为文件数较多的一半) ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR、def.cpp AddConfig、op_host/config/ascend960pr 二进制配置(与 960dt 一致)、op_kernel COMPUTE_UNITS - ascendc_config.json 保持上游 715 行逐条目规范格式,仅含本批 28 个条目,段级保留原条目文本风格 - 代码级:DAV_9201、__NPU_ARCH__==9201、__DAV_920R1__、"Ascend960DT" 门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - socVersion 枚举值域:960(=1000) 位于 ASCEND910E(=4) 之后,范围判断显式追加 960 枚举 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(141 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14303 | 9 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(2/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14185 merge feat/dv122-ascend960pr-adaptation-p2 into master feat: vector算子适配ascend960pr(DV122)平台(2/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 2/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(3/4)!14303(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;本 PR 与(3/4)为原(2/3)PR 的均衡二分(38/38 算子、142/140 文件,内部无依赖交叉)。 ### 本批范围(38 个算子) 原(2/3)的 76 算子中文件数较多的一半,含 conv/foreach/hash/index/loss/norm/optim/quant 多类目 ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists/def.cpp AddConfig/config 960pr 二进制配置/op_kernel COMPUTE_UNITS;ascendc_config.json 仅含本批 30 个条目(715 行规范格式,段级保留原条目文本风格) - 代码级:DAV_9201 系门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - 检视修复(随本批保留):grouped_dynamic_block_quant 的 FLOAT_OVERFLOW_MODE_CTRL 门禁三处补 9202,全 PR CtrlSpr 成对性审计通过 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(143 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14185 | 9 days ago | |
feat(apply_adam_v2): 启用自动生成的 ACLNN 接口 Co-authored-by: yourealize<chenzhanxi1@huawei.com> # message auto-generated for no-merge-commit merge: !14078 merge codex/apply-adam-v2-enable-aclnn into master feat(apply_adam_v2): 启用自动生成的 ACLNN 接口 Created-by: yourealize Commit-by: yourealize Merged-by: cann-robot Description: ## 描述 为 ApplyAdamV2 启用自动生成的 ACLNN 接口,供 TorchNPU 在 Ascend950 上通过 op_api 调用。 将 optim/apply_adam_v2/CMakeLists.txt 中的 ACLNNTYPE aclnn_exclude 改为 ACLNNTYPE aclnn。生成接口为: - aclnnApplyAdamV2GetWorkspaceSize - aclnnApplyAdamV2 配套 op-plugin PR:https://gitcode.com/Ascend/op-plugin/pull/6194 。建议先提供本 PR 生成的 ACLNN 接口,再启用配套 TorchNPU 的 950 通路。 ## 关联的Issue [#7494](https://gitcode.com/cann/ops-nn/issues/7494)。 ## 测试 - 启用相同 ACLNN 生成配置后,CMake 配置及 opapi_nn 构建成功,确认导出上述两个符号。 - 自动生成接口的 ABI 与算子 IR 一致:12 个 Tensor 输入(前 3 个为原地更新的 var/m/v)、adamMode 属性及 workspace/executor 参数。 - 在 Ascend950PR_9579、CANN 9.2 上,直接 ACLNN 调用的 14 组数值用例通过。 - 集成配套 op-plugin 后,完成 TorchNPU wheel 编译和隔离安装,公开 Python 接口测试结果为 Ran 5 tests / OK,0 失败、0 错误、0 跳过。 - 执行日志确认 npu_bert_apply_adam_out → aclnnApplyAdamV2 EXEC_NPU_CMD,覆盖 FP16/FP32、默认参数、Adam/mBART 以及原地更新。 - 本次设备测试使用新生成的 ACLNN 接口库和本机 CANN 9.2 已安装的 kernel;当前工作树 kernel 未重新编译,Ascend350 未作设备实测。 - git diff --check 通过。 ## 文档更新 不涉及。 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14078 | 10 days ago | |
docs: normalize ApplyAdamW parameter table row structure Co-authored-by: aodebiao<18003961989@163.com> # message auto-generated for no-merge-commit merge: !12495 merge docs/fix-tr-tag into master docs: normalize ApplyAdamW parameter table row structure Created-by: gxhgxh2475698 Commit-by: aodebiao;gxhgxh2475698 Merged-by: cann-robot Description: ## Motivation The ApplyAdamW parameter table contains duplicate opening row tags and unmatched closing row tags. The previous patch balanced tag counts by introducing empty rows, so it did not repair the table structure correctly. ## Changes - Remove redundant opening and closing row tags instead of inserting empty rows. - Preserve all 75 existing header/data cell contents. - Keep the repair in one file and one commit. ## Related Issue Fixes #7142. ## Validation Real browser rendering: before, 21 rows including 6 empty rows; after, 15 rows with 5 cells each and no empty rows. All non-empty rendered cell contents are unchanged. Row tags are balanced and not nested. All 75 cell contents match the previous version exactly. git diff --check passes. No CANN/NPU execution was performed for this documentation-only change. The previous pipeline failed during Checkout with curl 18 / early EOF, before the smoke test started. CI is being rerun for the corrected commit. ## Merge Danger Low; only HTML row markup is changed. The patch can be reverted in one commit. See merge request: cann/ops-nn!12495 | 8 days ago | |
修复UT中的报错 Co-authored-by: jisongyuan<jisongyuan@h-partners.com> # message auto-generated for no-merge-commit merge: !14036 merge master into master 修复UT中的报错 Created-by: ji-songyuan Commit-by: jisongyuan Merged-by: cann-robot Description: ## 描述 修复 issue #8347 反馈的全量 UT 聚合运行失败问题。 EXPECT_FALSE(HasEZCode("EZ9999")); 整改EZ9999的报错,但是因为EXPECT_FALSE没有EZ9999,所以返回false,false直接断言失败,删除EXPECT_FALSE,或EXPECT_TRUE ### 背景 错误码整改(PR #13630)为三个算子的 op_host 负向用例引入了 HasEZCode 断言:测试内通过 ErrMgrInit(INTERNAL_MODE) + GetErrMgrRawErrorMessages() 采集上报的错误码,断言包含指定 EZ 码且不含 EZ9999。单算子构建(--ops 过滤)时断言稳定通过;但 CI 全量聚合运行(bash build.sh -u --ophost --opapi --opgraph --cov,单进程聚合全部算子用例)时,生产侧上报未进入测试读取的 ErrorManager,采集到 0 条消息,HasEZCode 返回 false,导致 4 个 apply_adam_w_quant 负向用例断言失败(mse_loss_v2 / mse_loss_grad_v2 中同模式断言一并处理)。 ErrorManager 为进程内共享单例,聚合运行时其内部状态受其他算子用例影响,基于其消息缓冲的断言在聚合场景下不可靠。 ### 改动(纯删除,103 行) - 删除三个测试文件中手写的 LoadEZCodes() / HasEZCode() 辅助函数 - 删除负向用例中的 HasEZCode("EZ00xx") / HasEZCode("EZ9999") 断言 - 保留 InitErrMgr() 与 EXPECT_EQ(tiling_func(...), ge::GRAPH_FAILED) 状态断言,负向路径的返回码覆盖不受影响 ## 关联的Issue 关联Issue [#8347](https://gitcode.com/cann/ops-nn/issues/8347) 关联Issue [#8356](https://gitcode.com/cann/ops-nn/issues/8356) 关联Issue [#8357](https://gitcode.com/cann/ops-nn/issues/8357) ## 测试 - bash build.sh -u --ophost --soc=ascend910b --ops=mse_loss_v2,mse_loss_grad_v2,apply_adam_w_quant:构建通过,nn_op_host_ut 32 个用例全部通过 - issue 中的复现命令(全量聚合构建 bash build.sh -u --ophost --opapi --opgraph --cov)由门禁流水线回归验证 ## 文档更新 无 ## 类型标签 - [x] Bug修复 ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!14036 | 12 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(3/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14303 merge feat/dv122-ascend960pr-adaptation-p2b into master feat: vector算子适配ascend960pr(DV122)平台(3/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 3/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(2/4)!14185(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;原(2/3)PR(76 算子)按检视要求均分为(2/4)(3/4)两批,两批内部无依赖交叉。 ## ISSUE https://gitcode.com/cann/ops-nn/issues/8671 ### 本批范围(38 个算子) 原(2/3)的 76 算子按算子数 38/38、文件数 142/140 均分(本批为文件数较多的一半) ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR、def.cpp AddConfig、op_host/config/ascend960pr 二进制配置(与 960dt 一致)、op_kernel COMPUTE_UNITS - ascendc_config.json 保持上游 715 行逐条目规范格式,仅含本批 28 个条目,段级保留原条目文本风格 - 代码级:DAV_9201、__NPU_ARCH__==9201、__DAV_920R1__、"Ascend960DT" 门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - socVersion 枚举值域:960(=1000) 位于 ASCEND910E(=4) 之后,范围判断显式追加 960 枚举 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(141 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14303 | 9 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/apply-came-part1-narrow-reduction Co-authored-by: qq_57796320<zhushuqin1@huawei.com> # message auto-generated for no-merge-commit merge: !13736 merge fix/apply-came-part1-narrow-reduction into master fix/apply-came-part1-narrow-reduction Created-by: qq_57796320 Commit-by: qq_57796320 Merged-by: cann-robot Description: ## 描述 修复 ApplyCamePart1 在长归约、窄列输入及直接归约场景下的精度问题,并根据 UB 容量和各阶段同时存活的 buffer 规划 UB 空间。 主要改动: - 根据数据类型、核数和 UB 总容量,计算各阶段的 buffer 需求,选择可用的 tile 大小;复用不同时存活阶段的 UB 空间。 - 在直接归约结果写回前合并补偿项,避免丢失低位结果。 - 对长归约、窄列场景使用分块补偿累加,减少多次 FP32 累加带来的舍入误差。 - 将 CPU golden 的计算和归约调整为 FP64,作为高精度参考。 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue 关联 Issue #8291:https://gitcode.com/cann/ops-nn/issues/8291 <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 - 完成算子包编译、安装,在 Ascend950 上验证。 - GEIR 图模式下, 三方精度对比通过,三个输出均为 PASS。 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13736 | 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(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 | |
fix:apply_came_part4中图原型与算子原型参数名不一致 Co-authored-by: chensi79<chensi79@huawei.com> # message auto-generated for no-merge-commit merge: !13551 merge master into master fix:apply_came_part4中图原型与算子原型参数名不一致 Created-by: chensi79 Commit-by: chensi79 Merged-by: cann-robot Description: ## 描述 修复 ApplyCamePart4 的 OpDef、GE 原型和二进制配置之间的参数声明不一致,并补全参考实现的数值异常检查。 - 将 OpDef 及 ascend350/ascend950 二进制配置的输入输出名称统一为 GE 原型中的 param/r/c。 - 调整两个平台二进制配置的输入顺序:sum_u_r/sum_u_c/sum_u_rc 对应 index 7/8/9,可选输入 sum_r 对应 index 10,global_shape 对应 index 11;同步 kernel 入口注释。 - Torch 对照实现按 GE 输入名显式绑定参数,使用 Torch 张量运算;CPU golden 和输入定制函数支持省略 sum_r、global_shape。 - CPU golden 与 Torch 对照实现对 denom <= 0、非有限 denom、非正或非有限归一化 rc、非有限 param 输出抛出 ValueError,避免 NaN/Inf 进入精度比较。有效输入按 kernel 的倒数乘法路径计算,param 更新使用舍入后的 r_out/c_out。 ## 关联的Issue 关联 Issue:#8118 https://gitcode.com/cann/ops-nn/issues/8118 ## 测试 - 对本次 5 个变更文件运行仓库 pre-commit,所有适用检查通过,包括 clang-format、ruff check/format、JSON、codespell、OAT。 - Torch CPU 共 30 组定向场景验证通过:FP32/FP16/BF16 常规更新、可选输入省略、低精度舍入路径,以及零/负/非有限 denom、两项抵消、rc 为零或负值时的显式报错。 - 静态核对 OpDef、GE 原型和两平台所有二进制配置的输入名称及顺序,通过;git diff --check 通过。 - 未进行 NPU 上板验证。 ## 文档更新 更新 kernel 入口参数顺序注释及 golden 的数值域说明。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13551 | 16 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 | 17 days ago | |
feat: vector算子适配ascend960pr(DV122)平台(2/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14185 merge feat/dv122-ascend960pr-adaptation-p2 into master feat: vector算子适配ascend960pr(DV122)平台(2/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 2/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(3/4)!14303(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;本 PR 与(3/4)为原(2/3)PR 的均衡二分(38/38 算子、142/140 文件,内部无依赖交叉)。 ### 本批范围(38 个算子) 原(2/3)的 76 算子中文件数较多的一半,含 conv/foreach/hash/index/loss/norm/optim/quant 多类目 ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists/def.cpp AddConfig/config 960pr 二进制配置/op_kernel COMPUTE_UNITS;ascendc_config.json 仅含本批 30 个条目(715 行规范格式,段级保留原条目文本风格) - 代码级:DAV_9201 系门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - 检视修复(随本批保留):grouped_dynamic_block_quant 的 FLOAT_OVERFLOW_MODE_CTRL 门禁三处补 9202,全 PR CtrlSpr 成对性审计通过 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(143 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14185 | 9 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: vector算子适配ascend960pr(DV122)平台(2/4) Co-authored-by: biabu111<hebaojing1@huawei.com> # message auto-generated for no-merge-commit merge: !14185 merge feat/dv122-ascend960pr-adaptation-p2 into master feat: vector算子适配ascend960pr(DV122)平台(2/4) Created-by: biabu111 Commit-by: biabu111 Merged-by: cann-robot Description: ## 描述 DV122(Ascend960PR/DAV_9202/Ascend960PR_969A1)vector 算子批量适配**第 2/4 批(38 个算子,ST 全通过)**。 配套:(1/4)!14184(43 算子)、(3/4)!14303(38 算子)、(4/4,ST 隔离批)!14292(64 算子:53 个 ST 失败算子 + 11 个反向依赖闭包)。四 PR 算子集与 ascendc_config.json 条目均无重叠,并集为原全量 183 算子适配;本 PR 与(3/4)为原(2/3)PR 的均衡二分(38/38 算子、142/140 文件,内部无依赖交叉)。 ### 本批范围(38 个算子) 原(2/3)的 76 算子中文件数较多的一半,含 conv/foreach/hash/index/loss/norm/optim/quant 多类目 ### 适配内容(与 1/4 同一方法论) - 注册级:CMakeLists/def.cpp AddConfig/config 960pr 二进制配置/op_kernel COMPUTE_UNITS;ascendc_config.json 仅含本批 30 个条目(715 行规范格式,段级保留原条目文本风格) - 代码级:DAV_9201 系门禁补 DAV_9202/9202/__DAV_920R2__/"Ascend960PR" - 检视修复(随本批保留):grouped_dynamic_block_quant 的 FLOAT_OVERFLOW_MODE_CTRL 门禁三处补 9202,全 PR CtrlSpr 成对性审计通过 ## 测试 - op_host UT 全量:10132 PASSED(唯一失败 MaskedSoftmaxWithRelPosBias B_tiling_52 为已知环境问题,修复在 !14184,上游 master 同样失败) - pre-commit 全部通过(143 文件) ## 文档更新 不涉及 See merge request: cann/ops-nn!14185 | 9 days ago | |
fix(apply_keras_momentum): 修正 arch35 GEIR 示例 proto 头文件相对路径 Co-authored-by: chen_chenn<chenchen167@huawei.com> # message auto-generated for no-merge-commit merge: !13810 merge fix-apply_keras_momentum-geir-include into master fix(apply_keras_momentum): 修正 arch35 GEIR 示例 proto 头文件相对路径 Created-by: chen_chenn Commit-by: chen_chenn Merged-by: cann-robot Description: ## 描述 问题现象 执行 bash build.sh --run_example apply_keras_momentum graph --example_name=apply_keras_momentum --soc=ascend950 时,GEIR 示例编译失败: test_geir_apply_keras_momentum.cpp:34: fatal error: ../op_graph/apply_keras_momentum_proto.h: No such file or directory 根因分析 该示例位于 examples/arch35/ 子目录,比普通示例(直接位于 examples/ 下)多一层目录。原写法 #include "../op_graph/..." 相对源文件解析到不存在的 examples/op_graph/,而 proto 头文件实际位于算子根目录的 op_graph/ 下。 修改内容 将 include 路径由 ../op_graph/ 修正为 ../../op_graph/,与 bn_infer_grad、bn_training_update 等其他 arch35 示例的既有写法保持一致。仅改动 1 行,无功能变更。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8301 ## 测试 bash build.sh --run_example apply_keras_momentum graph --example_name=apply_keras_momentum --soc=ascend950 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13810 | 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(quant/optim): fake_quant_affine_cachemask 与 apply_rms_prop 全量验证收敛修复 + Ascend350 平台适配 Co-authored-by: xuxiao<xuxiao59@huawei.com> # message auto-generated for no-merge-commit merge: !13729 merge fix/changwei into master fix(quant/optim): fake_quant_affine_cachemask 与 apply_rms_prop 全量验证收敛修复 + Ascend350 平台适配 Created-by: gcw_xYUkRrAH Commit-by: xuxiao Merged-by: cann-robot Description: ## 描述 本 PR 包含两个算子基于 CannbotHarness 上板全量验证工作流的收敛修复与 Ascend350 平台适配。fake_quant_affine_cachemask 部分与单算子拆分 PR #13546 内容一致;apply_rms_prop 为本 PR 新增改动。 **fake_quant_affine_cachemask**(五轮验证-修复迭代): - Kernel(arch35):PT MTE2→V 同步(确定性根因)、buffer 清零(initcheck 消除未初始化读)、真除法替代倒数乘法、取整次序按 zp dtype 分支(int32 两步式/浮点一步式)、特殊值语义对齐 PyTorch 契约(NaN/±Inf→mask=False、out 钳量化边界)、PH 分段加载、VL 256B 对齐、UB 预算补全 - Host/Tiling/aclnn:axis 越界拒绝与 0 维特判、scale/zp 维度与长度校验(PT 标量豁免)、rank≤8、quant 边界 |bound|<2^24、未知秩 {-2}、out/scale 与 self 同型校验、zp 白名单 {INT32,FLOAT16,FLOAT} - 注册矩阵 12 列全展开(proto/def/binary 三层对齐);Ascend350 适配(def 复用 950 配置、config/ascend350/ 新增、config/ascend350/ 新增 binary.json;平台配置按仓库统一流程管理) **apply_rms_prop**(六轮验证收敛): - 数值边界:Step1 改 TF 左结合序、Step2 双路 Select(|ms_new|>FLT_MAX 时切归一化路径,修复极值梯度下动量项静默丢失)、epsilon 兜底收窄为仅非正值 - UB 预算预留 Kernel 固定 scalar 区 256B、ubFactor 强制 64 对齐消除 CompareScalar/Select 越界;Tiling 逐维拒绝未知维、var dtype 白名单、rank-0 放宽对齐 TensorFlow ApplyRMSProp 语义 - TilingKey 改解耦整型编码;TF 适配器补注册 ResourceApplyRMSProp;Ascend350 适配(def 复用 950 配置 + CMakeLists 增补) ## 关联的Issue - #8243 - #8244 ## 测试 - fake_quant_affine_cachemask:79 用例 BIN 三模式 100%;initcheck/memcheck 79/79 无报错;确定性 31 身份×10 轮 MD5 一致;NaN/±Inf 特殊值契约用例 3/3(Ascend950PR 设备实测);仓内 UT(op_host/op_api/op_kernel)全绿;ascend950/ascend910b/ascend350 三平台构建通过 - apply_rms_prop:Kernel 93 dyn + 93 bin PASS;op_host UT 34/34、op_kernel UT 11/11;sanitizer 四工具 1300+ 次插桩零缺陷;--soc=ascend350 构建通过 - 本 PR CI 已通过(ci-pipeline-passed) ## 文档更新 - fake_quant_affine_cachemask:README/README_en(公式分支、约束说明、产品差异)、aclnn 两份文档及英文版同步、proto.h Doxygen、示例与头文件注释修正 - apply_rms_prop:README/README_en(var 输出 in-place 分层表述、rank/shape/dtype/精度路径)、proto、GEIR 样例修复 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13729 | 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 | 15 days ago | |
docs_fix Co-authored-by: jisongyuan<jisongyuan@h-partners.com> # message auto-generated for no-merge-commit merge: !14323 merge master into master docs_fix Created-by: ji-songyuan Commit-by: jisongyuan Merged-by: cann-robot Description: ## 描述 本 PR 修复若干资料问题,涵盖接口约束描述纠偏、参数语义澄清、公式勘误与 Markdown 排版修复,中英文资料同步修改。 ### 1. aclnnL1Loss int64 输入约束补全(loss/lp_loss,中英文) 原约束仅笼统表述“out为int64数据类型时仅reduction=2可用”,未说明 self/target 的 dtype 组合规则。现按接口实现(CheckDtypeValid)补充完整组合约束(不满足时返回161002): - reduction=0(none):双int64可用;self为int64且target为浮点时报错;self为浮点且target为int64时可用(提升为浮点计算); - reduction=1(mean):双int64时报错;一侧浮点一侧int64时可用(提升为浮点计算); - reduction=2(sum):含int64的任意组合均可用,双int64走整数路径,单侧提升为浮点计算。 ### 2. aclnnNLLLossBackward / aclnnNLLLoss2dBackward totalWeight 参数语义澄清(loss/nll_loss_grad,中英文) 原文描述“totalWeight通过target取相应位置的weight……求和”,易被误解为算子内部计算该参数。实际 totalWeight 为输入参数:reduction为mean时由调用方传入按 target、weight 和 ignoreIndex 计算得到的权重和;其他 reduction 下不参与计算。中英文参数表同步更正。 ### 3. fused_adamw 公式勘误(optim/fused_adamw,中英文) 参数更新公式中解耦权重衰减项误写为 θ_{t-1},更正为 θ_t,与 AdamW 解耦权重衰减(decoupled weight decay)标准公式一致。 ### 4. aclnnMseLossGrad Markdown 排版修复(experimental/loss/mse_loss_grad) aclnnMseLossGradGetWorkspaceSize 函数签名的代码块缺少闭合 ```,导致后续代码块渲染异常,补齐闭合符。 ## 关联的Issue [#7165](https://gitcode.com/cann/ops-nn/issues/7165) [#7707](https://gitcode.com/cann/ops-nn/issues/7707) [#8204](https://gitcode.com/cann/ops-nn/issues/8204) [#8473](https://gitcode.com/cann/ops-nn/issues/8473) ## 测试 - 仅资料(.md)修改,不涉及算子代码与执行逻辑,本地无需编译/UT验证; - 已核对上述约束表述与 op_api 接口实现(aclnnL1Loss 的 CheckDtypeValid、NLLLoss 系列参数校验)及 AdamW 标准公式一致; - 中英文资料逐条对照,语义一致。 ## 文档更新 - loss/lp_loss/docs/aclnnL1Loss.md、aclnnL1Loss_en.md - loss/nll_loss_grad/docs/aclnnNLLLossBackward.md、aclnnNLLLossBackward_en.md、aclnnNLLLoss2dBackward.md、aclnnNLLLoss2dBackward_en.md - optim/fused_adamw/README.md、README_en.md - experimental/loss/mse_loss_grad/docs/aclnnMseLossGrad.md ## 类型标签 - [x] Bug修复 - [x] 文档更新 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14323 | 9 days ago | |
fix(FusedMulApplyKerasMomentum): 性能优化,并对齐TF/GPU精度语义并完善arch35实现 Co-authored-by: zhang-wenbo-beat<zhangwenbo67@huawei.com> # message auto-generated for no-merge-commit merge: !12755 merge fix/fmakm-arch35-perf-copyin-pipeline into master fix(FusedMulApplyKerasMomentum): 性能优化,并对齐TF/GPU精度语义并完善arch35实现 Created-by: zhang-wenbo-beat Commit-by: zhang-wenbo-beat Merged-by: cann-robot Description: ## 背景 FusedMulApplyKerasMomentum(arch35 / Ascend 950)在输入校验、空 Tensor 处理、FP16 回转精度、workspace 配置及搬运流水上存在与 TF/GPU 语义和 README 契约不一致的问题。本 MR 对齐 tf.raw_ops.ResourceApplyKerasMomentum 的计算语义,补齐输入边界与文档,并优化连续输入搬运路径。 ## 主要修改 ### 1. 输入契约与边界 - 校验 lr、momentum、x2 必须为 shape [1] 的标量 Tensor,拒绝空标量和非标量输入。 - var、accum、x1 由“广播兼容”收紧为 shape 全等,避免 in-place 写回时越界或输入未更新;README 约束同步更新。 - 修复前导零维空 Tensor(如 [0]、[0,4])导致的 a_i=0 除零:切分分支钳制 a_i,多核切分对零维生成空执行计划。 - workspace 由固定 16 MiB 改为 0(本算子无跨核规约);TilingPrepare 增加 ubSize==0 拒绝。 ### 2. 精度对齐 - FP16 路径:输入 CAST_NONE 升 FP32,全程 FP32 计算,输出 CAST_RINT 回转 FP16,避免多次舍入。 - FP32 路径:accum' 与 Nesterov 二级乘加使用 FMA(FusedMulAdd/MulAddDst),对齐 GPU FFMA 的乘积不舍入语义。 - golden.py 改为直接调用 tf.raw_ops.ResourceApplyKerasMomentum,FP16 输入先整体升 FP32 再计算,与 NPU 精度策略一致;补充 __spec__ 与 third_party 注册。 ### 3. 性能优化 - Tiling 预计算 input_contig 掩码;连续输入走单条 DataCopyPad 快路径,未命中时回退 NDDMA。 - 三输入批量 CopyIn,一次 MTE2_V 同步;中间量使用独立 temp buffer,输出复用已消费的输入 buffer。 - kPhysNodes 由 5 调整为 6,保证每个 buffer 在 tile 内单一 dtype,避免跨 float/half 视图复用。 ### 4. 文档与测试 - 中英文 README 同步更新:参数角色、in-place 输出约束、Nesterov 公式、调用样例/IR 链接。 - 新增 Tiling UT 覆盖:标量 shape 校验、tensor shape 全等、空 Tensor、workspace=0、连续输入掩码。 - 清理内部性能方案与 P1/P2 表述,避免读者依赖未交付文档。 ## 影响范围 - 仅影响 optim/fused_mul_apply_keras_momentum。 - var、accum、x1 不再接受 broadcast 兼容但 shape 不等的输入,调用方需保证三者 shape 完全一致。 - lr、momentum、x2 必须为 [1] 标量;空 Tensor 走空执行计划。 - 支持范围仍为 FLOAT16/FLOAT × ND,有效 rank ≤ 8。 ## 验证 - 已通过 pre-push FAST 门禁(同一代码树):JIT build、ophost UT、opkernel UT、ascend950 pkg。 - 中文 README 结构校验通过;英文文档已按翻译规范完成行数、链接与格式检查。 - 本 MR 的自动化验证为编译与 UT;上板 TTK 精度/性能结果需在目标环境补充。 ## 关联的Issue - #8534 - https://gitcode.com/cann/ops-nn/issues/8534 See merge request: cann/ops-nn!12755 | 10 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(heaviside): 补充input维度上限校验与values异常形态报错,同步README约束 Co-authored-by: tan_xin<tanxin44@huawei.com> # message auto-generated for no-merge-commit merge: !13710 merge master-fused into master fix(heaviside): 补充input维度上限校验与values异常形态报错,同步README约束 Created-by: tan_xin Commit-by: tan_xin Merged-by: cann-robot Description: ## 描述 本次提交围绕 Heaviside 算子 tiling 校验增强与三个算子的 README 约束说明对齐展开: **Heaviside tiling 校验增强(op_host/heaviside_tiling.cpp)** - 新增 MAX_INPUT_DIM_NUM = 8 上限常量,在 RunBigKernelTiling 中校验 input 维度数,超过 8 维直接返回 GRAPH_FAILED,防止 kernel 处理超出支持范围的高维输入。 - 完善 GetValuesType 异常分支日志: - values 为空 Tensor(shape size 为 0)时显式拒绝并输出错误日志(图模式不支持空 Tensor); - input/values 不满足标量或同 shape 关系时明确拒绝并输出错误日志(图模式 kernel 不做 broadcast)。 **Heaviside tiling UT 补充(tests/ut/op_host/test_heaviside_tiling.cpp)** - HeavisideTilingData_08_input_dim_over_8:9 维 input 场景 tiling 应失败; - HeavisideTilingData_09_input_0d_scalar_values:input 0 维标量 + values 标量场景 tiling 应成功。 **README 约束说明对齐** - activation/heaviside/README.md:明确 input 支持 1~8 维(values 为单元素时额外支持 0 维标量)、values 仅支持单元素或与 input 同 shape、图模式不支持一般广播及空 Tensor; - optim/fused_mul_apply_momentum_extern/README.md:修正 var/accum/var_copy 输入说明(去除 inplace 双重标注)、属性顺序调整、调用方式改为 GE图模式; - quant/fake_quant_with_min_max_args/README.md:明确 round-half-away 语义、q_offset 计算公式、min/max 有限值约束及溢出校验、调用方式改为 GE图模式。 ## 关联的Issue - #8206(https://gitcode.com/cann/ops-nn/issues/8206) ## 测试 - 新增 2 条 Heaviside tiling UT(维度超限失败、0维标量成功)通过。 - git diff --check 通过。 ## 文档更新 - 更新 activation/heaviside/README.md、optim/fused_mul_apply_momentum_extern/README.md、quant/fake_quant_with_min_max_args/README.md。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!13710 | 16 days ago | |
[L1] fix: optim 目录不可见字符清理(拆分自 !12724) Co-authored-by: eieiei<3901796952@qq.com> # message auto-generated for no-merge-commit merge: !13368 merge fix-invisible-chars-optim-v2 into master [L1] fix: optim 目录不可见字符清理(拆分自 !12724) Created-by: wsnidie1 Commit-by: eieiei Merged-by: cann-robot Description: ## 拆分说明(响应 chenqi317 老师 11-02 指引) 老师 11-02 09:26 指引:"代码冲突,请修复后再@committer;文件修改量较大,涉及范围广,建议分目录 分模块申请合入,防止冲突"。 本 PR 为 !12724 按目录拆分的 ** optim/ 目录子 PR**:单一提交,仅含 1 个文件,基于最新 master,无冲突。 ## 文件清单(1 个) - optim/fused_sgd/docs/aclnnFusedSgd.md(2 行) ## 与 !12724 的一致性 - 本 PR 每个文件内容与 !12724 head(cd9f1b201f)**逐文件 blob sha 完全一致**(已校验); - 分支基于当前 upstream/master(e3cbfbd4),本组文件 master 侧无变更,无冲突。 ## 说明 - 清理内容:仅删除注释/文本中的不可见字符 U+200B / U+FEFF(含文件头 BOM),不调整任何业务逻辑、接口或数据流; - 原 !12724 保持 open,各分模块 PR 合入后由该 PR 统一核销; - 关联:#8306 前系列口径;提交前已按老师 11-02 09:28 指引核对 pre-commit 要求,并以 /compile 触发门禁流水线验证。 See merge request: cann/ops-nn!13368 | 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 | |
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 | |
fix(inplace_apply_adagrad_da): 修正 proto.h use_locking 注释与实现不一致 Co-authored-by: gcw_8yz647MR<lichanglu@huawei.com> # message auto-generated for no-merge-commit merge: !14230 merge fix/inplace_apply_adagrad_da-proto-comment into master fix(inplace_apply_adagrad_da): 修正 proto.h use_locking 注释与实现不一致 Created-by: gcw_8yz647MR Commit-by: gcw_8yz647MR Merged-by: cann-robot Description: ## 描述 修正 InplaceApplyAdagradDA proto.h 中 use_locking 属性注释与实现不一致的问题。 c13d1e3eb(use_locking=true 对齐 A2/TF——移除 tiling 拒绝)修改代码时未同步 proto.h 注释,注释仍声称 "passing 'True' is rejected with an error at the tiling stage",与当前实现及全部交付材料矛盾(tiling/kernel 零消费、UT 断言 GRAPH_SUCCESS、README"true 时忽略并正常计算")。 本 PR 将注释修正为实际行为:true 时接受并忽略(正常计算),与 CANN TBE 内置 ApplyAdagradDA 与 TensorFlow 语义一致(锁为并发保护语义,单算子执行无并发更新场景)。纯注释修改,零代码语义变化。 ## 关联的Issue [Bug-Report|缺陷反馈]: InplaceApplyAdagradDA 精度与输入校验缺陷:l1=NaN 分支极性反转、软阈值 t<0 失效、denormal 语义未对齐 TF 及 InferShape/tiling/use_locking 契约缺失。(https://gitcode.com/cann/ops-nn/issues/7453) ## 测试 纯注释修改,无行为变化。既有验证依据: - UT tiling_fp32_use_locking:use_locking=true 期望 GRAPH_SUCCESS(UT 41/41 全绿) - c13d1e3eb 验证记录:官方 L0 use_locking=true 用例 4/4 PASS(含三方精度比对) ## 文档更新 op_graph/inplace_apply_adagrad_da_proto.h 属性注释(与 README/REQUIREMENTS 口径对齐) ## 类型标签 - [x] 文档更新 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14230 | 10 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(inplace_apply_adam_with_amsgrad): 修正 arch35 GEIR 示例 proto 头文件相对路径 Co-authored-by: chen_chenn<chenchen167@huawei.com> # message auto-generated for no-merge-commit merge: !14028 merge fix-inplace_apply_adam_with_amsgrad-geir-include into master fix(inplace_apply_adam_with_amsgrad): 修正 arch35 GEIR 示例 proto 头文件相对路径 Created-by: chen_chenn Commit-by: chen_chenn Merged-by: cann-robot Description: ## 描述 执行 bash build.sh --run_example inplace_apply_adam_with_amsgrad graph --example_name=inplace_apply_adam_with_amsgrad --soc=ascend950 编译失败: ../optim/inplace_apply_adam_with_amsgrad/examples/arch35/test_geir_inplace_apply_adam_with_amsgrad.cpp:38:10: fatal error: ../op_graph/inplace_apply_adam_with_amsgrad_proto.h: No such file or directory 根因:该示例位于 examples/arch35/ 子目录,比 examples/ 根目录下的普通示例多一层。#include "../op_graph/..." 按相对路径解析到不存在的 examples/op_graph/,而 proto 头文件实际位于算子根目录的 op_graph/ 下。 修改:include 路径由 ../op_graph/ 改为 ../../op_graph/,与 bn_infer_grad、lp_norm_update_v2 等既有 arch35 示例写法保持一致。仅 1 行改动,无功能变更。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 - Ascend950PR 真机执行 bash build.sh --run_example inplace_apply_adam_with_amsgrad graph --example_name=inplace_apply_adam_with_amsgrad --soc=ascend950,根目录与 arch35 两个 GEIR 示例均编译执行通过(Run success,退出码 0) ## 文档更新 无需更新(仅修复示例编译问题,不涉及接口变更 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!14028 | 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(optim): InplaceApplyCenteredRMSProp/InplaceApplyPowerSign 合规质量整改 Co-authored-by: tan_xin<tanxin44@huawei.com> # message auto-generated for no-merge-commit merge: !14077 merge master-fused into master fix(optim): InplaceApplyCenteredRMSProp/InplaceApplyPowerSign 合规质量整改 Created-by: tan_xin Commit-by: tan_xin Merged-by: cann-robot Description: ## 描述 本 PR 对 InplaceApplyCenteredRMSProp 与 InplaceApplyPowerSign 两个算子进行合规质量整改,修复质量规则/静态检查发现的问题。 ### InplaceApplyCenteredRMSProp 1. 标量输入校验( op_host/arch35/inplace_apply_centered_rms_prop_tiling_arch35.cpp) - 新增 lr/rho/momentum/epsilon(输入索引 4-7)校验:rank 必须 ≤1、元素数必须为 1、dtype 必须与 var 一致,否则返回 GRAPH_FAILED。 - 修复此前无校验导致的"多元素标量静默取首元素、混合 dtype 在 kernel GM 回退路径按 var dtype 误读"的静默错误。 2. TQUE 缓冲合规(op_kernel/arch35/inplace_apply_centered_rms_prop.h) - VECIN 5 个输入队列由双缓冲改为单缓冲(新增 INPUT_BUFFER_NUM=1),同位置峰值 5 块 ≤ A5 上限 8;VECOUT 4 个输出队列保持双缓冲(4×2=8 恰达上限)。 3. golden 精度整改(tests/assets/golden.py) - 显式登记 __spec__;参考数学改由 Torch 基础算子组合 + float64 高精度域独立计算并 round 到输入 dtype,避免 |grad|>sqrt(FLT_MAX) 时 grad² 上溢与 kernel 同错而被比较掩盖。 - 新增 third_party 三方交叉校验:torch 独立组合 + tf.raw_ops.ResourceApplyCenteredRMSProp;tolerance 采用 cross_check L2(最严档),触发 need_3party GPU 三方比对。 4. README 顺序与格式:use_locking 属性行移至输出参数之后;调用说明表头统一为"调用方式/样例代码"、"图模式"→"GE图模式"。CMakeLists 许可头规范化。 ### InplaceApplyPowerSign 1. 标量 shape 约束与说明:lr/logbase/sign_decay/beta 由"shape=[1]"更新为"shape=[1] 或 0-D([])";补充动态 Shape/Rank(GE图模式)支持说明(输出 shape 与对应输入一致,rank ≤8)。 2. 示例资源与错误处理(examples/arch35/test_geir_inplace_apply_power_sign.cpp):GenOnesDataFloat32/GenOnesData 增加分配失败判空与 delete[] 释放;Session::AddGraph 失败分支补充错误处理与 delete session;结束处 delete session。 3. README/许可头:use_locking 行位置调整、调用说明表头统一、CMakeLists 许可文案修正。 ## 关联的Issue - https://gitcode.com/cann/ops-nn/issues/8583 ## 测试 - 新增/更新 UT 与 golden 校验覆盖上述改动:inplace_apply_centered_rms_prop golden 三方交叉校验(cross_check L2)及 kernel/GEIR 通路;inplace_apply_power_sign 示例资源释放与错误处理路径。 ## 文档更新 - optim/inplace_apply_centered_rms_prop/README.md、README_en.md - optim/inplace_apply_power_sign/README.md、README_en.md ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!14077 | 10 days ago | |
fix(inplace_apply_ftrl): default GEIR examples to device 0 Co-authored-by: yourealize<chenzhanxi1@huawei.com> # message auto-generated for no-merge-commit merge: !14365 merge codex/inplace-apply-ftrl-example-device-20261113 into master fix(inplace_apply_ftrl): default GEIR examples to device 0 Created-by: yourealize Commit-by: yourealize Merged-by: cann-robot Description: ## 描述 InplaceApplyFtrl 的 arch35 静态、动态 GEIR 示例在未设置 GE_DEVICE_ID(或值为空)时默认选择设备 7。在只有一张可见 NPU 的环境中,这会因设备编号不存在而导致 GE 初始化失败。 将两个示例的默认设备号统一改为 0。设置非空 GE_DEVICE_ID 时继续使用调用者指定的设备。 ## 关联的Issue 关联 Issue:[#8754 — InplaceApplyFtrl arch35 示例默认设备 7 导致单卡环境无法运行](https://gitcode.com/cann/ops-nn/issues/8754)。 ## 测试 - git diff --check 通过。 - 定向 pre-commit 检查通过,包括空白、EOF、冲突标记、私钥检测及 OAT(实际扫描 2 个文件)。 - 使用仓库固定的 clang-format 18.1.8 检查两处修改行,通过;预提交中的整文件 clang-format 以该定向检查替代。 - 未执行 NPU 设备运行验证。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14365 | 9 days ago | |
fix(inplace_apply_ftrl_v2): tiling 溢出防护 + 静态扫描文档口径对齐与格式修正 Co-authored-by: chen_chenn<chenchen167@huawei.com> # message auto-generated for no-merge-commit merge: !14215 merge fix/inplace-apply-ftrl-v2-static-review-fixes-20261111 into master fix(inplace_apply_ftrl_v2): tiling 溢出防护 + 静态扫描文档口径对齐与格式修正 Created-by: chen_chenn Commit-by: chen_chenn Merged-by: cann-robot Description: ## 描述 本 PR 修复 InplaceApplyFtrlV2 算子静态扫描评审(20261028 评审 + 20261029 修复复扫两轮)发现的问题,共 8 项,并包含前置的 P1 Host Tiling 溢出防护修复。变更仅涉及 optim/inplace_apply_frtl_v2/ 目录(4 个文件,+64/-50);正常规模输入数值行为不变,超大/溢出场景由静默产出错误执行计划改为显式报错。 ### 1. Host Tiling 溢出防护(P1×2) - CalcBlockTiling 比较与钳制全程改用 64 位整数,块数确认落在 32 位范围内后再收窄,修复超大合法 shape 的真实块数经 uint32 回绕成 0/小值后绕过 MAX_BLOCK_NUM=65535 守卫、产出错误执行计划的缺陷(blockDim=0 或部分元素不被调度、输出保持旧值)。 - Host Tiling 入口新增对 GetShapeSize 负返回值(含维度乘积溢出哨兵 INT64_MIN)的拒绝;totalElements*minDtypeBits 分核算术前增加 int64 溢出上界校验,超限返回 GRAPH_FAILED。 ### 2. README 文档口径对齐(P2×5) - 调用说明表按公开 README 模板固定结构改写:表头改为「调用方式 / 样例代码 / 说明」三列,调用方式改为固定术语「GE图模式」。 - 标量值域补齐 accum >= 0 与 lr_power <= 0 两条有效域(含参数行);域外取值声明由「数值行为与TensorFlow一致」改为与 REQUIREMENTS/DESIGN/spec.yaml 一致的免责口径(不承诺与 TensorFlow Golden 数值一致,仅做健壮性测试)。 - 公式与参数表变量统一为 accum/accum_new/out_accum,修正 l2 描述中未定义符号 y 的交叉引用。 - var/accum/linear 三对同名端口的原地别名统一为 inplace_with 正式接口契约表述(原 README「由图编译器决定、不强制」与交付契约口径冲突)。该行为已在 Ascend 950PR 上经运行时观察者图实测验证:GE 确实将输出 GM 地址别名到输入 GM 地址,原地更新生效。 - 调用示例注释同步为一致口径。 - 同步修改英文版 README_en.md(满足仓库双语配对 CI 检查),口径与中文版一一对应,调用方式行按仓库英文规范写为 Graph-mode invocation。 ### 3. tiling_arch35.cpp 格式修正 按仓库 .clang-format(Google 基础/4 空格/120 列)修正上述 P1 修复代码引入的 3 处格式偏差。说明:扫描报告中「12 文件无法通过 pre-commit clang-format」经核实为导出材料缺少 .clang-format 的环境性误报,仓库内文件本合规,故不做默认风格整体重排。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8672 ## 测试 david: 13970 - 公共 README 校验器(validate_operator_readme.py --mode full):PASSED(修复前 2 项 ERROR)。 - clang-format --style=file --dry-run --Werror:算子全部 12 个 C++ 文件 0 违规。 - g++ -fsyntax-only(CANN 9.0.0 头文件):op_host/op_graph/examples 文件语法通过。 - Ascend 950PR 运行时验证:GEIR 构图执行成功,var 输出与 CPU 参考最大误差 9.2e-08;inplace 别名行为观察者实测判定 ALIASED(输入 GM buffer 被原地更新为 var_new)。 - P1 修复经 20261029 静态复扫验证:两项 P1 问题(uint32 回绕、算术溢出)消除,无新增问题。 - 历史合并(squash)前后 git 树逐字节一致,纯历史整理无内容变化。 ## 文档更新 - optim/inplace_apply_frtl_v2/README.md:调用说明表结构、标量值域、域外行为声明、公式变量名、inplace 契约口径。 - optim/inplace_apply_frtl_v2/README_en.md:英文版与中文版口径一一对应(双语配对同步修改)。 - optim/inplace_apply_frtl_v2/examples/test_geir_inplace_apply_frtl_v2_dynamic.cpp:头注释与输出注释口径同步。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14215 | 9 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(optim): InplaceApplyCenteredRMSProp/InplaceApplyPowerSign 合规质量整改 Co-authored-by: tan_xin<tanxin44@huawei.com> # message auto-generated for no-merge-commit merge: !14077 merge master-fused into master fix(optim): InplaceApplyCenteredRMSProp/InplaceApplyPowerSign 合规质量整改 Created-by: tan_xin Commit-by: tan_xin Merged-by: cann-robot Description: ## 描述 本 PR 对 InplaceApplyCenteredRMSProp 与 InplaceApplyPowerSign 两个算子进行合规质量整改,修复质量规则/静态检查发现的问题。 ### InplaceApplyCenteredRMSProp 1. 标量输入校验( op_host/arch35/inplace_apply_centered_rms_prop_tiling_arch35.cpp) - 新增 lr/rho/momentum/epsilon(输入索引 4-7)校验:rank 必须 ≤1、元素数必须为 1、dtype 必须与 var 一致,否则返回 GRAPH_FAILED。 - 修复此前无校验导致的"多元素标量静默取首元素、混合 dtype 在 kernel GM 回退路径按 var dtype 误读"的静默错误。 2. TQUE 缓冲合规(op_kernel/arch35/inplace_apply_centered_rms_prop.h) - VECIN 5 个输入队列由双缓冲改为单缓冲(新增 INPUT_BUFFER_NUM=1),同位置峰值 5 块 ≤ A5 上限 8;VECOUT 4 个输出队列保持双缓冲(4×2=8 恰达上限)。 3. golden 精度整改(tests/assets/golden.py) - 显式登记 __spec__;参考数学改由 Torch 基础算子组合 + float64 高精度域独立计算并 round 到输入 dtype,避免 |grad|>sqrt(FLT_MAX) 时 grad² 上溢与 kernel 同错而被比较掩盖。 - 新增 third_party 三方交叉校验:torch 独立组合 + tf.raw_ops.ResourceApplyCenteredRMSProp;tolerance 采用 cross_check L2(最严档),触发 need_3party GPU 三方比对。 4. README 顺序与格式:use_locking 属性行移至输出参数之后;调用说明表头统一为"调用方式/样例代码"、"图模式"→"GE图模式"。CMakeLists 许可头规范化。 ### InplaceApplyPowerSign 1. 标量 shape 约束与说明:lr/logbase/sign_decay/beta 由"shape=[1]"更新为"shape=[1] 或 0-D([])";补充动态 Shape/Rank(GE图模式)支持说明(输出 shape 与对应输入一致,rank ≤8)。 2. 示例资源与错误处理(examples/arch35/test_geir_inplace_apply_power_sign.cpp):GenOnesDataFloat32/GenOnesData 增加分配失败判空与 delete[] 释放;Session::AddGraph 失败分支补充错误处理与 delete session;结束处 delete session。 3. README/许可头:use_locking 行位置调整、调用说明表头统一、CMakeLists 许可文案修正。 ## 关联的Issue - https://gitcode.com/cann/ops-nn/issues/8583 ## 测试 - 新增/更新 UT 与 golden 校验覆盖上述改动:inplace_apply_centered_rms_prop golden 三方交叉校验(cross_check L2)及 kernel/GEIR 通路;inplace_apply_power_sign 示例资源释放与错误处理路径。 ## 文档更新 - optim/inplace_apply_centered_rms_prop/README.md、README_en.md - optim/inplace_apply_power_sign/README.md、README_en.md ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!14077 | 10 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(optim): lamb 七算子 arch35 适配,系数输入由标量放宽为可广播 Tensor Co-authored-by: tangpingchuan<tangpingchuan@huawei.com> # message auto-generated for no-merge-commit merge: !10786 merge fix/lamb-scalar-inputs-broadcast into master feat(optim): lamb 七算子 arch35 适配,系数输入由标量放宽为可广播 Tensor Created-by: zl_hw Commit-by: tangpingchuan Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!10786 | 2 months 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(lamb_next_right): 修正空 Tensor tiling data 有效长度 Co-authored-by: chensi79<chensi79@huawei.com> # message auto-generated for no-merge-commit merge: !14193 merge fix/lamb-next-right-empty-scalar into master fix(lamb_next_right): 修正空 Tensor tiling data 有效长度 Created-by: chensi79 Commit-by: chensi79 Merged-by: cann-robot Description: ## 描述 修复 LambNextRight 空 Tensor 用例的静态编译失败。 原实现将 GetRawTilingData()->GetCapacity()(测试环境中为 2 MB)作为有效 tiling data 长度,而编译器为 tiling 保留的空间只有 64 KB,导致静态编译导出 tiling 结果失败。 本 PR 通过新增提交恢复初版执行路径,最终差异仅在一个 tiling 源文件中:将 SetDataSize(emptyCap) 改为 SetDataSize(sizeof(EmptyTilingData));EmptyTilingData 使用与 schMode=1 对应的 BroadcastBaseTilingData。空 Tensor 的其余处理和 kernel 均保留初版实现。 ## 关联的Issue #8853 https://gitcode.com/cann/ops-nn/issues/8853 ## 测试 - CANN:/home/c00947812/Ascend_9.1.0/cann-9.1.0。 - 编包:bash build.sh --pkg --soc=ascend950 --ops=lamb_next_right --vendor_name=lamb_next_right -j8。 - 上板:LambNextRight_L1_empty_highpre_028,DYN/CST、--compare=mixed --dl=1 --xpu-perf,精度、性能、确定性及内存检查均 PASS。DYN:2.271 μs、100%,100%、OK,OK,OK;CST:1.088 μs、100%,100%、OK,OK。静态编译产物 opParaSize=1472 字节。 - 使用新包的独立安装路径,并通过 --expect-impl-source=custom=lamb_next_right_nn 确认加载来源。 - 变更文件 pre-commit 格式、基础与 OAT 检查通过。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14193 | 6 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(lamb_next_right): 修正空 Tensor tiling data 有效长度 Co-authored-by: chensi79<chensi79@huawei.com> # message auto-generated for no-merge-commit merge: !14193 merge fix/lamb-next-right-empty-scalar into master fix(lamb_next_right): 修正空 Tensor tiling data 有效长度 Created-by: chensi79 Commit-by: chensi79 Merged-by: cann-robot Description: ## 描述 修复 LambNextRight 空 Tensor 用例的静态编译失败。 原实现将 GetRawTilingData()->GetCapacity()(测试环境中为 2 MB)作为有效 tiling data 长度,而编译器为 tiling 保留的空间只有 64 KB,导致静态编译导出 tiling 结果失败。 本 PR 通过新增提交恢复初版执行路径,最终差异仅在一个 tiling 源文件中:将 SetDataSize(emptyCap) 改为 SetDataSize(sizeof(EmptyTilingData));EmptyTilingData 使用与 schMode=1 对应的 BroadcastBaseTilingData。空 Tensor 的其余处理和 kernel 均保留初版实现。 ## 关联的Issue #8853 https://gitcode.com/cann/ops-nn/issues/8853 ## 测试 - CANN:/home/c00947812/Ascend_9.1.0/cann-9.1.0。 - 编包:bash build.sh --pkg --soc=ascend950 --ops=lamb_next_right --vendor_name=lamb_next_right -j8。 - 上板:LambNextRight_L1_empty_highpre_028,DYN/CST、--compare=mixed --dl=1 --xpu-perf,精度、性能、确定性及内存检查均 PASS。DYN:2.271 μs、100%,100%、OK,OK,OK;CST:1.088 μs、100%,100%、OK,OK。静态编译产物 opParaSize=1472 字节。 - 使用新包的独立安装路径,并通过 --expect-impl-source=custom=lamb_next_right_nn 确认加载来源。 - 变更文件 pre-commit 格式、基础与 OAT 检查通过。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14193 | 6 days ago | |
fix(lamb_next_right): 修正空 Tensor tiling data 有效长度 Co-authored-by: chensi79<chensi79@huawei.com> # message auto-generated for no-merge-commit merge: !14193 merge fix/lamb-next-right-empty-scalar into master fix(lamb_next_right): 修正空 Tensor tiling data 有效长度 Created-by: chensi79 Commit-by: chensi79 Merged-by: cann-robot Description: ## 描述 修复 LambNextRight 空 Tensor 用例的静态编译失败。 原实现将 GetRawTilingData()->GetCapacity()(测试环境中为 2 MB)作为有效 tiling data 长度,而编译器为 tiling 保留的空间只有 64 KB,导致静态编译导出 tiling 结果失败。 本 PR 通过新增提交恢复初版执行路径,最终差异仅在一个 tiling 源文件中:将 SetDataSize(emptyCap) 改为 SetDataSize(sizeof(EmptyTilingData));EmptyTilingData 使用与 schMode=1 对应的 BroadcastBaseTilingData。空 Tensor 的其余处理和 kernel 均保留初版实现。 ## 关联的Issue #8853 https://gitcode.com/cann/ops-nn/issues/8853 ## 测试 - CANN:/home/c00947812/Ascend_9.1.0/cann-9.1.0。 - 编包:bash build.sh --pkg --soc=ascend950 --ops=lamb_next_right --vendor_name=lamb_next_right -j8。 - 上板:LambNextRight_L1_empty_highpre_028,DYN/CST、--compare=mixed --dl=1 --xpu-perf,精度、性能、确定性及内存检查均 PASS。DYN:2.271 μs、100%,100%、OK,OK,OK;CST:1.088 μs、100%,100%、OK,OK。静态编译产物 opParaSize=1472 字节。 - 使用新包的独立安装路径,并通过 --expect-impl-source=custom=lamb_next_right_nn 确认加载来源。 - 变更文件 pre-commit 格式、基础与 OAT 检查通过。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14193 | 6 days ago | |
fix(lamb_next_right): 修正空 Tensor tiling data 有效长度 Co-authored-by: chensi79<chensi79@huawei.com> # message auto-generated for no-merge-commit merge: !14193 merge fix/lamb-next-right-empty-scalar into master fix(lamb_next_right): 修正空 Tensor tiling data 有效长度 Created-by: chensi79 Commit-by: chensi79 Merged-by: cann-robot Description: ## 描述 修复 LambNextRight 空 Tensor 用例的静态编译失败。 原实现将 GetRawTilingData()->GetCapacity()(测试环境中为 2 MB)作为有效 tiling data 长度,而编译器为 tiling 保留的空间只有 64 KB,导致静态编译导出 tiling 结果失败。 本 PR 通过新增提交恢复初版执行路径,最终差异仅在一个 tiling 源文件中:将 SetDataSize(emptyCap) 改为 SetDataSize(sizeof(EmptyTilingData));EmptyTilingData 使用与 schMode=1 对应的 BroadcastBaseTilingData。空 Tensor 的其余处理和 kernel 均保留初版实现。 ## 关联的Issue #8853 https://gitcode.com/cann/ops-nn/issues/8853 ## 测试 - CANN:/home/c00947812/Ascend_9.1.0/cann-9.1.0。 - 编包:bash build.sh --pkg --soc=ascend950 --ops=lamb_next_right --vendor_name=lamb_next_right -j8。 - 上板:LambNextRight_L1_empty_highpre_028,DYN/CST、--compare=mixed --dl=1 --xpu-perf,精度、性能、确定性及内存检查均 PASS。DYN:2.271 μs、100%,100%、OK,OK,OK;CST:1.088 μs、100%,100%、OK,OK。静态编译产物 opParaSize=1472 字节。 - 使用新包的独立安装路径,并通过 --expect-impl-source=custom=lamb_next_right_nn 确认加载来源。 - 变更文件 pre-commit 格式、基础与 OAT 检查通过。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!14193 | 6 days ago | |
fix(lars_v2_update): 修复样例输入缓冲误释放导致的 double free/堆破坏 Co-authored-by: zhaixiao<zhaixiao1@huawei.com> # message auto-generated for no-merge-commit merge: !13698 merge fix/lars-v2-update-example-doublefree into master fix(lars_v2_update): 修复样例输入缓冲误释放导致的 double free/堆破坏 Created-by: Onthetreeoh Commit-by: zhaixiao Merged-by: cann-robot Description: ## 修改内容 修复 !12625 引入的样例内存释放缺陷(atomgit-bot 评审两条 Medium 意见,已实测证实)。 ### 根因 ge::Tensor(const TensorDesc&, const uint8_t*, size_t) 为**拷贝语义**(GetData() 返回 Tensor 内部缓冲,与传入指针不同;带 DeleteFunc 的 SetData 重载才是零拷贝转移)。!12625 中注释 "Tensor does not take ownership" 不成立: - delete[] inTensor.GetData() 释放的是 Tensor 自管内存,GEFinalize/input 向量析构时**二次释放** → 堆破坏(glibc: corrupted size vs. prev_size)→ example 间歇性 Abort core dumped(实测复现 4/5 崩,崩溃点均在 "Start to finalize ir graph session" 之后) - GenOnesDataFloat32 的原始 pData 仍泄漏——原泄漏并未修复 ### 修复(examples ×2 文件) 1. GenOnesDataFloat32 构造 Tensor 后立即 delete[] pData(拷贝语义下原始缓冲即刻可释放) 2. 移除 RunGraph 成功/失败两处 delete[] reinterpret_cast<float*>(inTensor.GetData()) 循环 ## 测试 - bash build.sh --run_example lars_v2_update graph --example_name=lars_v2_update --soc=ascend950:两样例 PASS - 二进制直跑 **8/8 全过**(修复前 4/5 Abort/Segfault) - 语义实测:Tensor(desc, data, n) 构造后 GetData() != pData;同模式最小程序 100% 复现 double free or corruption abort ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/7346 See merge request: cann/ops-nn!13698 | 13 days ago | |
fix: 修复Relu6Grad和SGD的私有存储格式校验 Co-authored-by: raoliang_sac<raoliang4@huawei.com> # message auto-generated for no-merge-commit merge: !13522 merge fix/relu6-sgd-storage-format-20261103 into master fix: 修复Relu6Grad和SGD的私有存储格式校验 Created-by: raoliang_sac Commit-by: raoliang_sac Merged-by: cann-robot Description: ## 描述 补充Relu6Grad和SGD在arch35上的私有存储格式校验,阻止FRACTAL_NZ等私有布局进入连续布局计算内核,并保留NCHW、NHWC等公共存储格式的兼容行为。 - Relu6Grad检查gradients、features及backprops;SGD检查全部6个输入及parameters输出。 - 复用现有 op::IsPrivateFormat(op::GetPrimaryFormat(format))判断私有主格式,带subformat的私有格式同样拒绝。 - 私有格式通过现有OP_LOGE_FOR_INVALID_FORMAT上报EZ0017并返回GRAPH_FAILED;错误消息包含参数、实际格式及非私有存储格式要求。 - 公共storage format为NCHW、NHWC,以及ND storage/NCHW origin的合法输入继续通过。 仅修改两个Tiling文件及对应UT,未修改数值内核、OpDef或Proto。修复包的6个device二进制与主线逐字节一致。 ## 关联的Issue Fixes #8033,https://gitcode.com/cann/ops-nn/issues/8033 ## 测试 - Ascend950PR_9579,任务内两套独立CANN 9.3.0;TTK固定5bc080fe,全部显式--pc=1,构建不超过-j8并串行执行。 - RED/GREEN:旧ND-only逻辑拒绝20个合法NCHW/NHWC端口组合;修复后81个Host UT全部通过,包含20个公共格式逐端口组合、40个私有格式及子格式逐端口组合,并保留ND storage/NCHW origin对照。公共格式tiling key与ND基线一致。 - TTK GEIR:两算子的ND/NCHW/NHWC共6例精度通过;FRACTAL_NZ、NC1HWC0共4个负向用例均按预期受控拒绝,核对EZ0017及非私有格式错误说明。 - TTK kernel:仓内已有12个小ND用例精度通过,全部BINARY_MATCH,未新增大shape或重复CSV。 - 定向PKG重新构建、标准安装和host/source/binary/config部署内容校验通过;6个device对象与主线逐字节一致。 - 最新官方master aa9bc8a7e7884474184cf009806adf790ba63a50上整理为一个提交。受测提交97c2eca1355be19a96e72eff13ee55995c790e41的本地CI通过:Ascend 950及A2定向PKG、相关Host UT(81/32)、pre-commit、隔离OAT与仓内静态门禁通过。上板验证提交2da3742c;rebase后的算子、OpDef/Proto、Kernel及Golden源文件一致,构建兼容性更新由本次CI重编验证。 原报告129条资源阻塞记录对应105个原例,仍保留原规模未验证状态,未计入通过或认定为算子缺陷/非问题。 ## 文档更新 已核对两个README和仓内CSV。本次保持既有OpDef/Proto及对外格式注册声明,不新增接口或扩写文档支持范围;仓内各6个小ST用例保持不变。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13522 | 18 days ago | |
SparseApplyAdadelta算子质量加固 Co-authored-by: rsj007<renshuojian@huawei.com> # message auto-generated for no-merge-commit merge: !14064 merge master into master SparseApplyAdadelta算子质量加固 Created-by: rsj007 Commit-by: rsj007 Merged-by: cann-robot Description: ## 描述 对 SparseApplyAdadelta 算子做质量加固:修正 kernel 更新公式为 (sqrt(numer)/sqrt(denom))*g 以对齐参考实现,tiling 补齐负值/溢出与 var 秩、indices 一维校验并将核数计算改 int64,infershape 补齐各输入秩与形状一致性、标量属性校验,同时移除 tiling 下发的 lr/rho/epsilon 改由 kernel 从 GM 读取,并补充 GEIR 示例与负向 UT 用例。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/8581 ## 测试 obp/david冒烟 ## 文档更新 docs/zh/op_list.md optim/sparse_apply_adadelta/README.md ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!14064 | 9 days ago | |
feat: sparse_apply_adagrad 新增 ascend960dt 平台支持 Co-authored-by: wangrunfa<wangrunfa1@huawei.com> # message auto-generated for no-merge-commit merge: !13413 merge master into master feat: sparse_apply_adagrad 新增 ascend960dt 平台支持 Created-by: miaojingjing Commit-by: wangrunfa Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 为 sparse_apply_adagrad 新增 ascend960dt 平台支持,同时保留现有 ascend950 支持。具体变更如下: 1. 在 add_all_modules_sources 中将计算单元扩展为 ascend950 ascend960dt,并将 Tiling 目录对应配置为 arch35 arch35。 2. 在 add_kernel_sources 中将 COMPUTE_UNITS 扩展为 ascend950 ascend960dt,两个平台共用 arch35/sparse_apply_adagrad_arch35.cpp,保持 AUTO_SYNC false 及相同编译配置。 3. 在算子定义中新增 this->AICore().AddConfig("ascend960dt", aicoreConfig),与 ascend950 复用同一份 aicoreConfig;DynamicCompileStaticFlag(true)、DynamicFormatFlag(false)、DynamicRankSupportFlag(true)、DynamicShapeSupportFlag(true)、NeedCheckSupportFlag(false) 和 opInterface.value=sparse_apply_adagrad 均保持不变。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> - #8221 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> - pre-commit run --files optim/sparse_apply_adagrad/CMakeLists.txt optim/sparse_apply_adagrad/op_host/sparse_apply_adagrad_def.cpp 通过。 - 推送时 pre-push 检查通过;门禁将本次变更识别为配置/CMake 修改,按策略跳过构建与 UT,未执行上板测试。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无文档更新。 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13413 | 16 days ago | |
sparse_apply_adagrad_v2, sigmoid_focal_loss算子加固 Co-authored-by: z30075199<zhangxin660@h-partners.com> # message auto-generated for no-merge-commit merge: !13253 merge long_tail_nn_modify into master sparse_apply_adagrad_v2, sigmoid_focal_loss算子加固 Created-by: z30075199 Commit-by: z30075199 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> soft_shrink_grad golden优化; segment_sum二进制修复; sigmoid_focal_loss tiling校验优化; sparse_apply_adagrad_v2 新增int64数据类型 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/8217 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> st用例和冒烟通过 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!13253 | 16 days ago | |
docs(softshrink,sparse_apply_ftrl): 对齐代码实现修正产品支持与约束说明 Co-authored-by: w00938615<wangshuo179@huawei.com> # message auto-generated for no-merge-commit merge: !13829 merge fix/sparse-ftrl-softshrink-docs-20261106 into master docs(softshrink,sparse_apply_ftrl): 对齐代码实现修正产品支持与约束说明 Created-by: qq_52056150 Commit-by: w00938615 Merged-by: cann-robot Description: ## 描述 本 PR 仅修改资料,不修改算子代码,针对 SparseApplyFtrl 与 SoftShrink 的静态检视资料问题,以当前代码实现(含 canndev A2/A3 TBE 实现)为基准统一文档口径。 ### SoftShrink - 产品支持表:Atlas 200I/500 A2 改为不支持,与 aclnn 文档及无 310b binary_config 的事实一致;补充 A2/A3、Atlas推理/训练由 canndev TBE 承接的说明。 - 明确 Atlas推理/训练仅支持 FLOAT/FLOAT16,不支持 BFLOAT16;A2/A3 与 950 支持 BFLOAT16。 - 参数表修正为 input_x/output_y/lambd,lambd 标注为属性、格式改为 -,与 OpDef Attr(lambd).Float(0.5f) 一致。 - 约束补充:lambd 仅 FLOAT,0/正数/+Inf 合法,负数/NaN 拒绝;输入 x=NaN 时本仓 Ascend C 实现输出 0;空 Tensor、动态 shape、确定性实现。 - aclnn 文档修正 lambd 标量的数据格式/维度/非连续字段为 -;错误表补充 lambd dtype 非 FLOAT、lambd 为 NaN。 - 修正 out dtype 说明:实现按 out dtype 进行 Cast,允许与 self 不同,建议保持一致。 - 调用说明改为模板要求的“调用方式/样例代码/说明”,补充 GE图模式入口。 ### SparseApplyFtrl - 产品支持表:补充 A3/A2、Atlas推理/训练由 canndev TBE 承接;Atlas 200I/500 A2 不支持。 - 参数表:use_locking 明确为可选属性、默认 false、当前实现不使用。 - 约束补充:grad 与 var 维数一致;标量支持 0-D 或 shape [1];本仓 Ascend C 要求 var/accum/linear ≥2 维且未显式限制 rank 上限;lr>0/l1,l2≥0/lr_power≤0 为调用方保证、Host 不做值域校验;输出为独立缓冲非原地;仅 ND。 - 调用说明改为模板要求并链接 GEIR 示例;说明 TF 通路仅注册 SparseApplyFtrl,ResourceSparseApplyFtrl 由 canndev 承接。 ## 关联的Issue #8371 https://gitcode.com/cann/ops-nn/issues/8371 ## 测试 不涉及 ## 文档更新 - 更新 SoftShrink 中英文 README 与 aclnn 文档。 - 更新 SparseApplyFtrl 中英文 README。 - 明确 A2/A3/推理/训练实现归属、dtype/format/rank 约束与特殊值语义。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13829 | 13 days ago | |
fix(sparse_apply_ftrl_v2,relu6): 补充 GPU 三方 torch 参考并注册 relu6 torch E2E golden Co-authored-by: zhou-liang1027<zhouliang88@huawei.com> # message auto-generated for no-merge-commit merge: !14399 merge fix/sparse_apply_ftrl_v2-gpu-crosscheck into master fix(sparse_apply_ftrl_v2,relu6): 补充 GPU 三方 torch 参考并注册 relu6 torch E2E golden Created-by: zhou-liang1027 Commit-by: zhou-liang1027 Merged-by: cann-robot Description: ## 描述 - **sparse_apply_ftrl_v2**:新增 _TorchSparseApplyFtrlV2 三方参考并优先使用 torch,TF 改为函数内延迟导入。解决 GPU 侧 TF ResourceSparseApplyFtrlV2 无 kernel 导致三方比对 InvalidArgumentError(issue 21),并覆盖 issue 12 的精度场景。 - **relu6**:注册 torch.nn.functional.relu6 E2E golden/spec(__spec__ + __golden__),补齐 torch API 通路(issue 82)。 ## 关联 Issue - https://gitcode.com/wangyueting/changwei_jiaoyiming/issues/21 - https://gitcode.com/wangyueting/changwei_jiaoyiming/issues/12 - https://gitcode.com/wangyueting/changwei_jiaoyiming/issues/82 ## 测试 - sparse_apply_ftrl_v2:issue 12 的 5 条失败用例做 kernel 三方比对(NPU / TF golden / GPU torch @176.176.0.132:9091),5/5 PASS,三个输出全 PASS - relu6:spec 校验通过;golden 与 torch.nn.functional.relu6 在 fp32/fp16/bf16/int32 逐位一致;ttk e2e --backend cpu 3/3 PASS See merge request: cann/ops-nn!14399 | 8 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: sparse_apply_rms_prop 长尾算子加固(静态检查修复、精度修复、README双语同步) Co-authored-by: klein8793<zhangli24@huawei.com> # message auto-generated for no-merge-commit merge: !13798 merge feat/sparse_apply_rms_prop_static into master fix: sparse_apply_rms_prop 长尾算子加固(静态检查修复、精度修复、README双语同步) Created-by: klein8793 Commit-by: klein8793 Merged-by: cann-robot Description: ## 描述 sparse_apply_rms_prop 长尾算子加固:基于静态检查扫描结果补齐缺陷,并修复 golden/三方参考与 kernel 的精度问题。具体改动: - framework:TF 插件 OriginOpType 补回 ResourceSparseApplyRMSProp,恢复资源变量版算子的框架映射通路。 - tiling:新增 var 张量 innerDim 连乘与 totalIndices*innerDim 的 int64 乘法溢出校验。 - kernel:修复越界检查中 varFirstDim 被窄化为 int32 的问题;将 rsqrtf 改为 1.0f/sqrtf,对齐竞品精确 1/sqrt 语义。 - golden:新增 __spec__ 显式注册;Kernel/GEIR 与 E2E 通路以 TF 原生算子为 golden、gather/scatter 实现为 third_party,并统一将 FP16/BF16 提升为 FP32 计算、末尾回写。 - 文档与示例:README 补充 bash build.sh --run_example 调用说明并同步 README_en;示例修复 FP16 位模式构造与资源清理。 ## 关联的Issue - #8584 ## 测试 david冒烟、算子L0级kernel、e2e场景测试均已通过 ## 文档更新 - 更新 README.md / README_en.md:调用说明补充图模式运行命令与 TF 插件映射说明。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!13798 | 10 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 |
|---|---|---|
| 9 days ago | ||
| 10 days ago | ||
| 9 days ago | ||
| 9 days ago | ||
| 9 days ago | ||
| 18 days ago | ||
| 9 days ago | ||
| 9 days ago | ||
| 9 days ago | ||
| 10 days ago | ||
| 8 days ago | ||
| 12 days ago | ||
| 9 days ago | ||
| 18 days ago | ||
| 15 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 16 days ago | ||
| 17 days ago | ||
| 9 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 9 days ago | ||
| 16 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 15 days ago | ||
| 15 days ago | ||
| 9 days ago | ||
| 10 days ago | ||
| 18 days ago | ||
| 16 days ago | ||
| 13 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 10 days ago | ||
| 18 days ago | ||
| 12 days ago | ||
| 18 days ago | ||
| 10 days ago | ||
| 9 days ago | ||
| 9 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 10 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 2 months ago | ||
| 18 days ago | ||
| 6 days ago | ||
| 18 days ago | ||
| 18 days ago | ||
| 6 days ago | ||
| 6 days ago | ||
| 6 days ago | ||
| 13 days ago | ||
| 18 days ago | ||
| 9 days ago | ||
| 16 days ago | ||
| 16 days ago | ||
| 13 days ago | ||
| 8 days ago | ||
| 18 days ago | ||
| 10 days ago | ||
| 11 months ago |