Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dpctl/tensor/libtensor/source/sorting/argsort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ py_argsort(const dpctl::tensor::usm_ndarray &src,
"Output index array must have data type int32 or int64");
}

// handle special case when both reduction and iteration are 1D contiguous
bool is_src_c_contig = src.is_c_contiguous();
bool is_dst_c_contig = dst.is_c_contiguous();

Expand All @@ -150,7 +149,8 @@ py_argsort(const dpctl::tensor::usm_ndarray &src,
return std::make_pair(keep_args_alive_ev, comp_ev);
}

return std::make_pair(sycl::event(), sycl::event());
throw py::value_error(
"Both source and destination arrays must be C-contiguous");
}

using dpctl::tensor::kernels::sort_contig_fn_ptr_t;
Expand Down
4 changes: 2 additions & 2 deletions dpctl/tensor/libtensor/source/sorting/sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ py_sort(const dpctl::tensor::usm_ndarray &src,
"the same value data type");
}

// handle special case when both reduction and iteration are 1D contiguous
bool is_src_c_contig = src.is_c_contiguous();
bool is_dst_c_contig = dst.is_c_contiguous();

Expand All @@ -144,7 +143,8 @@ py_sort(const dpctl::tensor::usm_ndarray &src,
return std::make_pair(keep_args_alive_ev, comp_ev);
}

return std::make_pair(sycl::event(), sycl::event());
throw py::value_error(
"Both source and destination arrays must be C-contiguous");
}

using dpctl::tensor::kernels::sort_contig_fn_ptr_t;
Expand Down
Loading