| Files | Last commit | Last update |
|---|---|---|
feat: cummin补充infershape和inferdtype实现及UT用例 Co-authored-by: clinglai0517<laichangling@huawei.com> # message auto-generated for no-merge-commit merge: !4635 merge cummin-infershape into master feat: cummin补充infershape和inferdtype实现及UT用例 Created-by: clinglai0517 Commit-by: clinglai0517 Merged-by: cann-robot Description: ## 描述 补充Cummin 算子 GE 图层推断(InferShape/InferDataType)。原实现仅注册了单输入单输出工具 InferShape4Elewise,而 Cummin 是 1 输入 2 输出(y、argmin),第二个输出 argmin 的 shape 无法得到保证;且原 UT 用例按 2 输入 1 输出编写,与算子定义不符,掩盖了该问题。 修改内容 1. **math/cummin/op_host/cummin_infershape.cpp** - 重写 InferShape:显式处理双输出,y 与 argmin 的 shape 均与输入 x 一致(支持动态 shape 与未知 rank 透传); - 新增 InferDataType:y.dtype 跟随输入 x,argmin.dtype 固定为 int32。 2. **math/cummin/tests/ut/op_host/test_cummin_infershape.cpp** - 按 1 输入 2 输出重写用例,覆盖: - shape:同 shape、标量、动态(-1)、未知 rank(-2); - dtype:float / float16 / bf16 / int32(验证 y 跟随 x、argmin 为 int32)。 ## 关联的Issue Issue [#2620](https://gitcode.com/cann/ops-math/issues/2620) ## 测试 bash bash build.sh -u --ophost --soc=ascend910b --ops=cummin --gtest_filter=CumminInfershape.* 结果:**8/8 用例全部通过**。 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!4635 | 2 months ago |