| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: migrate aicpu opdef json payloads to cpp defs Co-authored-by: zhaowenrui666<zhaowenrui7@huawei.com> # message auto-generated for no-merge-commit merge: !4390 merge def into master feat: migrate aicpu opdef json payloads to cpp defs Created-by: zhaowenrui666 Commit-by: zhaowenrui666 Merged-by: cann-robot Description: ## 描述 当前部分 AICPU 算子的 opdef 仍以 JSON 形式维护,构建时需要额外收集 JSON 文件,算子定义入口和维护方式不统一,不利于后续持续迁移和统一管理。 本次 PR 做了什么: 1. 将 Elu、Assert、Identity、GatherV2、ReverseSequence、ScatterElements、TensorScatterUpdate、Where 等 AICPU 算子的 opdef 从 JSON 迁移为 C++ 定义文件。 2. 新增 common/inc/aicpu/aicpu_op_def.h,补充 AICPU opdef 的公共声明。 3. 调整相关 CMakeLists.txt 以及 cmake/opbuild.cmake、cmake/symbol.cmake,支持 *_aicpu_def.cpp 的统一收集和构建。 4. 新增 scripts/kernel/binary_script/aicpu_parser_ini_to_json.py,补齐相关脚本能力。 ## 关联的Issue - 关联 Issue #2438 - https://gitcode.com/cann/ops-nn/issues/2438 ## 测试 1. 已核对 PR 对应提交为 08453e64840072937d255e0ad154825266439ba4。 2. 已重新执行 cmake -S /home/jiumao/open/ops-nn -B /home/jiumao/open/ops-nn/build_custom,完成 build_custom 配置刷新。 3. 已执行 cmake --build /home/jiumao/open/ops-nn/build_custom --target gen_aicpu_json_from_opdef -j8,重新生成 build_custom/autogen/aicpu_kernel.ini、build_custom/aicpu_opdef_kernel.json、build_custom/cust_aicpu_kernel.json。 4. 已手动执行 python3 scripts/kernel/binary_script/aicpu_parser_ini_to_json.py build_custom/autogen/aicpu_kernel.ini /tmp/ops_nn_aicpu_verify.json,输出 Compile op info cfg successfully.。 5. 已执行 python3 -m unittest tests/scripts/parser_ini_guard/test_aicpu_parser_ini_to_json.py,6/6 用例通过。 6. 已完成 before/after JSON 对比,8 个算子的金标准字段全部保留,无字段缺失。 7. 已完成 I/O normalized vs canndev 校验,Elu、Assert、Identity、GatherV2、ReverseSequence、ScatterElements、TensorScatterUpdate、Where 与 canndev 基线一致。 8. 本次按 skill 仅验证 custom 路径;未修改 parser_ini.py,因此 AICore before/after 回归按口径豁免。 ## 文档更新 无 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!4390 | 4 个月前 | |
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 个月前 | |
fallback 迁移 Co-authored-by: 18811725231<yangdi52@huawei.com> # message auto-generated for no-merge-commit merge: !8131 merge ziliao into master fallback 迁移 Created-by: yang-di52 Commit-by: 18811725231 Merged-by: cann-robot Description: ## 描述 变更摘要 此 PR 为三个量化相关算子新增了 fallback 执行实现,均以 IMPL_OP 宏注册到 fallback 命名空间中。当硬件原生不支持这些算子时,框架将通过 fallback 路径调用对应的 aclnn API 在 Host 侧完成计算,从而提供兜底能力。 ### 主要改动 * 新增 QuantBatchMatmulInplaceAdd fallback 实现: 在 quant_batch_matmul_inplace_add_fallback.cpp 中,通过 QuantBatchMatmulInplaceAddExecuteFunc 获取输入张量 x1、x2、x2Scale、可选 x1Scale 及 yRef,解析 transposeX1、transposeX2、groupSize 属性后调用 aclnnQuantBatchMatmulInplaceAdd API 执行计算。 * 新增 QuantBatchMatmulV3 fallback 实现: 在 quant_batch_matmul_v3_fallback.cpp 中,QuantBatchMatmulV3ExecuteFunc 根据输入数据类型(是否属于 v5InputDtypes 或满足 isA8W8GB 条件)分发到 aclnnQuantMatmulV5 或 aclnnQuantMatmulV4 API,支持 float8/fp4 等新数据类型及 INT8 分组量化场景。 * 新增 TransQuantParamV2 fallback 实现: 在 trans_quant_param_v2_fallback.cpp 中,TransQuantParamV2ExecuteFunc 获取 scale、可选 offset 及输出张量,解析 roundMode 属性后调用 aclnnTransQuantParamV3 API 完成量化参数的转换。 ## 关联的Issue [#4535](https://gitcode.com/cann/ops-nn/issues/4535) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 <!-- [x] 表示选中 --> - [ ] AI辅助编写 See merge request: cann/ops-nn!8131 | 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 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 个月前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 2 个月前 |