已合并
kth_value: 新增radix_select和small_axis_short_rank_select调度策略 #3804
黄晓彬创建于 7月5日
kth_value: 新增radix_select和small_axis_short_rank_select调度策略 #3804
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 黄晓彬 的贡献)7月5日 添加了label:cann-cla/yes
CANN-robot
7月5日 评论:
7月5日 评论:
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 |
|---|---|---|
| math/sort | ✅ wangrui_, 宋恺 (2/2) | ✅ 宋恺 (1/1) |
| repo-cann/ops-math | ✅ 宋恺, wangrui_ (2/2) | ✅ 宋恺 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
ConanHuang, thanks for your pull request. All authors of the commits have signed the CLA. 👍


此处折叠了59条消息 查看更多
songkai111
7月6日 评论:
7月6日 评论:
/approve


7月6日 添加了label:lgtmapproved
7月6日 关闭了关联的issue
7月6日 合入了pull request
描述
当前 KthValue 算子已支持多种排序/选择策略,但在部分典型场景仍存在性能优化空间:
大型 last-axis 场景下,现有 radix_more_core 路径需要完成较完整的 radix sort 流程,再提取第 k 个元素。对于 kth_value 只需要单个 kth value/index 的语义而言,全量排序存在冗余计算。
小轴 int64/uint64 场景下,若 k 靠近头部或尾部,现有 small-axis two-stage / insertion 路径仍会完成完整排序,再提取第 k 个元素。对于短 rank 场景,可以只维护少量候选元素,避免全排序开销。
本需求在现有 KthValue 多策略框架基础上新增两条专项选择路径:radix_select 和 small_axis_short_rank_select,进一步减少不必要排序计算,提升大轴和小轴短 rank 场景性能。
关联的Issue
https://gitcode.com/cann/ops-math/issues/2155
测试
1 kthvalue 108个ST用例功能、性能达标
2 sort 331个ST用例功能、性能达标
3 二级冒烟通过
文档更新
不涉及
类型标签