| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
fix(foreach_abs/asin/exp): arch35 tiling 校验补齐、空列表对齐与资料修正 Co-authored-by: zhang-wenbo-beat<zhangwenbo67@huawei.com> # message auto-generated for no-merge-commit merge: !12562 merge foreach-ops-fix into master fix(foreach_abs/asin/exp): arch35 tiling 校验补齐、空列表对齐与资料修正 Created-by: zhang-wenbo-beat Commit-by: zhang-wenbo-beat Merged-by: cann-robot Description: See merge request: cann/ops-nn!12562 | 30 天前 | |
feat: 长尾算子新增ascend350平台支持 Co-authored-by: onanfield<tianshang@huawei.com> # message auto-generated for no-merge-commit merge: !11839 merge ascend350-adapt-batch2 into master feat: 长尾算子新增ascend350平台支持 Created-by: onanfield Commit-by: onanfield Merged-by: cann-robot Description: ## 描述 9个算子新增ascend350平台支持(BNInference/BNInferGrad/Centralization/CosineEmbeddingLoss/DynamicQuantUpdateScatterV2/FakeQuantWithMinMaxArgs/ForeachAcos/ForeachCos/ForeachLerpList) ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11839 | 1 个月前 | |
index及foreach算子支持ascend960dt Co-authored-by: wang-shilong32<wangshilong23@huawei.com> # message auto-generated for no-merge-commit merge: !12244 merge feat/op960dt-4-index-foreach into master index及foreach算子支持ascend960dt Created-by: wang-shilong32 Commit-by: wang-shilong32 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> index及foreach算子支持ascend960dt: embedding/embedding_bag/embedding_dense_grad(_v2)/masked_scatter_with_position/foreach_add_list ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6872 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 冒烟测试,本地编译验证。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!12244 | 1 个月前 | |
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
feat(foreach): 9个非V2接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11956 merge feat/foreach-nonv2-noncontig-output into master feat(foreach): 9个非V2接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 9 个接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。其同目录的 V2 接口已在前一批次统一切换公共 helper 并支持非连续输出(!11928),本批补齐非 V2 接口。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAddScalar / AddcmulScalar / MaximumScalar / MinimumScalar / MulScalar / PowScalar / RoundOffNumber / SubList / SubScalar | 自动生成改手写:复用同目录 V2 l0op 桥接(OP_TYPE_REGISTER 不重复),新建手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude | - scalar(aclTensor*) 直接透传 V2 桥接,无需 ConvertToTensor - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - scalar dtype 校验按各算子 def.cpp 的 DtypeScalarToTensor2 映射(FLOAT16→FLOAT16、FLOAT/BFLOAT16→FLOAT32、整型→INT32;RoundOffNumber 的 roundMode 固定 INT8),与自动生成版行为一致 - CheckParams 含 CheckTensorListNotNull + list 长度一致性校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6681 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<9算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast(本批 + 已合入的 V2 批次回归):79 tests PASSED / 0 FAILED,其中本批 9 个新增非连续输入+非连续输出用例全部通过(六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 9 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11956 | 1 个月前 | |
feat:算子适配ascend350 Co-authored-by: wuyan<wuyan23@huawei.com> # message auto-generated for no-merge-commit merge: !12101 merge master into master feat:算子适配ascend350 Created-by: rrely11 Commit-by: wuyan Merged-by: cann-robot Description: ## 描述 本 PR 为以下算子适配 ascend350 平台:在 host 侧 *_def.cpp 中新增 ascend350 的 AICore 配置(复用 ascend950 的 RegBase/AICore 配置),并为新增平台补充 binary 配置: - foreach_add_scalar_list - foreach_div_scalar - arg_max_grad - batch_norm3_d_grad - inplace_apply_centered_rms_prop 主要改动: 1. 各算子 op_host/*_def.cpp 增加 this->AICore().AddConfig("ascend350", ...); 2. 各算子 op_host/CMakeLists.txt 与 op_kernel/CMakeLists.txt 的 COMPUTE_UNIT / SUPPORT_COMPUTE_UNIT、SUPPORT_TILING_DIR 增加 ascend350 arch35; 3. 新增 op_host/config/ascend350/*_binary.json(foreach_add_scalar_list、foreach_div_scalar、arg_max_grad、batch_norm3_d_grad); 4. scripts/kernel/binary_config/ascendc_config.json 更新 ForeachAddScalarList 的 compute_units,增加 ascend350; 5. 清理部分文件的尾随空白并补全文件末尾换行。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!12101 | 1 个月前 | |
feat(foreach): 五个算子支持Ascend960 Co-authored-by: yifangao<gaoyifan20@huawei.com> # message auto-generated for no-merge-commit merge: !11785 merge cann-out into master feat(foreach): 五个算子支持Ascend960 Created-by: yifangao Commit-by: yifangao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 以下五个算子适配Ascend960DT: - ForeachMulScalar - ForeachMulScalarList - ForeachNonFiniteCheckAndUnscale - ForeachNorm - ForeachSqrt ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6671 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Ascend960DT编译验证通过。 David冒烟:http://7.215.10.221/scheduler/alljobs?length=100&isalljobs=true&search=20261013_175845883 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11785 | 1 个月前 | |
[Fix] 长尾算子加固:ForeachDivList/ForeachAddcdivScalar 非法输入前置校验与 Ascend350(DVLite) 适配 Co-authored-by: wenqi_wu<wenqiwu0628@163.com> # message auto-generated for no-merge-commit merge: !12531 merge master into master [Fix] 长尾算子加固:ForeachDivList/ForeachAddcdivScalar 非法输入前置校验与 Ascend350(DVLite) 适配 Created-by: wenqi_wu Commit-by: wenqi_wu Merged-by: cann-robot Description: ## 描述 长尾算子加固:聚焦 foreach 族 ForeachDivList / ForeachAddcdivScalar,补齐非法输入前置校验、修复边界/截断问题,并同步完成 Ascend350(DVLite) 平台适配与资料用例更新(对齐同族适配模式,参考 PR#9834)。 **加固内容(ForeachDivList,6 个提交)** - 非法输入前置校验:arch35 tiling 新增 CheckTensorListInfo,校验 x2/y 列表长度、逐 Tensor rank/shape/dtype;y 形状校验放宽为元素数比较,兼容 0 维/单元素归一化差异;修复 tiling 守卫缺陷 - 边界/截断修复:maxTensorElements 全链路改 int64,消除单 Tensor >2^31 元素截断与错误核切分 - Ascend350(DVLite) 平台适配:op_host/op_kernel CMakeLists 增加 ascend350、def.cpp 注册、新增 config/ascend350 binary 配置、中央 ascendc_config.json 补充 ascend350 - 资料/示例:README 与 aclnnForeachDivList 补充动态标记语义与错误码;示例统一 cleanup 路径;数据脚本 compare_data 返回校验结果 **加固内容(ForeachAddcdivScalar,1 个提交)** - 非法输入前置校验:arch35 tiling 新增 CheckTensorListInfo 等——x1/x2/x3 与 y 列表长度一致、逐 Tensor rank<=8 且形状非负、dtype 一致、标量 dtype 匹配且元素数=1;提取 FOREACH_ADDCDIV_SCALAR_MAX_CORE_COUNT 常量替代魔数 - op_api 校验收紧:v1 收紧 scalar 支持 dtype 并新增元素数/format 校验;v2 补充输入/输出列表长度一致性检查,修正接口注释 - Ascend350(DVLite) 平台适配:同四件套(CMakeLists/def 注册/config/ascend350/中央配置) - 资料/用例:README、aclnnForeachAddcdivScalar(V2).md、examples 更新;补充 arch35 tiling UT 负例、ST executor/json 及数据脚本 ## 关联的Issue - #7192 https://gitcode.com/cann/ops-nn/issues/7192 ## 测试 - 静态检查:pre-commit 全部 hook 通过(trailing-whitespace/end-of-file/clang-format/ruff/codespell/OAT),共 38 个文件 - Kernel:ascend950/ascend350 构建通过;ForeachDivList 正例 3/3 PASS,列表长度/形状/dtype 负例在 tiling 阶段按预期拒绝;ForeachAddcdivScalar 新增 arch35 tiling 负例用例(负维度/out shape 不一致/0 维归一化) - GEIR:IR 原型修正(Three->Four inputs)与 kernel 注释对齐实现(scalar 从 scalar GM 输入读取),接口语义与 GEIR 校验一致 ## 文档更新 - ForeachDivList:README.md、docs/aclnnForeachDivList.md - ForeachAddcdivScalar:README.md、docs/aclnnForeachAddcdivScalar.md、docs/aclnnForeachAddcdivScalarV2.md ## 类型标签 - [x] 新特性 - [x] Bug修复 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12531 | 30 天前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11982 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Deleted the "Viewing the Source Code" section and the corresponding link at the beginning of the ACLNN MD description of foreach and norm. ## 关联的Issue [#6694](https://gitcode.com/cann/ops-nn/issues/6694) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11982 | 1 个月前 | |
feat(foreach): 五个算子支持Ascend960 Co-authored-by: yifangao<gaoyifan20@huawei.com> # message auto-generated for no-merge-commit merge: !11785 merge cann-out into master feat(foreach): 五个算子支持Ascend960 Created-by: yifangao Commit-by: yifangao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 以下五个算子适配Ascend960DT: - ForeachMulScalar - ForeachMulScalarList - ForeachNonFiniteCheckAndUnscale - ForeachNorm - ForeachSqrt ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6671 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Ascend960DT编译验证通过。 David冒烟:http://7.215.10.221/scheduler/alljobs?length=100&isalljobs=true&search=20261013_175845883 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11785 | 1 个月前 | |
feat(foreach): 9个非V2接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11956 merge feat/foreach-nonv2-noncontig-output into master feat(foreach): 9个非V2接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 9 个接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。其同目录的 V2 接口已在前一批次统一切换公共 helper 并支持非连续输出(!11928),本批补齐非 V2 接口。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAddScalar / AddcmulScalar / MaximumScalar / MinimumScalar / MulScalar / PowScalar / RoundOffNumber / SubList / SubScalar | 自动生成改手写:复用同目录 V2 l0op 桥接(OP_TYPE_REGISTER 不重复),新建手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude | - scalar(aclTensor*) 直接透传 V2 桥接,无需 ConvertToTensor - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - scalar dtype 校验按各算子 def.cpp 的 DtypeScalarToTensor2 映射(FLOAT16→FLOAT16、FLOAT/BFLOAT16→FLOAT32、整型→INT32;RoundOffNumber 的 roundMode 固定 INT8),与自动生成版行为一致 - CheckParams 含 CheckTensorListNotNull + list 长度一致性校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6681 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<9算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast(本批 + 已合入的 V2 批次回归):79 tests PASSED / 0 FAILED,其中本批 9 个新增非连续输入+非连续输出用例全部通过(六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 9 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11956 | 1 个月前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11982 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Deleted the "Viewing the Source Code" section and the corresponding link at the beginning of the ACLNN MD description of foreach and norm. ## 关联的Issue [#6694](https://gitcode.com/cann/ops-nn/issues/6694) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11982 | 1 个月前 | |
fix(foreach_abs/asin/exp): arch35 tiling 校验补齐、空列表对齐与资料修正 Co-authored-by: zhang-wenbo-beat<zhangwenbo67@huawei.com> # message auto-generated for no-merge-commit merge: !12562 merge foreach-ops-fix into master fix(foreach_abs/asin/exp): arch35 tiling 校验补齐、空列表对齐与资料修正 Created-by: zhang-wenbo-beat Commit-by: zhang-wenbo-beat Merged-by: cann-robot Description: See merge request: cann/ops-nn!12562 | 30 天前 | |
feat(foreach): Abs/Acos/Asin/Atan/Cos/Cosh 6个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11951 merge feat/foreach-unary-noncontig-1 into master feat(foreach): Abs/Acos/Asin/Atan/Cos/Cosh 6个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 6 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAbs / Acos / Asin / Atan / Cos / Cosh | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp(FLOAT16/FLOAT/BF16) - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<6算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:6 tests PASSED / 0 FAILED(6 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 6 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11951 | 1 个月前 | |
fix: 修复 MSELossV2/MultilabelMarginLoss arch35 规约精度, 规范化 4 算子 golden Co-authored-by: tangpingchuan<tangpingchuan@huawei.com> # message auto-generated for no-merge-commit merge: !11252 merge fix/arch35-4ops-round2 into master fix: 修复 MSELossV2/MultilabelMarginLoss arch35 规约精度, 规范化 4 算子 golden 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!11252 | 1 个月前 | |
foreach_copy算子支持ascend960dt Co-authored-by: zhang-wenbo-beat<zhangwenbo67@huawei.com> # message auto-generated for no-merge-commit merge: !12351 merge foreach_copy_960dt into master foreach_copy算子支持ascend960dt Created-by: zhang-wenbo-beat Commit-by: zhang-wenbo-beat Merged-by: cann-robot Description: ## 描述 foreach_copy 算子适配 ascend960dt(A6/dav_9201),沿用仓内既有 960dt 适配模式(参考 segment_sum/bucketize_v2、avg_pool 簇等已合入 PR): - op_host/foreach_copy_def.cpp:注册 ascend960dt,复用 ascend950 的 AICore 配置 - op_host/CMakeLists.txt:SUPPORT_COMPUTE_UNIT 增加 ascend960dt,SUPPORT_TILING_DIR 对应增加 arch22(tiling 为纯 host 代码,无架构差异) - op_host/config/ascend960dt/foreach_copy_binary.json:新增二进制配置(16 个 dtype 组合,内容与 ascend950 一致) - op_kernel/CMakeLists.txt:COMPUTE_UNITS 增加 ascend960dt - scripts/kernel/binary_config/ascendc_config.json:ForeachCopy 条目增加 ascend960dt 算子内核(op_kernel/foreach_copy.cpp)与 tiling(op_host/arch22/)均无 SOC 相关分支逻辑,无需代码改动。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/6872 ## 测试 - 新增/修改的 JSON 配置均通过格式校验 - 本地 pre-push 编译门禁因全新 worktree 需近全量构建、耗时过长已跳过(本次改动仅为芯片注册与配置,无代码逻辑变更),由远端 CI 门禁验证 ## 文档更新 无 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!12351 | 1 个月前 | |
feat: 长尾算子新增ascend350平台支持 Co-authored-by: onanfield<tianshang@huawei.com> # message auto-generated for no-merge-commit merge: !11839 merge ascend350-adapt-batch2 into master feat: 长尾算子新增ascend350平台支持 Created-by: onanfield Commit-by: onanfield Merged-by: cann-robot Description: ## 描述 9个算子新增ascend350平台支持(BNInference/BNInferGrad/Centralization/CosineEmbeddingLoss/DynamicQuantUpdateScatterV2/FakeQuantWithMinMaxArgs/ForeachAcos/ForeachCos/ForeachLerpList) ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11839 | 1 个月前 | |
feat(foreach): Abs/Acos/Asin/Atan/Cos/Cosh 6个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11951 merge feat/foreach-unary-noncontig-1 into master feat(foreach): Abs/Acos/Asin/Atan/Cos/Cosh 6个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 6 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAbs / Acos / Asin / Atan / Cos / Cosh | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp(FLOAT16/FLOAT/BF16) - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<6算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:6 tests PASSED / 0 FAILED(6 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 6 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11951 | 1 个月前 | |
[Fix] 长尾算子加固:ForeachDivList/ForeachAddcdivScalar 非法输入前置校验与 Ascend350(DVLite) 适配 Co-authored-by: wenqi_wu<wenqiwu0628@163.com> # message auto-generated for no-merge-commit merge: !12531 merge master into master [Fix] 长尾算子加固:ForeachDivList/ForeachAddcdivScalar 非法输入前置校验与 Ascend350(DVLite) 适配 Created-by: wenqi_wu Commit-by: wenqi_wu Merged-by: cann-robot Description: ## 描述 长尾算子加固:聚焦 foreach 族 ForeachDivList / ForeachAddcdivScalar,补齐非法输入前置校验、修复边界/截断问题,并同步完成 Ascend350(DVLite) 平台适配与资料用例更新(对齐同族适配模式,参考 PR#9834)。 **加固内容(ForeachDivList,6 个提交)** - 非法输入前置校验:arch35 tiling 新增 CheckTensorListInfo,校验 x2/y 列表长度、逐 Tensor rank/shape/dtype;y 形状校验放宽为元素数比较,兼容 0 维/单元素归一化差异;修复 tiling 守卫缺陷 - 边界/截断修复:maxTensorElements 全链路改 int64,消除单 Tensor >2^31 元素截断与错误核切分 - Ascend350(DVLite) 平台适配:op_host/op_kernel CMakeLists 增加 ascend350、def.cpp 注册、新增 config/ascend350 binary 配置、中央 ascendc_config.json 补充 ascend350 - 资料/示例:README 与 aclnnForeachDivList 补充动态标记语义与错误码;示例统一 cleanup 路径;数据脚本 compare_data 返回校验结果 **加固内容(ForeachAddcdivScalar,1 个提交)** - 非法输入前置校验:arch35 tiling 新增 CheckTensorListInfo 等——x1/x2/x3 与 y 列表长度一致、逐 Tensor rank<=8 且形状非负、dtype 一致、标量 dtype 匹配且元素数=1;提取 FOREACH_ADDCDIV_SCALAR_MAX_CORE_COUNT 常量替代魔数 - op_api 校验收紧:v1 收紧 scalar 支持 dtype 并新增元素数/format 校验;v2 补充输入/输出列表长度一致性检查,修正接口注释 - Ascend350(DVLite) 平台适配:同四件套(CMakeLists/def 注册/config/ascend350/中央配置) - 资料/用例:README、aclnnForeachAddcdivScalar(V2).md、examples 更新;补充 arch35 tiling UT 负例、ST executor/json 及数据脚本 ## 关联的Issue - #7192 https://gitcode.com/cann/ops-nn/issues/7192 ## 测试 - 静态检查:pre-commit 全部 hook 通过(trailing-whitespace/end-of-file/clang-format/ruff/codespell/OAT),共 38 个文件 - Kernel:ascend950/ascend350 构建通过;ForeachDivList 正例 3/3 PASS,列表长度/形状/dtype 负例在 tiling 阶段按预期拒绝;ForeachAddcdivScalar 新增 arch35 tiling 负例用例(负维度/out shape 不一致/0 维归一化) - GEIR:IR 原型修正(Three->Four inputs)与 kernel 注释对齐实现(scalar 从 scalar GM 输入读取),接口语义与 GEIR 校验一致 ## 文档更新 - ForeachDivList:README.md、docs/aclnnForeachDivList.md - ForeachAddcdivScalar:README.md、docs/aclnnForeachAddcdivScalar.md、docs/aclnnForeachAddcdivScalarV2.md ## 类型标签 - [x] 新特性 - [x] Bug修复 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12531 | 30 天前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11601 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 1. Modified foreach_copy to support A3. 2. Optimized the description of the x1 parameter in the README.md file of the foreach_div_list_inplace operator. 3. Optimized the parameter description in the *.md file of add_layer_norm_quant. 4. Changed the parameter outputMaskOptional in aclnnAddRmsNormDynamicQuantV2.md to outputMask. 5. Modified aclnnFastBatchNormBackward.md to support A3. 6. Modified the data type constraints of the output parameter y in aclnnRmsNormQuant.md. ## 关联的Issue [#6412](https://gitcode.com/cann/ops-nn/issues/6412) [#6427](https://gitcode.com/cann/ops-nn/issues/6427) [#6416](https://gitcode.com/cann/ops-nn/issues/6416) [#6363](https://gitcode.com/cann/ops-nn/issues/6363) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11601 | 1 个月前 | |
feat:算子适配ascend350 Co-authored-by: wuyan<wuyan23@huawei.com> # message auto-generated for no-merge-commit merge: !12101 merge master into master feat:算子适配ascend350 Created-by: rrely11 Commit-by: wuyan Merged-by: cann-robot Description: ## 描述 本 PR 为以下算子适配 ascend350 平台:在 host 侧 *_def.cpp 中新增 ascend350 的 AICore 配置(复用 ascend950 的 RegBase/AICore 配置),并为新增平台补充 binary 配置: - foreach_add_scalar_list - foreach_div_scalar - arg_max_grad - batch_norm3_d_grad - inplace_apply_centered_rms_prop 主要改动: 1. 各算子 op_host/*_def.cpp 增加 this->AICore().AddConfig("ascend350", ...); 2. 各算子 op_host/CMakeLists.txt 与 op_kernel/CMakeLists.txt 的 COMPUTE_UNIT / SUPPORT_COMPUTE_UNIT、SUPPORT_TILING_DIR 增加 ascend350 arch35; 3. 新增 op_host/config/ascend350/*_binary.json(foreach_add_scalar_list、foreach_div_scalar、arg_max_grad、batch_norm3_d_grad); 4. scripts/kernel/binary_config/ascendc_config.json 更新 ForeachAddScalarList 的 compute_units,增加 ascend350; 5. 清理部分文件的尾随空白并补全文件末尾换行。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!12101 | 1 个月前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11982 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Deleted the "Viewing the Source Code" section and the corresponding link at the beginning of the ACLNN MD description of foreach and norm. ## 关联的Issue [#6694](https://gitcode.com/cann/ops-nn/issues/6694) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11982 | 1 个月前 | |
feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11964 merge feat/foreach-unary-noncontig-3 into master feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 6 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 3 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachErf / Erfc / Exp / Expm1 / Log / Log10 | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Erf/Erfc/Log/Log10 为 FLOAT16/FLOAT/BF16;Exp/Expm1 支持 FLOAT16/FLOAT/BF16/INT16/INT8/UINT8,且整型输入按 def 定义映射为 FLOAT32 输出(CheckDtypeValid 按映射后的期望输出 dtype 校验,与自动生成版行为一致) - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<6算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:6 tests PASSED / 0 FAILED(6 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log/log10 用正值域) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 6 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11964 | 1 个月前 | |
feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11964 merge feat/foreach-unary-noncontig-3 into master feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 6 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 3 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachErf / Erfc / Exp / Expm1 / Log / Log10 | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Erf/Erfc/Log/Log10 为 FLOAT16/FLOAT/BF16;Exp/Expm1 支持 FLOAT16/FLOAT/BF16/INT16/INT8/UINT8,且整型输入按 def 定义映射为 FLOAT32 输出(CheckDtypeValid 按映射后的期望输出 dtype 校验,与自动生成版行为一致) - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<6算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:6 tests PASSED / 0 FAILED(6 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log/log10 用正值域) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 6 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11964 | 1 个月前 | |
fix(foreach_abs/asin/exp): arch35 tiling 校验补齐、空列表对齐与资料修正 Co-authored-by: zhang-wenbo-beat<zhangwenbo67@huawei.com> # message auto-generated for no-merge-commit merge: !12562 merge foreach-ops-fix into master fix(foreach_abs/asin/exp): arch35 tiling 校验补齐、空列表对齐与资料修正 Created-by: zhang-wenbo-beat Commit-by: zhang-wenbo-beat Merged-by: cann-robot Description: See merge request: cann/ops-nn!12562 | 30 天前 | |
feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11964 merge feat/foreach-unary-noncontig-3 into master feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 6 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 3 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachErf / Erfc / Exp / Expm1 / Log / Log10 | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Erf/Erfc/Log/Log10 为 FLOAT16/FLOAT/BF16;Exp/Expm1 支持 FLOAT16/FLOAT/BF16/INT16/INT8/UINT8,且整型输入按 def 定义映射为 FLOAT32 输出(CheckDtypeValid 按映射后的期望输出 dtype 校验,与自动生成版行为一致) - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<6算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:6 tests PASSED / 0 FAILED(6 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log/log10 用正值域) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 6 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11964 | 1 个月前 | |
foreach部分算子支持非连续输出 Co-authored-by: ly_cann_coder<liyao152@huawei.com> # message auto-generated for no-merge-commit merge: !12608 merge dev_foreach into master foreach部分算子支持非连续输出 Created-by: ly_cann_coder Commit-by: ly_cann_coder Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> foreach_minimum_scalar_list和foreach_pow_scalar_and_tensor支持非连续输出 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/7287 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!12608 | 27 天前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11982 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Deleted the "Viewing the Source Code" section and the corresponding link at the beginning of the ACLNN MD description of foreach and norm. ## 关联的Issue [#6694](https://gitcode.com/cann/ops-nn/issues/6694) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11982 | 1 个月前 | |
feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11964 merge feat/foreach-unary-noncontig-3 into master feat(foreach): Erf/Erfc/Exp/Expm1/Log/Log10 6个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 6 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 3 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachErf / Erfc / Exp / Expm1 / Log / Log10 | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Erf/Erfc/Log/Log10 为 FLOAT16/FLOAT/BF16;Exp/Expm1 支持 FLOAT16/FLOAT/BF16/INT16/INT8/UINT8,且整型输入按 def 定义映射为 FLOAT32 输出(CheckDtypeValid 按映射后的期望输出 dtype 校验,与自动生成版行为一致) - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<6算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:6 tests PASSED / 0 FAILED(6 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log/log10 用正值域) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 6 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11964 | 1 个月前 | |
[Fix] 长尾算子加固:ForeachLog10/ForeachMinimumScalar/ForeachReciprocal/ForeachSubScalarList 非法输入校验与 Ascend350(DVLite) 适配 - ForeachLog10:修复 membase 内核 Log10 就地复用违反 API 校验(TensorReuseLoopCheck)的既存问题——float/half 改为非就地计算(输入/输出队列分离,bufferNum=1 保持 UB 占用与原地版本一致),bf16 在 float 缓冲内 cast 后非就地计算;同时激活 3 个内核用例的 ICPU_RUN_KF 与结果断言,全部通过 - ForeachLog10 / ForeachReciprocal:arch35 tiling 接入公共 foreach_flat_regbase_validator(ValidateHomogeneous 输入/输出契约校验),补充 ubSize > DCACHE_SIZE 检查 - ForeachMinimumScalar:arch35 tiling 新增 tensorNum 上限、scalar 元素数/rank 校验;空 TensorList 以单核成功收口(HandleEmptyTensorList);op_api v2 校验补齐 - ForeachSubScalarList:arch35 tiling 新增 CheckTensorListAndScalars(x 列表长度上限、逐 Tensor rank<=8、形状非负、dtype 一致、标量 dtype 匹配),补齐 arch35 tiling UT 负例 - 平台适配:4 算子补齐 Ascend350(DVLite) 四件套(op_host/op_kernel CMakeLists、def.cpp 注册、新增 config/ascend350 二进制配置);中央 ascendc_config.json 按全局配置规范不在本 PR 修改 - 资料与用例:README/aclnn 文档、examples、ST/UT 用例及数据脚本同步更新;行尾空白/EOF 格式清理 - 检视意见响应(atomgit-bot):ForeachMinimumScalar 空列表/主路径的 ubSize-DCACHE_SIZE 下溢保护;ForeachMinimumScalar/ForeachSubScalarList 数据比对脚本改为非零退出码 - 检视意见响应(fanqirui):ForeachLog10 填充循环前恢复列表上限显式校验(MAX_TENSOR_NUM=256);ForeachMinimumScalar V1 op_api 补充 self/out 列表个数一致性校验(与 V2 对齐)并修正空列表读取顺序;ForeachSubScalarList 输出元素数约束统一为与 x 相等(含新增 y 更大负例)、空列表路径补充 scalars 元素数为 0 的校验 验证:pre-commit 全 hook 通过;ascend950/ascend350 定向构建通过(350 内核产物生成);ascend910b 包构建通过;UT 通过;检视修复后 minimum/sub_scalar_list UT 24 用例通过;本轮检视修复后 950 包构建通过(arch35 tiling 编译验证)、UT 32 用例通过。 | 24 天前 | |
feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11965 merge feat/foreach-unary-noncontig-4 into master feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 4 批/最后一批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachLog1p / Log2 / Neg / Reciprocal / Sigmoid | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Log1p/Log2/Reciprocal/Sigmoid 为 FLOAT16/FLOAT/BF16;Neg 为 FLOAT16/FLOAT/BF16/INT32/INT16/INT8/UINT8 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Closes #6677(一元系列共 4 批共用本 issue,本批为最后一批) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log1p/log2 正值域、reciprocal 避开 0) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11965 | 1 个月前 | |
feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11965 merge feat/foreach-unary-noncontig-4 into master feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 4 批/最后一批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachLog1p / Log2 / Neg / Reciprocal / Sigmoid | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Log1p/Log2/Reciprocal/Sigmoid 为 FLOAT16/FLOAT/BF16;Neg 为 FLOAT16/FLOAT/BF16/INT32/INT16/INT8/UINT8 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Closes #6677(一元系列共 4 批共用本 issue,本批为最后一批) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log1p/log2 正值域、reciprocal 避开 0) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11965 | 1 个月前 | |
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
feat(foreach): MaximumList/MinimumList/PowList与ZeroInplace/NonFiniteCheckAndUnscale共5个接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11970 merge feat/foreach-df-noncontig into master feat(foreach): MaximumList/MinimumList/PowList与ZeroInplace/NonFiniteCheckAndUnscale共5个接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个接口当前为自动生成实现(无手写 aclnn 层):二元 list 类输出非连续时 kernel 按连续布局写入结果错位;两个纯 inplace 算子(def 无 Output,kernel 直接更新输入 GM 地址)不支持非连续输入(详见关联 issue)。 ### 改动方法 **D 类(二元 list×list)** | 接口 | 改造 | |---|---| | aclnnForeachMaximumList / MinimumList / PowList | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE;pow_list 因 op_kernel/ 存在同名头文件,桥接以 _l0op 后缀命名)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:双输入 + 输出均 ForeachMakeContiguousTensorList,计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - dtype 校验按各算子 def.cpp(FLOAT16/FLOAT/INT32/BF16);机型判断用 SocVersion **F 类(无 Output 纯 inplace)** | 接口 | 改造 | |---|---| | aclnnForeachZeroInplace / NonFiniteCheckAndUnscale | 桥接 OP_INPUT 全输入形式(无 OP_OUTPUT,kernel 直接更新输入 GM 地址;zero_inplace 桥接以 _l0op 后缀避开 op_kernel 同名头);手写 aclnn 层 | - 非连续支持:ForeachMakeContiguousTensorList 拷贝当前值 → kernel 原地更新 → ForeachViewCopyToOutputTensorList 按原 stride 回写原 tensor——inplace 语义与 found_inf 读-改-写累积均保序;inv_scale 只读;全空视图短路(workspaceSize=0) - CheckParams 含 CheckTensorListNotNull + 标量出参单元素校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6685 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:全量 UT PASSED / 0 FAILED——F 类含参数化 SoC(910B/910_93)×(转置视图/带偏移 stride/参数融合 buffer 视图/空视图/256 上限/空指针等)96 用例全过;D 类各 1 个非连续输入+非连续输出用例(双输入全非连续,六参 TensorDesc) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11970 | 1 个月前 | |
feat(foreach): 9个非V2接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11956 merge feat/foreach-nonv2-noncontig-output into master feat(foreach): 9个非V2接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 9 个接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。其同目录的 V2 接口已在前一批次统一切换公共 helper 并支持非连续输出(!11928),本批补齐非 V2 接口。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAddScalar / AddcmulScalar / MaximumScalar / MinimumScalar / MulScalar / PowScalar / RoundOffNumber / SubList / SubScalar | 自动生成改手写:复用同目录 V2 l0op 桥接(OP_TYPE_REGISTER 不重复),新建手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude | - scalar(aclTensor*) 直接透传 V2 桥接,无需 ConvertToTensor - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - scalar dtype 校验按各算子 def.cpp 的 DtypeScalarToTensor2 映射(FLOAT16→FLOAT16、FLOAT/BFLOAT16→FLOAT32、整型→INT32;RoundOffNumber 的 roundMode 固定 INT8),与自动生成版行为一致 - CheckParams 含 CheckTensorListNotNull + list 长度一致性校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6681 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<9算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast(本批 + 已合入的 V2 批次回归):79 tests PASSED / 0 FAILED,其中本批 9 个新增非连续输入+非连续输出用例全部通过(六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 9 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11956 | 1 个月前 | |
foreach部分算子支持非连续输出 Co-authored-by: ly_cann_coder<liyao152@huawei.com> # message auto-generated for no-merge-commit merge: !12608 merge dev_foreach into master foreach部分算子支持非连续输出 Created-by: ly_cann_coder Commit-by: ly_cann_coder Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> foreach_minimum_scalar_list和foreach_pow_scalar_and_tensor支持非连续输出 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/7287 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!12608 | 27 天前 | |
feat(foreach): MaximumList/MinimumList/PowList与ZeroInplace/NonFiniteCheckAndUnscale共5个接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11970 merge feat/foreach-df-noncontig into master feat(foreach): MaximumList/MinimumList/PowList与ZeroInplace/NonFiniteCheckAndUnscale共5个接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个接口当前为自动生成实现(无手写 aclnn 层):二元 list 类输出非连续时 kernel 按连续布局写入结果错位;两个纯 inplace 算子(def 无 Output,kernel 直接更新输入 GM 地址)不支持非连续输入(详见关联 issue)。 ### 改动方法 **D 类(二元 list×list)** | 接口 | 改造 | |---|---| | aclnnForeachMaximumList / MinimumList / PowList | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE;pow_list 因 op_kernel/ 存在同名头文件,桥接以 _l0op 后缀命名)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:双输入 + 输出均 ForeachMakeContiguousTensorList,计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - dtype 校验按各算子 def.cpp(FLOAT16/FLOAT/INT32/BF16);机型判断用 SocVersion **F 类(无 Output 纯 inplace)** | 接口 | 改造 | |---|---| | aclnnForeachZeroInplace / NonFiniteCheckAndUnscale | 桥接 OP_INPUT 全输入形式(无 OP_OUTPUT,kernel 直接更新输入 GM 地址;zero_inplace 桥接以 _l0op 后缀避开 op_kernel 同名头);手写 aclnn 层 | - 非连续支持:ForeachMakeContiguousTensorList 拷贝当前值 → kernel 原地更新 → ForeachViewCopyToOutputTensorList 按原 stride 回写原 tensor——inplace 语义与 found_inf 读-改-写累积均保序;inv_scale 只读;全空视图短路(workspaceSize=0) - CheckParams 含 CheckTensorListNotNull + 标量出参单元素校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6685 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:全量 UT PASSED / 0 FAILED——F 类含参数化 SoC(910B/910_93)×(转置视图/带偏移 stride/参数融合 buffer 视图/空视图/256 上限/空指针等)96 用例全过;D 类各 1 个非连续输入+非连续输出用例(双输入全非连续,六参 TensorDesc) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11970 | 1 个月前 | |
[Fix] 长尾算子加固:ForeachLog10/ForeachMinimumScalar/ForeachReciprocal/ForeachSubScalarList 非法输入校验与 Ascend350(DVLite) 适配 - ForeachLog10:修复 membase 内核 Log10 就地复用违反 API 校验(TensorReuseLoopCheck)的既存问题——float/half 改为非就地计算(输入/输出队列分离,bufferNum=1 保持 UB 占用与原地版本一致),bf16 在 float 缓冲内 cast 后非就地计算;同时激活 3 个内核用例的 ICPU_RUN_KF 与结果断言,全部通过 - ForeachLog10 / ForeachReciprocal:arch35 tiling 接入公共 foreach_flat_regbase_validator(ValidateHomogeneous 输入/输出契约校验),补充 ubSize > DCACHE_SIZE 检查 - ForeachMinimumScalar:arch35 tiling 新增 tensorNum 上限、scalar 元素数/rank 校验;空 TensorList 以单核成功收口(HandleEmptyTensorList);op_api v2 校验补齐 - ForeachSubScalarList:arch35 tiling 新增 CheckTensorListAndScalars(x 列表长度上限、逐 Tensor rank<=8、形状非负、dtype 一致、标量 dtype 匹配),补齐 arch35 tiling UT 负例 - 平台适配:4 算子补齐 Ascend350(DVLite) 四件套(op_host/op_kernel CMakeLists、def.cpp 注册、新增 config/ascend350 二进制配置);中央 ascendc_config.json 按全局配置规范不在本 PR 修改 - 资料与用例:README/aclnn 文档、examples、ST/UT 用例及数据脚本同步更新;行尾空白/EOF 格式清理 - 检视意见响应(atomgit-bot):ForeachMinimumScalar 空列表/主路径的 ubSize-DCACHE_SIZE 下溢保护;ForeachMinimumScalar/ForeachSubScalarList 数据比对脚本改为非零退出码 - 检视意见响应(fanqirui):ForeachLog10 填充循环前恢复列表上限显式校验(MAX_TENSOR_NUM=256);ForeachMinimumScalar V1 op_api 补充 self/out 列表个数一致性校验(与 V2 对齐)并修正空列表读取顺序;ForeachSubScalarList 输出元素数约束统一为与 x 相等(含新增 y 更大负例)、空列表路径补充 scalars 元素数为 0 的校验 验证:pre-commit 全 hook 通过;ascend950/ascend350 定向构建通过(350 内核产物生成);ascend910b 包构建通过;UT 通过;检视修复后 minimum/sub_scalar_list UT 24 用例通过;本轮检视修复后 950 包构建通过(arch35 tiling 编译验证)、UT 32 用例通过。 | 24 天前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11982 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Deleted the "Viewing the Source Code" section and the corresponding link at the beginning of the ACLNN MD description of foreach and norm. ## 关联的Issue [#6694](https://gitcode.com/cann/ops-nn/issues/6694) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11982 | 1 个月前 | |
fix foreach_mul_list example code Co-authored-by: tramp-ll<linglong4@huawei.com> # message auto-generated for no-merge-commit merge: !11960 merge master into master fix foreach_mul_list example code Created-by: tramp-ll Commit-by: tramp-ll Merged-by: cann-robot Description: ## 描述 回退了 foreach_mul_list example 的代码,保持与md文档示例代码一致 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/6684 ## 测试 OK ## 文档更新 NA ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11960 | 1 个月前 | |
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
feat(foreach): 9个非V2接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11956 merge feat/foreach-nonv2-noncontig-output into master feat(foreach): 9个非V2接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 9 个接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。其同目录的 V2 接口已在前一批次统一切换公共 helper 并支持非连续输出(!11928),本批补齐非 V2 接口。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAddScalar / AddcmulScalar / MaximumScalar / MinimumScalar / MulScalar / PowScalar / RoundOffNumber / SubList / SubScalar | 自动生成改手写:复用同目录 V2 l0op 桥接(OP_TYPE_REGISTER 不重复),新建手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude | - scalar(aclTensor*) 直接透传 V2 桥接,无需 ConvertToTensor - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - scalar dtype 校验按各算子 def.cpp 的 DtypeScalarToTensor2 映射(FLOAT16→FLOAT16、FLOAT/BFLOAT16→FLOAT32、整型→INT32;RoundOffNumber 的 roundMode 固定 INT8),与自动生成版行为一致 - CheckParams 含 CheckTensorListNotNull + list 长度一致性校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6681 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<9算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast(本批 + 已合入的 V2 批次回归):79 tests PASSED / 0 FAILED,其中本批 9 个新增非连续输入+非连续输出用例全部通过(六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 9 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11956 | 1 个月前 | |
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
feat(foreach): 五个算子支持Ascend960 Co-authored-by: yifangao<gaoyifan20@huawei.com> # message auto-generated for no-merge-commit merge: !11785 merge cann-out into master feat(foreach): 五个算子支持Ascend960 Created-by: yifangao Commit-by: yifangao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 以下五个算子适配Ascend960DT: - ForeachMulScalar - ForeachMulScalarList - ForeachNonFiniteCheckAndUnscale - ForeachNorm - ForeachSqrt ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6671 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Ascend960DT编译验证通过。 David冒烟:http://7.215.10.221/scheduler/alljobs?length=100&isalljobs=true&search=20261013_175845883 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11785 | 1 个月前 | |
feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11965 merge feat/foreach-unary-noncontig-4 into master feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 4 批/最后一批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachLog1p / Log2 / Neg / Reciprocal / Sigmoid | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Log1p/Log2/Reciprocal/Sigmoid 为 FLOAT16/FLOAT/BF16;Neg 为 FLOAT16/FLOAT/BF16/INT32/INT16/INT8/UINT8 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Closes #6677(一元系列共 4 批共用本 issue,本批为最后一批) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log1p/log2 正值域、reciprocal 避开 0) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11965 | 1 个月前 | |
fix(foreach): ForeachNonFiniteCheckAndUnscale 复用 Regbase 架构检查 Co-authored-by: xieshengwei1024<xieshengwei3@huawei.com> # message auto-generated for no-merge-commit merge: !12699 merge fix/foreach-unscale-regbase-api into master fix(foreach): ForeachNonFiniteCheckAndUnscale 复用 Regbase 架构检查 Created-by: xieshengwei1024 Commit-by: xieshengwei1024 Merged-by: cann-robot Description: ## 描述 在 Ascend960DT(DAV_9201)调用 aclnnForeachNonFiniteCheckAndUnscaleGetWorkspaceSize 时,GetDtypeSupportList() 的 SocVersion 白名单返回空列表,报“is not supported on the current platform”;Ascend350 也存在同类遗漏。 在 API 层复用 Ops::NN::AclnnUtil::IsRegbase(),使 Regbase 架构统一使用 FLOAT32、FLOAT16、BFLOAT16 支持列表,保留 A2/A3、310P、Kirin 原有校验行为。此写法与 foreach_add_list、foreach_exp 等算子一致。 补充 Regbase 架构、Ascend350、受限 dtype 平台及不支持平台的 API 回归测试;将 regbase tiling 测试扩展为 950/350/960DT × 三种浮点类型,检查 tiling key 为 100。 ## 关联的Issue Fixes #7289 https://gitcode.com/cann/ops-nn/issues/7289 ## 测试 - API UT: GTEST_FILTER='*L2ForeachNonFiniteCheckAndUnscale*' bash build.sh -u --opapi --ops=foreach_non_finite_check_and_unscale --ut_mode=fast -j8,57 项通过。 - Tiling UT:GTEST_FILTER='*ForeachNonFiniteCheckAndUnscale*' bash build.sh -u --ophost --ops=foreach_non_finite_check_and_unscale --ut_mode=fast -j8,14 项通过,其中 9 项覆盖 950/350/960DT 与三种 dtype 的组合。 - git diff --check 通过。 - 上述测试使用平台 mock;未进行 960 真机执行验证。 ## 文档更新 无。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12699 | 28 天前 | |
feat(foreach): 五个算子支持Ascend960 Co-authored-by: yifangao<gaoyifan20@huawei.com> # message auto-generated for no-merge-commit merge: !11785 merge cann-out into master feat(foreach): 五个算子支持Ascend960 Created-by: yifangao Commit-by: yifangao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 以下五个算子适配Ascend960DT: - ForeachMulScalar - ForeachMulScalarList - ForeachNonFiniteCheckAndUnscale - ForeachNorm - ForeachSqrt ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6671 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Ascend960DT编译验证通过。 David冒烟:http://7.215.10.221/scheduler/alljobs?length=100&isalljobs=true&search=20261013_175845883 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11785 | 1 个月前 | |
feat(foreach): MaximumList/MinimumList/PowList与ZeroInplace/NonFiniteCheckAndUnscale共5个接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11970 merge feat/foreach-df-noncontig into master feat(foreach): MaximumList/MinimumList/PowList与ZeroInplace/NonFiniteCheckAndUnscale共5个接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个接口当前为自动生成实现(无手写 aclnn 层):二元 list 类输出非连续时 kernel 按连续布局写入结果错位;两个纯 inplace 算子(def 无 Output,kernel 直接更新输入 GM 地址)不支持非连续输入(详见关联 issue)。 ### 改动方法 **D 类(二元 list×list)** | 接口 | 改造 | |---|---| | aclnnForeachMaximumList / MinimumList / PowList | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE;pow_list 因 op_kernel/ 存在同名头文件,桥接以 _l0op 后缀命名)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:双输入 + 输出均 ForeachMakeContiguousTensorList,计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - dtype 校验按各算子 def.cpp(FLOAT16/FLOAT/INT32/BF16);机型判断用 SocVersion **F 类(无 Output 纯 inplace)** | 接口 | 改造 | |---|---| | aclnnForeachZeroInplace / NonFiniteCheckAndUnscale | 桥接 OP_INPUT 全输入形式(无 OP_OUTPUT,kernel 直接更新输入 GM 地址;zero_inplace 桥接以 _l0op 后缀避开 op_kernel 同名头);手写 aclnn 层 | - 非连续支持:ForeachMakeContiguousTensorList 拷贝当前值 → kernel 原地更新 → ForeachViewCopyToOutputTensorList 按原 stride 回写原 tensor——inplace 语义与 found_inf 读-改-写累积均保序;inv_scale 只读;全空视图短路(workspaceSize=0) - CheckParams 含 CheckTensorListNotNull + 标量出参单元素校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6685 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:全量 UT PASSED / 0 FAILED——F 类含参数化 SoC(910B/910_93)×(转置视图/带偏移 stride/参数融合 buffer 视图/空视图/256 上限/空指针等)96 用例全过;D 类各 1 个非连续输入+非连续输出用例(双输入全非连续,六参 TensorDesc) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11970 | 1 个月前 | |
支持dvlite(ascend350):新增10个算子binary配置并扩展14个算子compute unit支持 Co-authored-by: yangjinwen<yangjinwen2@huawei.com> # message auto-generated for no-merge-commit merge: !12498 merge dev-dvlite into master 支持dvlite(ascend350):新增10个算子binary配置并扩展14个算子compute unit支持 Created-by: yangjinwen Commit-by: yangjinwen Merged-by: cann-robot Description: ## 变更说明 本 PR 为 dvlite(Ascend350)芯片提供算子适配支持,基于已有 ascend950(arch35)tiling 架构扩展 ascend350 计算单元,不改变 ascend910b/ascend910_93/ascend950 等既有平台行为。 ### 1. 新增 10 个算子的 binary 配置文件(共 14 份) | 算子 | 配置文件 | |------|----------| | ForeachMaximumScalarList | foreach/foreach_maximum_scalar_list/op_host/config/ascend350/foreach_maximum_scalar_list_binary.json | | ForeachPowScalar | foreach/foreach_pow_scalar/op_host/config/ascend350/foreach_pow_scalar_binary.json | | ForeachPowScalarAndTensor | foreach/foreach_pow_scalar_and_tensor/op_host/config/ascend350/foreach_pow_scalar_and_tensor_binary.json | | ForeachSinh | foreach/foreach_sinh/op_host/config/ascend350/foreach_sinh_binary.json | | SoftmaxFocalLoss | loss/softmax_focal_loss/op_host/config/ascend350/softmax_focal_loss_binary.json | | GnTrainingReduce | norm/gn_training_reduce/op_host/config/ascend350/gn_training_reduce_binary.json | | MultiAddRmsNormDynamicQuant | norm/multi_add_rms_norm_dynamic_quant/op_host/config/ascend350/multi_add_rms_norm_dynamic_quant_binary.json | | SingleLayerLstm | rnn/single_layer_lstm/op_host/config/ascend350/single_layer_lstm_binary.json | | ScaledMaskedSoftmaxV2 | vfusion/scaled_masked_softmax_v2/op_host/config/{ascend350,ascend960dt,ascend960pr}/scaled_masked_softmax_v2_binary.json(3 份) | | ScaledMaskedSoftmaxGradV2 | vfusion/scaled_masked_softmax_grad_v2/op_host/config/{ascend350,ascend960dt,ascend960pr}/scaled_masked_softmax_grad_v2_binary.json(3 份) | ### 2. CMakeLists / op_host 注册扩展计算单元 上述算子及 ScatterMax、ScatterMaxWithArgmax、LambUpdateWithLr、FusedMulApplyMomentumExtern 共 14 个算子,通过 SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR/COMPUTE_UNITS(CMakeLists)与 AICore().AddConfig(...)(def.cpp)注册: - 12 个算子注册 ascend350,tiling 复用 ascend950 的 arch35 目录; - ScaledMaskedSoftmaxV2、ScaledMaskedSoftmaxGradV2 各注册 ascend350、ascend960dt、ascend960pr 三个计算单元; - 公共模块 scatter_reduce_common(index/scatter_reduce_common)注册 ascend350(tiling 复用 arch35),供 ScatterMax/ScatterDiv/ScatterMin/ScatterMul 等 scatter 系列算子复用。 ### 3. op_api / infershape 适配 - aclnn_foreach_sinh:dtype 支持列表增加 SocVersion::ASCEND350 - single_layer_lstm:SoC 校验由仅 ascend950 扩展至 ascend950/ascend350 - softmax_focal_loss、multi_add_rms_norm_dynamic_quant:infershape 平台分支覆盖 short_soc_version == "Ascend350" ## 影响范围 53 files changed, +2712/-65。仅新增 ascend350(及 ScaledMaskedSoftmaxV2/ScaledMaskedSoftmaxGradV2 的 ascend960dt/ascend960pr)计算单元支持,既有平台行为不变。 关联的Issue:#7144 See merge request: cann/ops-nn!12498 | 30 天前 | |
foreach部分算子支持非连续输出 Co-authored-by: ly_cann_coder<liyao152@huawei.com> # message auto-generated for no-merge-commit merge: !12608 merge dev_foreach into master foreach部分算子支持非连续输出 Created-by: ly_cann_coder Commit-by: ly_cann_coder Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> foreach_minimum_scalar_list和foreach_pow_scalar_and_tensor支持非连续输出 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/7287 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!12608 | 27 天前 | |
modified md files Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11982 merge master into master modified md files Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Deleted the "Viewing the Source Code" section and the corresponding link at the beginning of the ACLNN MD description of foreach and norm. ## 关联的Issue [#6694](https://gitcode.com/cann/ops-nn/issues/6694) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11982 | 1 个月前 | |
[Fix] 长尾算子加固:ForeachLog10/ForeachMinimumScalar/ForeachReciprocal/ForeachSubScalarList 非法输入校验与 Ascend350(DVLite) 适配 - ForeachLog10:修复 membase 内核 Log10 就地复用违反 API 校验(TensorReuseLoopCheck)的既存问题——float/half 改为非就地计算(输入/输出队列分离,bufferNum=1 保持 UB 占用与原地版本一致),bf16 在 float 缓冲内 cast 后非就地计算;同时激活 3 个内核用例的 ICPU_RUN_KF 与结果断言,全部通过 - ForeachLog10 / ForeachReciprocal:arch35 tiling 接入公共 foreach_flat_regbase_validator(ValidateHomogeneous 输入/输出契约校验),补充 ubSize > DCACHE_SIZE 检查 - ForeachMinimumScalar:arch35 tiling 新增 tensorNum 上限、scalar 元素数/rank 校验;空 TensorList 以单核成功收口(HandleEmptyTensorList);op_api v2 校验补齐 - ForeachSubScalarList:arch35 tiling 新增 CheckTensorListAndScalars(x 列表长度上限、逐 Tensor rank<=8、形状非负、dtype 一致、标量 dtype 匹配),补齐 arch35 tiling UT 负例 - 平台适配:4 算子补齐 Ascend350(DVLite) 四件套(op_host/op_kernel CMakeLists、def.cpp 注册、新增 config/ascend350 二进制配置);中央 ascendc_config.json 按全局配置规范不在本 PR 修改 - 资料与用例:README/aclnn 文档、examples、ST/UT 用例及数据脚本同步更新;行尾空白/EOF 格式清理 - 检视意见响应(atomgit-bot):ForeachMinimumScalar 空列表/主路径的 ubSize-DCACHE_SIZE 下溢保护;ForeachMinimumScalar/ForeachSubScalarList 数据比对脚本改为非零退出码 - 检视意见响应(fanqirui):ForeachLog10 填充循环前恢复列表上限显式校验(MAX_TENSOR_NUM=256);ForeachMinimumScalar V1 op_api 补充 self/out 列表个数一致性校验(与 V2 对齐)并修正空列表读取顺序;ForeachSubScalarList 输出元素数约束统一为与 x 相等(含新增 y 更大负例)、空列表路径补充 scalars 元素数为 0 的校验 验证:pre-commit 全 hook 通过;ascend950/ascend350 定向构建通过(350 内核产物生成);ascend910b 包构建通过;UT 通过;检视修复后 minimum/sub_scalar_list UT 24 用例通过;本轮检视修复后 950 包构建通过(arch35 tiling 编译验证)、UT 32 用例通过。 | 24 天前 | |
修正 ForeachRoundOffNumber README 中 roundMode Tensor 类型说明 Co-authored-by: KaranocaVe<karanocave@qq.com> # message auto-generated for no-merge-commit merge: !12126 merge fix/2026-10-14-foreach-round-off-number-roundmode-int8-doc-01 into master 修正 ForeachRoundOffNumber README 中 roundMode Tensor 类型说明 Created-by: KaranocaVe Commit-by: KaranocaVe Merged-by: cann-robot Description: 修正 ForeachRoundOffNumber README 中 roundMode Tensor 的类型说明为 INT8。算子 Proto 和经典 ACLNN 文档均只支持 INT8;INT64 适用于 V2 的 aclScalar 参数。 验证:补丁通过 git apply --check;仅修改文档,未运行构建或设备测试。 关联 Issue: https://gitcode.com/cann/ops-nn/issues/6785 See merge request: cann/ops-nn!12126 | 1 个月前 | |
feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11965 merge feat/foreach-unary-noncontig-4 into master feat(foreach): Log1p/Log2/Neg/Reciprocal/Sigmoid 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 4 批/最后一批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachLog1p / Log2 / Neg / Reciprocal / Sigmoid | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Log1p/Log2/Reciprocal/Sigmoid 为 FLOAT16/FLOAT/BF16;Neg 为 FLOAT16/FLOAT/BF16/INT32/INT16/INT8/UINT8 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Closes #6677(一元系列共 4 批共用本 issue,本批为最后一批) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape;log1p/log2 正值域、reciprocal 避开 0) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11965 | 1 个月前 | |
feat(foreach): Sin/Sinh/Tan/Tanh/Sign 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11963 merge feat/foreach-unary-noncontig-2 into master feat(foreach): Sin/Sinh/Tan/Tanh/Sign 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 2 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachSin / Sinh / Tan / Tanh / Sign | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Sin/Sinh/Tan/Tanh 为 FLOAT16/FLOAT/BF16;Sign 为 FLOAT16/FLOAT/BF16/INT8/INT32/INT64 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11963 | 1 个月前 | |
feat(foreach): Sin/Sinh/Tan/Tanh/Sign 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11963 merge feat/foreach-unary-noncontig-2 into master feat(foreach): Sin/Sinh/Tan/Tanh/Sign 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 2 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachSin / Sinh / Tan / Tanh / Sign | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Sin/Sinh/Tan/Tanh 为 FLOAT16/FLOAT/BF16;Sign 为 FLOAT16/FLOAT/BF16/INT8/INT32/INT64 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11963 | 1 个月前 | |
支持dvlite(ascend350):新增10个算子binary配置并扩展14个算子compute unit支持 Co-authored-by: yangjinwen<yangjinwen2@huawei.com> # message auto-generated for no-merge-commit merge: !12498 merge dev-dvlite into master 支持dvlite(ascend350):新增10个算子binary配置并扩展14个算子compute unit支持 Created-by: yangjinwen Commit-by: yangjinwen Merged-by: cann-robot Description: ## 变更说明 本 PR 为 dvlite(Ascend350)芯片提供算子适配支持,基于已有 ascend950(arch35)tiling 架构扩展 ascend350 计算单元,不改变 ascend910b/ascend910_93/ascend950 等既有平台行为。 ### 1. 新增 10 个算子的 binary 配置文件(共 14 份) | 算子 | 配置文件 | |------|----------| | ForeachMaximumScalarList | foreach/foreach_maximum_scalar_list/op_host/config/ascend350/foreach_maximum_scalar_list_binary.json | | ForeachPowScalar | foreach/foreach_pow_scalar/op_host/config/ascend350/foreach_pow_scalar_binary.json | | ForeachPowScalarAndTensor | foreach/foreach_pow_scalar_and_tensor/op_host/config/ascend350/foreach_pow_scalar_and_tensor_binary.json | | ForeachSinh | foreach/foreach_sinh/op_host/config/ascend350/foreach_sinh_binary.json | | SoftmaxFocalLoss | loss/softmax_focal_loss/op_host/config/ascend350/softmax_focal_loss_binary.json | | GnTrainingReduce | norm/gn_training_reduce/op_host/config/ascend350/gn_training_reduce_binary.json | | MultiAddRmsNormDynamicQuant | norm/multi_add_rms_norm_dynamic_quant/op_host/config/ascend350/multi_add_rms_norm_dynamic_quant_binary.json | | SingleLayerLstm | rnn/single_layer_lstm/op_host/config/ascend350/single_layer_lstm_binary.json | | ScaledMaskedSoftmaxV2 | vfusion/scaled_masked_softmax_v2/op_host/config/{ascend350,ascend960dt,ascend960pr}/scaled_masked_softmax_v2_binary.json(3 份) | | ScaledMaskedSoftmaxGradV2 | vfusion/scaled_masked_softmax_grad_v2/op_host/config/{ascend350,ascend960dt,ascend960pr}/scaled_masked_softmax_grad_v2_binary.json(3 份) | ### 2. CMakeLists / op_host 注册扩展计算单元 上述算子及 ScatterMax、ScatterMaxWithArgmax、LambUpdateWithLr、FusedMulApplyMomentumExtern 共 14 个算子,通过 SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR/COMPUTE_UNITS(CMakeLists)与 AICore().AddConfig(...)(def.cpp)注册: - 12 个算子注册 ascend350,tiling 复用 ascend950 的 arch35 目录; - ScaledMaskedSoftmaxV2、ScaledMaskedSoftmaxGradV2 各注册 ascend350、ascend960dt、ascend960pr 三个计算单元; - 公共模块 scatter_reduce_common(index/scatter_reduce_common)注册 ascend350(tiling 复用 arch35),供 ScatterMax/ScatterDiv/ScatterMin/ScatterMul 等 scatter 系列算子复用。 ### 3. op_api / infershape 适配 - aclnn_foreach_sinh:dtype 支持列表增加 SocVersion::ASCEND350 - single_layer_lstm:SoC 校验由仅 ascend950 扩展至 ascend950/ascend350 - softmax_focal_loss、multi_add_rms_norm_dynamic_quant:infershape 平台分支覆盖 short_soc_version == "Ascend350" ## 影响范围 53 files changed, +2712/-65。仅新增 ascend350(及 ScaledMaskedSoftmaxV2/ScaledMaskedSoftmaxGradV2 的 ascend960dt/ascend960pr)计算单元支持,既有平台行为不变。 关联的Issue:#7144 See merge request: cann/ops-nn!12498 | 30 天前 | |
feat(foreach): 五个算子支持Ascend960 Co-authored-by: yifangao<gaoyifan20@huawei.com> # message auto-generated for no-merge-commit merge: !11785 merge cann-out into master feat(foreach): 五个算子支持Ascend960 Created-by: yifangao Commit-by: yifangao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 以下五个算子适配Ascend960DT: - ForeachMulScalar - ForeachMulScalarList - ForeachNonFiniteCheckAndUnscale - ForeachNorm - ForeachSqrt ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6671 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Ascend960DT编译验证通过。 David冒烟:http://7.215.10.221/scheduler/alljobs?length=100&isalljobs=true&search=20261013_175845883 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11785 | 1 个月前 | |
feat(foreach): 9个非V2接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11956 merge feat/foreach-nonv2-noncontig-output into master feat(foreach): 9个非V2接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 9 个接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。其同目录的 V2 接口已在前一批次统一切换公共 helper 并支持非连续输出(!11928),本批补齐非 V2 接口。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAddScalar / AddcmulScalar / MaximumScalar / MinimumScalar / MulScalar / PowScalar / RoundOffNumber / SubList / SubScalar | 自动生成改手写:复用同目录 V2 l0op 桥接(OP_TYPE_REGISTER 不重复),新建手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude | - scalar(aclTensor*) 直接透传 V2 桥接,无需 ConvertToTensor - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - scalar dtype 校验按各算子 def.cpp 的 DtypeScalarToTensor2 映射(FLOAT16→FLOAT16、FLOAT/BFLOAT16→FLOAT32、整型→INT32;RoundOffNumber 的 roundMode 固定 INT8),与自动生成版行为一致 - CheckParams 含 CheckTensorListNotNull + list 长度一致性校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6681 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<9算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast(本批 + 已合入的 V2 批次回归):79 tests PASSED / 0 FAILED,其中本批 9 个新增非连续输入+非连续输出用例全部通过(六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 9 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11956 | 1 个月前 | |
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
feat(foreach): 9个非V2接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11956 merge feat/foreach-nonv2-noncontig-output into master feat(foreach): 9个非V2接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 9 个接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue)。其同目录的 V2 接口已在前一批次统一切换公共 helper 并支持非连续输出(!11928),本批补齐非 V2 接口。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachAddScalar / AddcmulScalar / MaximumScalar / MinimumScalar / MulScalar / PowScalar / RoundOffNumber / SubList / SubScalar | 自动生成改手写:复用同目录 V2 l0op 桥接(OP_TYPE_REGISTER 不重复),新建手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude | - scalar(aclTensor*) 直接透传 V2 桥接,无需 ConvertToTensor - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写 - scalar dtype 校验按各算子 def.cpp 的 DtypeScalarToTensor2 映射(FLOAT16→FLOAT16、FLOAT/BFLOAT16→FLOAT32、整型→INT32;RoundOffNumber 的 roundMode 固定 INT8),与自动生成版行为一致 - CheckParams 含 CheckTensorListNotNull + list 长度一致性校验 - kernel/tiling/binary 不变 ## 关联的Issue Closes #6681 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<9算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast(本批 + 已合入的 V2 批次回归):79 tests PASSED / 0 FAILED,其中本批 9 个新增非连续输入+非连续输出用例全部通过(六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 9 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11956 | 1 个月前 | |
modified md files (modified the product name and link path) Co-authored-by: duhuiping<duhuiping@h-partners.com> # message auto-generated for no-merge-commit merge: !11029 merge master into master modified md files (modified the product name and link path) Created-by: gitee-duhuiping Commit-by: duhuiping Merged-by: cann-robot Description: ## 描述 Changed the product name and link path ## 关联的Issue [#6092](https://gitcode.com/cann/ops-nn/issues/6092) ## 测试 Only involves updating the MD document description, does not involve testing. ## 文档更新 md files ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!11029 | 1 个月前 | |
[Fix] 长尾算子加固:ForeachLog10/ForeachMinimumScalar/ForeachReciprocal/ForeachSubScalarList 非法输入校验与 Ascend350(DVLite) 适配 - ForeachLog10:修复 membase 内核 Log10 就地复用违反 API 校验(TensorReuseLoopCheck)的既存问题——float/half 改为非就地计算(输入/输出队列分离,bufferNum=1 保持 UB 占用与原地版本一致),bf16 在 float 缓冲内 cast 后非就地计算;同时激活 3 个内核用例的 ICPU_RUN_KF 与结果断言,全部通过 - ForeachLog10 / ForeachReciprocal:arch35 tiling 接入公共 foreach_flat_regbase_validator(ValidateHomogeneous 输入/输出契约校验),补充 ubSize > DCACHE_SIZE 检查 - ForeachMinimumScalar:arch35 tiling 新增 tensorNum 上限、scalar 元素数/rank 校验;空 TensorList 以单核成功收口(HandleEmptyTensorList);op_api v2 校验补齐 - ForeachSubScalarList:arch35 tiling 新增 CheckTensorListAndScalars(x 列表长度上限、逐 Tensor rank<=8、形状非负、dtype 一致、标量 dtype 匹配),补齐 arch35 tiling UT 负例 - 平台适配:4 算子补齐 Ascend350(DVLite) 四件套(op_host/op_kernel CMakeLists、def.cpp 注册、新增 config/ascend350 二进制配置);中央 ascendc_config.json 按全局配置规范不在本 PR 修改 - 资料与用例:README/aclnn 文档、examples、ST/UT 用例及数据脚本同步更新;行尾空白/EOF 格式清理 - 检视意见响应(atomgit-bot):ForeachMinimumScalar 空列表/主路径的 ubSize-DCACHE_SIZE 下溢保护;ForeachMinimumScalar/ForeachSubScalarList 数据比对脚本改为非零退出码 - 检视意见响应(fanqirui):ForeachLog10 填充循环前恢复列表上限显式校验(MAX_TENSOR_NUM=256);ForeachMinimumScalar V1 op_api 补充 self/out 列表个数一致性校验(与 V2 对齐)并修正空列表读取顺序;ForeachSubScalarList 输出元素数约束统一为与 x 相等(含新增 y 更大负例)、空列表路径补充 scalars 元素数为 0 的校验 验证:pre-commit 全 hook 通过;ascend950/ascend350 定向构建通过(350 内核产物生成);ascend910b 包构建通过;UT 通过;检视修复后 minimum/sub_scalar_list UT 24 用例通过;本轮检视修复后 950 包构建通过(arch35 tiling 编译验证)、UT 32 用例通过。 | 24 天前 | |
fix(foreach): foreach_tan 的 op_api UT 平级迁移并恢复 arch 目录 per-SOC 收集行为 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !12687 merge fix/tan-ut-location into master fix(foreach): foreach_tan 的 op_api UT 平级迁移并恢复 arch 目录 per-SOC 收集行为 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 全量 UT 扫描(2026-10-23 通报)发现 ForeachTan 的 3 个 tiling 用例跨平台冲突(#7278/#7279/#7280):!11963 为收集 op_api UT 在 tests/ut/op_host/CMakeLists.txt 新增的 foreach(SUB_DIR) add_subdirectory 遍历,将 arch22/arch35 子目录(!5340 引入的 CANNBot 生成 tiling UT)同时纳入构建。两套 tiling 的 key 编码不一致(arch22: FLOAT=2/BF16=4;arch35: FLOAT=0/BF16=2),同时收集导致: - 默认构建(910b):arch35 用例收到 arch22 的 tiling 结果(#7278/#7279) - ascend950 构建:arch22 用例收到 arch35 的 tiling 结果(#7280) 而 !5340 合入时的正确行为是 per-SOC 各自收集(默认构建仅 arch22、ascend950 仅 arch35,实测确认)。 ### 改动方法 - op_api UT 迁移至 tests/ut/op_api/(与 op_host 平级,由上层 tests/ut/CMakeLists.txt 的 GLOB 分发自动收集——收集行为等效,A2 实测 nn_op_api_ut 正常收录) - tests/ut/op_host/CMakeLists.txt 恢复 !11963 之前形态(移除 add_subdirectory 遍历),arch22/arch35 回到 per-SOC 各自收集的原生行为 - 同步修正 UT 文件的 include 相对路径(目录层级变化)与 license 尾随空格 ## 关联的Issue Closes #7278 Closes #7279 Closes #7280 ## 测试 - A2(910B3)build.sh -u --ophost --soc=ascend910b:4 tests PASSED / 0 FAILED(回到 !11963 之前基线,ForeachTanTilingArch35 不再被收集) - A2 build.sh -u --opapi --soc=ascend910b:1 test PASSED(op_api UT 在新位置正常收集,非连续用例通过) - pre-commit 全部 hook 通过(clang-format / codespell / OAT),零自动修复 ## 文档更新 无 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12687 | 29 天前 | |
feat(foreach): Sin/Sinh/Tan/Tanh/Sign 5个一元接口改手写支持非连续输入输出 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !11963 merge feat/foreach-unary-noncontig-2 into master feat(foreach): Sin/Sinh/Tan/Tanh/Sign 5个一元接口改手写支持非连续输入输出 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 O1 图模式/eager 模式存在非连续输入输出场景,以下 5 个一元接口当前为自动生成实现(无手写 aclnn 层),输出为非连续 tensor 时 kernel 按连续线性布局写入,结果落在错误位置(详见关联 issue,一元系列共 4 批,本 PR 为第 2 批)。 ### 改动方法 | 接口 | 改造 | |---|---| | aclnnForeachSin / Sinh / Tan / Tanh / Sign | 自动生成改手写:新建 l0op 桥接(OP_TYPE_REGISTER + ADD_TO_LAUNCHER_LIST_AICORE,复用现有 kernel)+ 手写 aclnn 层;CMakeLists 由 aclnn 改 aclnn_exclude 并补 foreach_utils include 目录 | - 非连续支持复用 foreach_utils/op_host/foreach_contiguous_helper.h:输入端 ForeachMakeContiguousTensorList,输出端转连续 buffer 计算后 ForeachViewCopyToOutputTensorList 按 stride 回写(已连续输出直接写入) - CheckParams 含 CheckTensorListNotNull(foreach_null_check_helper.h) - dtype 校验按各算子 def.cpp:Sin/Sinh/Tan/Tanh 为 FLOAT16/FLOAT/BF16;Sign 为 FLOAT16/FLOAT/BF16/INT8/INT32/INT64 - 各算子 tests/ut/op_host/CMakeLists.txt 补 foreach(SUB_DIR) 子目录遍历(存量缺失,其 op_api UT 从未被构建收集) - kernel/tiling/binary 不变 ## 关联的Issue Refs #6677(一元系列共 4 批共用本 issue,最后一批合入时关闭) ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=<5算子+foreach_utils> 真机 op 构建:Build binary success - A2 build.sh -u --opapi --soc=ascend910b --ut_mode=fast:5 tests PASSED / 0 FAILED(5 个新增非连续输入+非连续输出用例,六参 TensorDesc 构造 strides/offset/storageShape) - pre-commit 全部 hook 通过(clang-format / cmake-format / codespell / OAT 合规) ## 文档更新 - 5 个接口文档 docs/aclnnForeach<Op>.md:out 的"非连续Tensor"标记由 × 改为 √ ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11963 | 1 个月前 | |
feat(foreach): 五个算子支持Ascend960 Co-authored-by: yifangao<gaoyifan20@huawei.com> # message auto-generated for no-merge-commit merge: !11785 merge cann-out into master feat(foreach): 五个算子支持Ascend960 Created-by: yifangao Commit-by: yifangao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 以下五个算子适配Ascend960DT: - ForeachMulScalar - ForeachMulScalarList - ForeachNonFiniteCheckAndUnscale - ForeachNorm - ForeachSqrt ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/6671 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> Ascend960DT编译验证通过。 David冒烟:http://7.215.10.221/scheduler/alljobs?length=100&isalljobs=true&search=20261013_175845883 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11785 | 1 个月前 | |
fix(foreach): ForeachZeroInplace/NonFiniteCheckAndUnscale 的 workspaceSize/executor 判空编译失败修复 Co-authored-by: luoyufan7<luoyufan7@h-partners.com> # message auto-generated for no-merge-commit merge: !12013 merge fix/foreach-f-opcheck-null into master fix(foreach): ForeachZeroInplace/NonFiniteCheckAndUnscale 的 workspaceSize/executor 判空编译失败修复 Created-by: luoyufan7 Commit-by: luoyufan7 Merged-by: cann-robot Description: ## 描述 ### 改动原因 !11970(ForeachZeroInplace/NonFiniteCheckAndUnscale 手写化)合入后在 CI 工具链下编译失败:CheckParams 中对 workspaceSize(uint64_t*)与 executor(aclOpExecutor**)使用了 OP_CHECK_NULL 宏,该宏内部的 IsNullptr 仅提供算子类型指针的重载/实例化,非算子指针在 CI 工具链版本下无匹配函数(本地 CANN 9.2.0 的泛型模板版本可编译,故本地验证未暴露)。 ### 改动方法 两个文件的 OP_CHECK_NULL(workspaceSize, ...) / OP_CHECK_NULL(executor, ...) 替换为普通 nullptr 比较(行为不变,错误码与日志保持 ACLNN_ERR_PARAM_NULLPTR);tensor/scalar 的 OP_CHECK_NULL 保留不动。全仓扫描确认仅此两处非算子指针误用。 ## 关联的Issue Refs #6685 ## 测试 - A2(910B3)build.sh --soc=ascend910b --ops=foreach_zero_inplace;foreach_non_finite_check_and_unscale 真机 op 构建:Build binary success - 改动为纯判空形式替换,无行为变化 ## 文档更新 无 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!12013 | 1 个月前 | |
License Change Split2 Co-authored-by: huohuo_wy<wangyan389@huawei.com> # message auto-generated for no-merge-commit merge: !372 merge spilitLicense3 into master License Change Split2 Created-by: huohuo_wangyan Commit-by: huohuo_wy Merged-by: cann-robot Description: ## 描述 批量整改文件copyright注释 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/177 ## 测试 COPYRIGHT注释头按新要求刷新 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!372 | 11 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 30 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 1 个月前 | ||
| 27 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 24 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 27 天前 | ||
| 1 个月前 | ||
| 24 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 28 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 27 天前 | ||
| 1 个月前 | ||
| 24 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 30 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 24 天前 | ||
| 29 天前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 11 个月前 |