File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
dpctl/tensor/libtensor/source/sorting Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ py_argsort(const dpctl::tensor::usm_ndarray &src,
125125 " Output index array must have data type int32 or int64" );
126126 }
127127
128- // handle special case when both reduction and iteration are 1D contiguous
129128 bool is_src_c_contig = src.is_c_contiguous ();
130129 bool is_dst_c_contig = dst.is_c_contiguous ();
131130
@@ -150,7 +149,8 @@ py_argsort(const dpctl::tensor::usm_ndarray &src,
150149 return std::make_pair (keep_args_alive_ev, comp_ev);
151150 }
152151
153- return std::make_pair (sycl::event (), sycl::event ());
152+ throw py::value_error (
153+ " Both source and destination arrays must be C-contiguous" );
154154}
155155
156156using dpctl::tensor::kernels::sort_contig_fn_ptr_t ;
Original file line number Diff line number Diff line change @@ -123,7 +123,6 @@ py_sort(const dpctl::tensor::usm_ndarray &src,
123123 " the same value data type" );
124124 }
125125
126- // handle special case when both reduction and iteration are 1D contiguous
127126 bool is_src_c_contig = src.is_c_contiguous ();
128127 bool is_dst_c_contig = dst.is_c_contiguous ();
129128
@@ -144,7 +143,8 @@ py_sort(const dpctl::tensor::usm_ndarray &src,
144143 return std::make_pair (keep_args_alive_ev, comp_ev);
145144 }
146145
147- return std::make_pair (sycl::event (), sycl::event ());
146+ throw py::value_error (
147+ " Both source and destination arrays must be C-contiguous" );
148148}
149149
150150using dpctl::tensor::kernels::sort_contig_fn_ptr_t ;
You can’t perform that action at this time.
0 commit comments