| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
KthValue需要指定ND格式以修复降维时报错 Co-authored-by: ConanHuang<huangxiaobin1@huawei.com> # message auto-generated for no-merge-commit merge: !4284 merge fixkth into master KthValue需要指定ND格式以修复降维时报错 Created-by: ConanHuang Commit-by: ConanHuang Merged-by: cann-robot Description: ## 描述 修复了 KthValue 算子在降维场景下因输出tensor格式不匹配导致的报错问题。原实现中,输出tensor values 和 indices 直接沿用了输入tensor的 ViewFormat,但在降维后输出维度减少,沿用原格式会导致shape与format不一致。改为强制指定 op::Format::FORMAT_ND 格式,确保输出tensor的格式与降维后的shape正确对应。 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/2405 ## 测试 1 二级冒烟通过 2 kthvalue st通过 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!4284 | 1 个月前 | |
新增 kthvalue 算子 Co-authored-by: ConanHuang<huangxiaobin1@huawei.com> # message auto-generated for no-merge-commit merge: !3174 merge master into master 新增 kthvalue 算子 Created-by: ConanHuang Commit-by: ConanHuang Merged-by: cann-robot Description: ## 描述 新增 KthValue 算子,重构 sort 公共逻辑 1. 新增 KthValue 算子,支持沿指定维度查找第 k 小值及其索引。支持数据类型:float16、float32、bfloat16、int8、int16、int32、int64、uint8、uint16、uint32、uint64,支持 last-axis 和 non-last small-axis(轴长 ∈ 2, 2048)两种场景。 2. 实现多策略 Tiling 路由:small axis insertion / two-stage、radix one-core / more-core、merge sort one-core / more-core、merge intra-core、non-last small axis、axis-one copy(axis=1 特化)。 3. 将 sort 算子的公共排序逻辑抽取到 sort/op_kernel/arch35/common/ 和 sort/op_host/arch35/sort_tiling_common.{h,cpp},供 kth_value 复用,包括 radix sort、merge sort、small axis、non-last small axis 等 base 类。 4. 新增 kth_value 的 tiling UT 和 infershape UT。 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/2018 ## 测试 1 sort算子原始250+ST用例全部通过 2 sort算子新增80+ 非尾轴排序ST用例全部通过 3 kthvalue算子新增100+ ST用例,涵盖各个模板,全部通过 4 topkv2,sort_with_index ST用例全部通过 5 二级冒烟通过 ## 文档更新 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!3174 | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 2 个月前 |