We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da3fbcc commit bec7c81Copy full SHA for bec7c81
dpctl/tensor/libtensor/source/sorting/topk.cpp
@@ -112,13 +112,17 @@ sycl::event topk_caller(sycl::queue &exec_q,
112
{
113
if constexpr (use_radix_sort<argTy>::value) {
114
using dpctl::tensor::kernels::topk_radix_impl;
115
- auto ascending = !largest;
116
- return topk_radix_impl<argTy, IndexTy>(
117
- exec_q, iter_nelems, axis_nelems, k, ascending, arg_cp, vals_cp,
118
- inds_cp, iter_arg_offset, iter_vals_offset, iter_inds_offset,
119
- axis_arg_offset, axis_vals_offset, axis_inds_offset, depends);
+ const auto ascending = !largest;
+
+ if (axis_nelems > 16384) {
+ return topk_radix_impl<argTy, IndexTy>(
+ exec_q, iter_nelems, axis_nelems, k, ascending, arg_cp, vals_cp,
120
+ inds_cp, iter_arg_offset, iter_vals_offset, iter_inds_offset,
121
+ axis_arg_offset, axis_vals_offset, axis_inds_offset, depends);
122
+ }
123
}
- else {
124
125
+ {
126
using dpctl::tensor::kernels::topk_merge_impl;
127
if (largest) {
128
using CompTy =
0 commit comments