| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 个月前 | |
feat: loss/optim/activation/index/quant/conv 34个算子适配ascend960dt Co-authored-by: caorenlei<caorenlei@huawei.com> # message auto-generated for no-merge-commit merge: !11923 merge 1009 into master feat: loss/optim/activation/index/quant/conv 34个算子适配ascend960dt Created-by: caorenlei Commit-by: caorenlei Merged-by: cann-robot Description: ## 描述 ### 改动原因 v121(ascend960dt/DAV_9201)平台算子适配:责任田内 34 个算子需要在 ascend960dt 平台提供支持。 ### 改动方法(注册级适配为主,2 个算子特殊处理) - **注册链路(全部 34 个算子)**: *_def.cpp 追加 AddConfig("ascend960dt");新增 op_host/config/ascend960dt/(binary.json 与 ascend950 对齐 + simplified_key.ini);算子级 CMakeLists(SUPPORT_COMPUTE_UNIT/SUPPORT_TILING_DIR)与 op_kernel/CMakeLists(COMPUTE_UNITS)追加 ascend960dt 编译目标,修复 960dt 二进制编译时 tiling 库缺失问题(NLLLoss Jenkins 报错根因);ascendc_config.json 追加对应条目 - **apply_ftrl(特例)**:kernel/tiling 整体换用 v121 参考实现(旧式类实现 + 按 dtype 的 tiling key),替换 master 的 atvoss DAG/ElementwiseSch 实现(atvoss 框架未在 960dt 验证) - **deformable_offsets(_grad)**:kernel 零改动,仅注册级适配 - **swiglu_mx_quant(_with_dual_axis)**:入口溢出模式保存/恢复的 #if __NPU_ARCH__ == 3510 扩展为 3510 || 9201;swiglu_mx_quant_with_dual_axis kernel 体内溢出模式置位同步扩展,保证 960dt 数值行为与 950 一致 - **binary_cross_entropy_grad 等 6 算子**:kernel 由 atvoss 纯模板覆盖为 RegBase 写法(v121 参考,Reg:: 命名约定) 涉及算子(34):loss 19 个(binary_cross_entropy(_grad)、cross_entropy_loss(_grad)、ctc_loss_v2(_grad)、kl_div_loss_grad、l1_loss_grad、l2_loss、lp_loss、mse_loss(_grad)、nll_loss(_grad)、sigmoid_cross_entropy_with_logits、smooth_l1_loss_v2(_grad_v2)、softmax/sparse_softmax_cross_entropy_with_logits)、optim 11 个(apply_adam(_d/_w/_w_v2)、apply_adagrad_d、apply_gradient_descent、apply_ftrl、adam_apply_one(_with_decay/_assign))、index 1 个(unique_consecutive)、conv 2 个(deformable_offsets(_grad))、quant 2 个(swiglu_mx_quant(_with_dual_axis)) ## 关联的Issue - #6806 ## 测试 - bash build.sh --pkg --soc=ascend950 --jit --ops=<34算子> 编译出包通过 - ttk(Ascend950PR_9579)精度回归:每算子小规模用例分块串行执行,34/34 全 PASS(precision/perf/oob),950 零回归 - ascend960dt 二进制编译需 Jenkins 环境验证(本地工具链 ASC_VALID_SOC_LIST 不含 960dt) ## 文档更新 无 ## 类型标签 - [ ] 🐛 Bug修复 - [x] ✨ 新特性 - [ ] ⚡ 性能优化 - [ ] ♻️ 重构 - [ ] 🧪 测试 - [ ] 📦 构建/CI - [ ] 🔧 配置变更 - [ ] 📝 文档更新 ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-nn!11923 | 8 天前 |