Pull Request已成功合入, 合并人@CANN-robot
(感谢 jinpenghe 的贡献)Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| index | ✅ chenqi317, tangweiwei2 (2/2) | ✅ chenqi317 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


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


问题/功能描述
本次PR主要修复了 unsorted_segment_min 算子中 uint32_t 数据类型最大值常量定义错误的问题,该错误可能导致数据溢出或比较逻辑异常。同时,移除了对 uint32_t、uint64_t、int64_t 数据类型在SIMD非排序、动态排序等计算路径中的不必要限制,从而扩展了算子在多种场景下的支持范围,提升了其通用性和正确性。
修改方案描述
核心修改包括两点:一是在公共头文件中,将 uint32_t 类型的最大值常量从 INT32_MAX 修正为 UINT32_MAX,确保 GetDtypeMax 函数返回正确的无符号整数最大值。二是在算子主函数中,移除了针对上述三种数据类型在 TEMPLATE_SIMD_NON_SORT、TEMPLATE_SIMD_DYN_SORT 等关键分支中的提前返回逻辑,使这些数据类型能够正常使用对应的SIMD和全负载优化计算路径,并优化了空张量场景的处理。


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


compile


流水线任务触发成功 [流水线指导]
任务链接 [7e4dae9e269d4f6084e2028ca11407cd]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_experimental | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ⚠️ WARNING | >>>>> | |
| UT_Test_ophost | ✅ SUCCESS | ||
| UT_Test_opapi | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| UT_Test_opgraph | ✅ SUCCESS | ||
| Smoke_A900 | ✅ SUCCESS | >>>>> | >>>>> |
[2026-02-03 15:03:54] CI执行结束


/lgtm


Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: chenqi317.
Reviewers who wrote a comment of /lgtm are: chenqi317, tangweiwei2.


描述
UnsortedSegmentMin支持空tensor。
关联的Issue
https://gitcode.com/cann/ops-nn/issues/762
测试
空tensor用例[[11, 2, 15, 5756, 2, 2, 0], [11, 2, 15, 5756, 2, 2, 0], [1]]测试通过
文档更新
类型标签