| feat(segment_sum): 新增算子README.md及geir调用样例 Co-authored-by: zhang-wenbo-beat<zhangwenbo67@huawei.com> # message auto-generated for no-merge-commit merge: !9290 merge segment_sum_example into master feat(segment_sum): 新增算子README.md及geir调用样例 Created-by: zhang-wenbo-beat Commit-by: zhang-wenbo-beat Merged-by: cann-robot Description: ## 描述 本 PR 为 SegmentSum 算子补齐对外文档与可运行调用样例,便于用户理解算子语义并快速上手: - **index/segment_sum/README.md**:新增算子使用文档,涵盖产品支持情况(仅 Ascend 950PR/950DT 支持)、功能说明(分段求和计算公式与示例)、参数说明(x / segment_ids / y 的数据类型与格式)、约束说明、以及调用方式索引。 - **index/segment_sum/examples/test_geir_segment_sum.cpp**:新增图模式(GEIR)调用样例,通过 ge::Session 构建并运行 SegmentSum 计算图,演示输入 x(shape {4,2},填充 2.0)与分段索引 segment_ids({0, 0, 1, 2})的构图、图编译与执行流程,并将输出落盘为 bin 文件用于验证。 改动原因:SegmentSum 算子此前缺少对外文档与可运行示例,本 PR 补齐这两部分,降低使用门槛。 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/5053 ## 测试 - **样例验证**:样例本身为图模式可运行用例,输入 x = {4,2} 全 2.0、segment_ids = {0, 0, 1, 2},按分段求和语义输出 y shape 为 {3,2}: - y[0] = x[0] + x[1] = [4, 4] - y[1] = x[2] = [2, 2] - y[2] = x[3] = [2, 2] ## 文档更新 - 新增 index/segment_sum/README.md:SegmentSum 算子说明文档。 - 新增 index/segment_sum/examples/test_geir_segment_sum.cpp:图模式调用样例。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!9290 | 1 个月前 |
| TF plugin修改1 Co-authored-by: sunchun<sunchun4@h-partners.com> # message auto-generated for no-merge-commit merge: !7547 merge nn1 into master TF plugin修改1 Created-by: sunchun Commit-by: sunchun Merged-by: cann-robot Description: ## 描述 TF plugin修改 ## 关联的Issue https://gitcode.com/cann/ops-nn/issues/4196 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!7547 | 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 | 3 个月前 |
| Feature: 为 index 和 pooling 类算子新增 Ascend350 平台支持 Co-authored-by: klein8793<zhangli24@huawei.com> # message auto-generated for no-merge-commit merge: !9754 merge dev_zl_2026_0902 into master Feature: 为 index 和 pooling 类算子新增 Ascend350 平台支持 Created-by: klein8793 Commit-by: klein8793 Merged-by: cann-robot Description: ## 描述 为 index 和 pooling 类算子新增 Ascend350 平台支持。具体变更包括: 1. **新增 Ascend350 平台配置文件**(42 个 JSON):为每个算子新增 op_host/config/ascend350/ 下的二进制配置 JSON 2. **注册 Ascend350 平台**:在各算子 _def.cpp 中添加 his->AICore().AddConfig(ascend350, aicoreConfig) 3. **更新编译配置**:修改各算子 CMakeLists.txt,添加 Ascend350 编译选项;更新 scendc_config.json 中对应算子的 compute_units 列表,将 [ascend950] 扩展为 [ascend950, ascend350] 4. **更新 Fusion Pass 平台判断**:在 bucketize_v2_fusion_pass、inplace_add_fusion_pass、gather_fusion_pass、tensor_scatter_add_fusion_pass、sorted_sparse_segment_mean_grad_fusion_pass 中将 Ascend350 加入平台白名单 涉及算子(35+): - index: bucketize_v2, concat_offset, gather_elements, gather_nd, gather_v2, index_fill, index_fill_d, index_put_v2, inplace_index_add, inplace_index_fill, linear_index_v2, masked_scatter, repeat_interleave, reverse_sequence, reverse_v2, scatter, scatter_add, scatter_add_with_sorted, scatter_elements, scatter_elements_v2, scatter_nd, scatter_nd_add, scatter_nd_max, scatter_nd_min, scatter_nd_update, scatter_sub, scatter_update, segment_sum, sorted_sparse_segment_mean_grad, sparse_segment_mean, sparse_to_dense, unsorted_segment_max, unsorted_segment_min - pooling: avg_pool, avg_pool_v2 - 公共库: scatter_nd_common, unsorted_segment_common, sort_lib ## 关联的Issue - #5651 ## 测试 obp冒烟、david冒烟已通过 ## 文档更新 NA ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!9754 | 30 天前 |
| MicroAPI namespace to Reg for arch35 kernels Co-authored-by: gcw_DS4cmz2b<1312925094@qq.com> # message auto-generated for no-merge-commit merge: !9267 merge rename into master MicroAPI namespace to Reg for arch35 kernels Created-by: gcw_DS4cmz2b Commit-by: gcw_DS4cmz2b Merged-by: cann-robot Description: ## 描述 修改了index,activation,matmul,conv,foreach,optim,experimental,vfusion,hash这几个文件夹内的命名空间,将MicroAPI-->Reg ## 关联的Issue [多个文件夹内的算子命名空间使用的MicroAPI,应改为Reg](https://gitcode.com/cann/ops-nn/issues/5218) ## 测试 验证方法 严格按四步流程,逐算子验证: 1. Step 1:编译原始代码,保存 baseline binary .o 文件 MD5 2. Step 2:执行 MicroAPI → Reg 替换 3. Step 3:编译替换后代码,保存 after binary .o 文件 MD5 4. Step 4:对比 A_before.md5 与 B_after.md5 平台:ascend950,编译参数:--soc=ascend950 --ops=<op> -j16 验证替换前后 binary 产物 MD5 完全一致。 冒烟,代码审查均通过 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!9267 | 1 个月前 |
| 将卷积和matmul的ut根据版本隔离开, 整改950 ophost ut Co-authored-by: 18811725231<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !9549 merge master into master 将卷积和matmul的ut根据版本隔离开, 整改950 ophost ut Created-by: yang-di52 Commit-by: 18811725231 Merged-by: cann-robot Description: ## 描述 主要修改内容: 1. nn仓完成和legacy common 动态库解耦后,卷积和matmul的不同版本 ophost ut 已经不能混合一起跑了。需要版本隔离 2. ascend950的ut全量编译 失败,需要修改 ## 关联的Issue [https://gitcode.com/cann/ops-nn/issues/5425](https://gitcode.com/cann/ops-nn/issues/5425) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!9549 | 1 个月前 |
| Feature: 为 index 和 pooling 类算子新增 Ascend350 平台支持 Co-authored-by: klein8793<zhangli24@huawei.com> # message auto-generated for no-merge-commit merge: !9754 merge dev_zl_2026_0902 into master Feature: 为 index 和 pooling 类算子新增 Ascend350 平台支持 Created-by: klein8793 Commit-by: klein8793 Merged-by: cann-robot Description: ## 描述 为 index 和 pooling 类算子新增 Ascend350 平台支持。具体变更包括: 1. **新增 Ascend350 平台配置文件**(42 个 JSON):为每个算子新增 op_host/config/ascend350/ 下的二进制配置 JSON 2. **注册 Ascend350 平台**:在各算子 _def.cpp 中添加 his->AICore().AddConfig(ascend350, aicoreConfig) 3. **更新编译配置**:修改各算子 CMakeLists.txt,添加 Ascend350 编译选项;更新 scendc_config.json 中对应算子的 compute_units 列表,将 [ascend950] 扩展为 [ascend950, ascend350] 4. **更新 Fusion Pass 平台判断**:在 bucketize_v2_fusion_pass、inplace_add_fusion_pass、gather_fusion_pass、tensor_scatter_add_fusion_pass、sorted_sparse_segment_mean_grad_fusion_pass 中将 Ascend350 加入平台白名单 涉及算子(35+): - index: bucketize_v2, concat_offset, gather_elements, gather_nd, gather_v2, index_fill, index_fill_d, index_put_v2, inplace_index_add, inplace_index_fill, linear_index_v2, masked_scatter, repeat_interleave, reverse_sequence, reverse_v2, scatter, scatter_add, scatter_add_with_sorted, scatter_elements, scatter_elements_v2, scatter_nd, scatter_nd_add, scatter_nd_max, scatter_nd_min, scatter_nd_update, scatter_sub, scatter_update, segment_sum, sorted_sparse_segment_mean_grad, sparse_segment_mean, sparse_to_dense, unsorted_segment_max, unsorted_segment_min - pooling: avg_pool, avg_pool_v2 - 公共库: scatter_nd_common, unsorted_segment_common, sort_lib ## 关联的Issue - #5651 ## 测试 obp冒烟、david冒烟已通过 ## 文档更新 NA ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [ ] AI辅助编写 See merge request: cann/ops-nn!9754 | 30 天前 |
| 产品名称修改 Co-authored-by: y60124828<yanglou1@h-partners.com> # message auto-generated for no-merge-commit merge: !11292 merge master into master 产品名称修改 Created-by: yanglu-1 Commit-by: y60124828 Merged-by: cann-robot Description: ## 描述 产品名称修改 ## 关联的Issue 关联Issue [#6089](https://gitcode.com/cann/ops-nn/issues/6089) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!11292 | 18 天前 |