Skip to content

Commit f293713

Browse files
committed
Resolves #1455
This issue was caused by a typo where when the `axis0` kernels for tree and atomic reductions would be called, the `axis1` kernel would be called instead
1 parent f35d63e commit f293713

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dpctl/tensor/libtensor/source/reductions/reduction_over_axis.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ std::pair<sycl::event, sycl::event> py_reduction_over_axis(
417417
typename std::remove_all_extents<contig_fnT>::type;
418418
contig_fn_ptr_T fn;
419419
if (supports_atomics) {
420-
fn = axis1_atomic_dispatch_table[src_typeid][dst_typeid];
420+
fn = axis0_atomic_dispatch_table[src_typeid][dst_typeid];
421421
}
422422
else {
423-
fn = axis1_temps_dispatch_table[src_typeid][dst_typeid];
423+
fn = axis0_temps_dispatch_table[src_typeid][dst_typeid];
424424
}
425425
if (fn != nullptr) {
426426
sycl::event reduction_over_axis0_contig_ev =
@@ -727,7 +727,7 @@ std::pair<sycl::event, sycl::event> py_tree_reduction_over_axis(
727727
}
728728
}
729729
else if (mat_reduce_over_axis0) {
730-
auto fn = axis1_temps_dispatch_table[src_typeid][dst_typeid];
730+
auto fn = axis0_temps_dispatch_table[src_typeid][dst_typeid];
731731
if (fn != nullptr) {
732732
sycl::event reduction_over_axis0_contig_ev =
733733
fn(exec_q, iter_nelems, reduction_nelems, src.get_data(),
@@ -929,7 +929,6 @@ std::pair<sycl::event, sycl::event> py_search_over_axis(
929929
}
930930

931931
using dpctl::tensor::py_internal::simplify_iteration_space;
932-
using dpctl::tensor::py_internal::simplify_iteration_space_1;
933932

934933
auto const &src_shape_vecs = src.get_shape_vector();
935934
auto const &src_strides_vecs = src.get_strides_vector();

0 commit comments

Comments
 (0)