| Files | Last commit | Last update |
|---|---|---|
fix: 迁移onnx插件ParseParams API并补充framework层UT用例 Co-authored-by: clinglai0517<laichangling@huawei.com> # message auto-generated for no-merge-commit merge: !5105 merge onnx-fix-0826 into master fix: 迁移onnx插件ParseParams API并补充framework层UT用例 Created-by: clinglai0517 Commit-by: clinglai0517 Merged-by: cann-robot Description: ## 描述 将 math 仓 4 个 onnx 插件的参数解析从旧 API ParseParamsFn(const Message*, ge::Operator&) 迁移至新 API ParseParamsByOperatorFn(const ge::Operator&, ge::Operator&),并补齐 framework 层 UT 构建体系与用例。 本次修改: 1. **插件 API 迁移**:Cast/NPUDtypeCast(math/cast)、Shape(math/shape)、NPUFormatCast(conversion/npu_format_cast)、NPURotaryMul(common)4 个插件的注册函数切换为 ParseParamsByOperatorFn,头文件依赖收敛为 graph/operator.h + register/register.h;空实现保持签名兼容并显式标记未使用参数,消除 -Wunused-parameter 告警(-Werror 下构建必须)。 2. **framework 层 UT 支持**:cmake/ut.cmake 新增 OP_FRAMEWORK_MODULE_NAME 及 add_framework_ut_modules,cmake/func.cmake 的 add_all_ut_sources 增加 framework 用例收集,tests/ut/op_host/CMakeLists.txt 将 math_op_framework_ut_cases 链接进 math_op_host_ut 并补充 graph_base 依赖(修复缺符号链接失败)。 3. **新增 UT 用例**:为上述 4 个插件补充 tests/ut/framework/test_*_onnx_plugin.cpp 用例(含 Shape 的 dtype=INT64 校验),并通过 common/tests 与各算子 tests/ut 的 CMakeLists 纳入构建。 ## 关联的Issue Issue #2892 ## 测试 1. pre-commit run(变更文件):全部通过,包括 clang-format、codespell 与 OAT 合规检查。 2. 容器内(CANN 9.0.0, Ascend 910B3)增量重建 math_op_host_ut 并运行:1853 tests from 303 test suites,**全部 PASSED**。 3. 新增 4 个 framework 用例(OnnxNpuDtypePluginTest / OnnxShapePluginTest / OnnxNpuFormatCastPluginTest / OnnxNpuRotaryMulPluginTest)均执行通过。 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!5105 | 2 months ago | |
fix: ONNX插件解析零值属性异常 Co-authored-by: clinglai0517<laichangling@huawei.com> # message auto-generated for no-merge-commit merge: !5896 merge fix/onnx-zero-attr-parsing into master fix: ONNX插件解析零值属性异常 Created-by: clinglai0517 Commit-by: clinglai0517 Merged-by: cann-robot Description: ## 描述 GE 序列化 ONNX 算子属性为 JSON 时,会省略值为 0 的标量 int 字段 "i"。部分 ops-math 插件以 attr.contains("i") 判断属性是否存在,导致显式零值被错误回退到算子默认值或误判为必需属性缺失。 本次修改: - 按属性 name 判断属性是否存在;i 字段缺失时按 protobuf 标量默认值 0 处理。 - 修复 Correlation、ReverseSequence、NPUOneHot 的零值属性解析。 - 完善 3 个插件的 framework UT,覆盖显式零值、属性缺省、正常属性及异常 JSON 等场景。 ## 关联的Issue Closes #3270 https://gitcode.com/cann/ops-math/issues/3270 ## 测试 - ONNX 插件构建:bash build.sh --onnxplugin -j16,通过。 - op_host UT 构建:bash build.sh -u --ophost --noexec --ops=correlation,reverse_sequence,one_hot -j64,通过。 - 专项 UT:Correlation、ReverseSequence、OneHotD 共 22 个用例,全部 PASSED。 - pre-commit:trailing whitespace、EOF、merge conflict、private key、clang-format、codespell、OAT 全部通过。 - 验证环境:Ascend 910B3 / CANN 9.0.0。 ## 文档更新 不涉及。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-math!5896 | 1 month ago | |
fix: 迁移onnx插件ParseParams API并补充framework层UT用例 Co-authored-by: clinglai0517<laichangling@huawei.com> # message auto-generated for no-merge-commit merge: !5105 merge onnx-fix-0826 into master fix: 迁移onnx插件ParseParams API并补充framework层UT用例 Created-by: clinglai0517 Commit-by: clinglai0517 Merged-by: cann-robot Description: ## 描述 将 math 仓 4 个 onnx 插件的参数解析从旧 API ParseParamsFn(const Message*, ge::Operator&) 迁移至新 API ParseParamsByOperatorFn(const ge::Operator&, ge::Operator&),并补齐 framework 层 UT 构建体系与用例。 本次修改: 1. **插件 API 迁移**:Cast/NPUDtypeCast(math/cast)、Shape(math/shape)、NPUFormatCast(conversion/npu_format_cast)、NPURotaryMul(common)4 个插件的注册函数切换为 ParseParamsByOperatorFn,头文件依赖收敛为 graph/operator.h + register/register.h;空实现保持签名兼容并显式标记未使用参数,消除 -Wunused-parameter 告警(-Werror 下构建必须)。 2. **framework 层 UT 支持**:cmake/ut.cmake 新增 OP_FRAMEWORK_MODULE_NAME 及 add_framework_ut_modules,cmake/func.cmake 的 add_all_ut_sources 增加 framework 用例收集,tests/ut/op_host/CMakeLists.txt 将 math_op_framework_ut_cases 链接进 math_op_host_ut 并补充 graph_base 依赖(修复缺符号链接失败)。 3. **新增 UT 用例**:为上述 4 个插件补充 tests/ut/framework/test_*_onnx_plugin.cpp 用例(含 Shape 的 dtype=INT64 校验),并通过 common/tests 与各算子 tests/ut 的 CMakeLists 纳入构建。 ## 关联的Issue Issue #2892 ## 测试 1. pre-commit run(变更文件):全部通过,包括 clang-format、codespell 与 OAT 合规检查。 2. 容器内(CANN 9.0.0, Ascend 910B3)增量重建 math_op_host_ut 并运行:1853 tests from 303 test suites,**全部 PASSED**。 3. 新增 4 个 framework 用例(OnnxNpuDtypePluginTest / OnnxShapePluginTest / OnnxNpuFormatCastPluginTest / OnnxNpuRotaryMulPluginTest)均执行通过。 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!5105 | 2 months ago | |
fix: ONNX插件解析零值属性异常 Co-authored-by: clinglai0517<laichangling@huawei.com> # message auto-generated for no-merge-commit merge: !5896 merge fix/onnx-zero-attr-parsing into master fix: ONNX插件解析零值属性异常 Created-by: clinglai0517 Commit-by: clinglai0517 Merged-by: cann-robot Description: ## 描述 GE 序列化 ONNX 算子属性为 JSON 时,会省略值为 0 的标量 int 字段 "i"。部分 ops-math 插件以 attr.contains("i") 判断属性是否存在,导致显式零值被错误回退到算子默认值或误判为必需属性缺失。 本次修改: - 按属性 name 判断属性是否存在;i 字段缺失时按 protobuf 标量默认值 0 处理。 - 修复 Correlation、ReverseSequence、NPUOneHot 的零值属性解析。 - 完善 3 个插件的 framework UT,覆盖显式零值、属性缺省、正常属性及异常 JSON 等场景。 ## 关联的Issue Closes #3270 https://gitcode.com/cann/ops-math/issues/3270 ## 测试 - ONNX 插件构建:bash build.sh --onnxplugin -j16,通过。 - op_host UT 构建:bash build.sh -u --ophost --noexec --ops=correlation,reverse_sequence,one_hot -j64,通过。 - 专项 UT:Correlation、ReverseSequence、OneHotD 共 22 个用例,全部 PASSED。 - pre-commit:trailing whitespace、EOF、merge conflict、private key、clang-format、codespell、OAT 全部通过。 - 验证环境:Ascend 910B3 / CANN 9.0.0。 ## 文档更新 不涉及。 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: ## AI/Agent生成声明 - [x] AI辅助编写 See merge request: cann/ops-math!5896 | 1 month ago |
| Files | Last commit | Last update |
|---|---|---|
| 2 months ago | ||
| 1 month ago | ||
| 2 months ago | ||
| 1 month ago |