| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
nn仓打标签 Co-authored-by: y60124828<yanglou1@h-partners.com> # message auto-generated for no-merge-commit merge: !8207 merge master into master nn仓打标签 Created-by: yanglu-1 Commit-by: y60124828 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!8207 | 1 个月前 | |
docs: 补充 scatter_list example 并修正 scatter_update example 命名 Co-authored-by: chenxingyu18<chenxingyu18@huawei.com> # message auto-generated for no-merge-commit merge: !8134 merge docs/add-scatter-list-aclnn-example into master docs: 补充 scatter_list example 并修正 scatter_update example 命名 Created-by: chenxingyu18 Commit-by: chenxingyu18 Merged-by: cann-robot Description: ## 描述 本 PR 合并两处 example 相关改动(均针对 issue #4212 的 example 补全/规范化): **1. scatter_list — 新增 aclnn api example** 新增 index/scatter_list/examples/test_aclnn_scatter_list.cpp,覆盖两段式接口完整调用流程 (Init → 构造 aclTensorList/aclTensor → GetWorkspaceSize → 执行 → 同步 → 打印 → 释放)。 调用签名已与生成接口真源 index/scatter_list/op_host/scatter_list_def.cpp 交叉核对一致 (inputs: var/indice/updates/mask;attrs: reduce 默认 "update"、axis 默认 -2)。 **2. scatter — inplace example 改名** index/scatter/example/test_aclnn_scatter.cpp 实际只测试了 aclnnInplaceScatterUpdate (scatter_update op 仅暴露该 inplace API,**不存在**非 inplace 的 aclnnScatterUpdate),文件名有歧义。 重命名为 test_aclnn_inplace_scatter_update.cpp,名实相符,并与 tests/ut/op_api/test_aclnn_inplace_scatter_update.cpp 命名对齐。 ## 关联的Issue #4212 ## 测试 - **scatter_list example**:与 scatter_list_def.cpp 输入/输出/属性顺序逐项核对;pre-commit 门禁(无行尾空格、末尾换行)通过。 - **scatter 改名**:git mv 保留历史;同步更新文件内 \file 注释;仅改名 + 注释,无逻辑改动。 - 两处 example 均不进构建(examples/example 目录无 CMakeLists,同仓内既有约定)。 ## 文档更新 - 新增 index/scatter_list/examples/test_aclnn_scatter_list.cpp - 重命名 index/scatter/example/test_aclnn_scatter.cpp → test_aclnn_inplace_scatter_update.cpp ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!8134 | 1 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
format cpp Co-authored-by: yang-di52<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !6784 merge issue_fix into master format cpp Created-by: yang-di52 Commit-by: yang-di52 Merged-by: cann-robot Description: ## 描述 批量刷新cpp代码格式 ## 关联的Issue [#3791](https://gitcode.com/cann/ops-nn/issues/3791) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:代码格式化 ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!6784 | 2 个月前 | |
新增算子st用例 Co-authored-by: hw-zhangpanpan<zhangpanpan5@huawei.com> Co-authored-by: yu_qinfei<yuqinfei1@h-partners.com> Co-authored-by: ligen<ligen75@h-partners.com> Co-authored-by: yefeicoding<yefei25@huawei.com> # message auto-generated for no-merge-commit merge: !7825 merge st into master 新增算子st用例 Created-by: yefeicoding Commit-by: yefeicoding;yu_qinfei;hw-zhangpanpan;李根;ligen Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/4269 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:补充st ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!7825 | 1 个月前 | |
新增scatter算子支持Ascend950 Co-authored-by: Huang-Peng<huangpeng98@huawei.com> # message auto-generated for no-merge-commit merge: !1267 merge scatter-tran into master 新增scatter算子支持Ascend950 Created-by: Huang-Peng Commit-by: Huang-Peng Merged-by: cann-robot Description: ## 描述 新增scatter算子在Ascend950的实现 将tensor updates中的值按指定的轴axis和索引indices逐个更新tensor data中的值。该算子为自定义算子语义,无对应的tensorflow或pytorch接口,在Ascend950上需要新增MapIndex算子的开发。需求开源Vector团队。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/778 ## 测试 本地自验证、二级冒烟 ## 文档更新 新增README.md和aclnnInplaceScatterUpdate.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1267 | 6 个月前 | |
docs(index): 修正 15 个算子 README 产品支持声明并补充 index 算子功能说明 Co-authored-by: chen-xing-yu<chenxingyu18@huawei.com> # message auto-generated for no-merge-commit merge: !8203 merge issue_4504 into master docs(index): 修正 15 个算子 README 产品支持声明并补充 index 算子功能说明 Created-by: chenxingyu18 Commit-by: chen-xing-yu Merged-by: cann-robot Description: ## 描述 修正 index/ 目录下算子 README 与实际注册不一致、描述不清晰的问题,涉及两项: 1. 产品支持声明(#4504):index/ 下 15 个算子 README「产品支持情况」表声明支持 Ascend 950 之外的多个产品,但对应 *_def.cpp 的 AICore().AddConfig() 仅注册 ascend950,将除 Ascend 950 外其余产品行的 √ 改为 ×,使文档与实际注册一致。 2. index 算子功能说明(#4511):index/index/README.md 原功能说明仅提及 indices 与 x,补充 indexed_sizes、indexed_strides、indices、y 与功能的关系,明确多维高级索引语义。 本次仅改动 README 文档,未改动算子 tiling/kernel/def 代码。 ## 关联的Issue [#4504](https://gitcode.com/cann/ops-nn/issues/4504) [#4511](https://gitcode.com/cann/ops-nn/issues/4511) Closes #4504 Closes #4511 ## 文档更新 - index/index/README.md(产品支持表 + 功能说明) - index/gather_v2/README.md - index/data_format_dim_map/README.md - index/non_zero/README.md - index/embedding_dense_grad/README.md - index/gather_elements/README.md - index/index_put_v2/README.md - index/quant_update_scatter/README.md - index/scatter/README.md - index/gather_nd/README.md - index/index_fill_d/README.md - index/scatter_add/README.md - index/scatter_elements/README.md - index/scatter_nd/README.md - index/unique_consecutive/README.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [x] AI辅助编写 See merge request: cann/ops-nn!8203 | 1 个月前 |
Scatter
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Ascend 950PR/Ascend 950DT | √ |
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | × |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | × |
| Atlas 200I/500 A2 推理产品 | × |
| Atlas 推理系列产品 | × |
| Atlas 训练系列产品 | × |
功能说明
-
算子功能: 将tensor updates中的值按指定的轴axis和索引indices逐个更新tensor data中的值。
-
示例: 该算子有3个输入和一个属性:data,updates,indices和axis,其中data是待更新的tensor,updates是存储更新数据的tensor,indices表示更新位置, axis是指定的更新维度。当indices为1维,存在以下两种场景:
场景一: indices为1维,axis指定更新的维度shape为1,indices指定的是每个batch维度(最高维)在axis维度的偏移。
样例输入: data:(a, b, c, d) updates:(a, b, 1, d) indices:(a,) axis = -2data[i][j][indices[i]][k] = updates[i][j][0][k] # if dim=-2 data[i][j][k][indices[i]] = updates[i][j][k][0] # if dim=-1场景二: indices为1维,axis指定更新的维度shape大于1,indices指定的是每个batch维度(最高维)在axis维度的偏移。
样例输入: data:(a, b, c, d) updates:(a, b, e, d), indices[i] + e <= c indices:(a,) axis = -2 or 2data[i][j][indices[i]+k][l] = updates[i][j][k][l] # if dim=-2 data[i][j][k][indices[i]+l] = updates[i][j][k][l] # if dim=-1
约束说明
无
调用说明
| 调用方式 | 样例代码 | 说明 |
|---|---|---|
| aclnn接口 | test_aclnn_scatter | 通过aclnnInplaceScatterUpdate接口方式调用Scatter算子。 |