Pull Request已成功合入, 合并人@CANN-robot
(感谢 lu-yukun 的贡献)以下是根据您提交的修改文件推荐的Reviewer和Committer序列,需各模块评审通过后方可合入
| Module List | Reviewers | Committers |
|---|---|---|
| */*/op_graph/*_proto.h | N/A | wangyongguang, tang-lei01 |


🔵 source code change are detected, tasks labels is removed in this pull request!


问题/功能描述
本次PR为ArgMaxWithValue和ArgMinWithValue算子新增了可选的indice_dtype属性,以解决算子输出索引数据类型固定为DT_INT32的问题。该增强使得算子能够灵活输出DT_INT64类型的索引,从而更好地兼容需要更大索引范围的场景(如PyTorch框架对接),提升了算子的灵活性和跨框架兼容性。
修改方案描述
在ArgMaxWithValue和ArgMinWithValue两个算子的原型定义中,分别增加了一个名为indice_dtype、类型为Type的属性,并将其默认值设置为DT_INT32。该方案允许用户在调用算子时显式指定输出索引的数据类型(DT_INT32或DT_INT64),而无需修改算子内核或依赖外部转换,简化了使用流程并增强了接口的易用性。


The following users do not have permission to comment /lgtm or /approve on any module in this PR:
Coopermassaki


Review Guide
This Pull-Request Passes Review.
Committers who wrote a comment of /approve are: wangyongguang, zhou-qilong.
Reviewers who wrote a comment of /lgtm are: wangrui_, zhou-qilong, wangyongguang.


描述
add argmax(min)withvalue attr for dtype
关联的Issue
https://gitcode.com/cann/ops-math/issues/642
测试
文档更新
类型标签