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,
125
125
" Output index array must have data type int32 or int64" );
126
126
}
127
127
128
- // handle special case when both reduction and iteration are 1D contiguous
129
128
bool is_src_c_contig = src.is_c_contiguous ();
130
129
bool is_dst_c_contig = dst.is_c_contiguous ();
131
130
@@ -150,7 +149,8 @@ py_argsort(const dpctl::tensor::usm_ndarray &src,
150
149
return std::make_pair (keep_args_alive_ev, comp_ev);
151
150
}
152
151
153
- return std::make_pair (sycl::event (), sycl::event ());
152
+ throw py::value_error (
153
+ " Both source and destination arrays must be C-contiguous" );
154
154
}
155
155
156
156
using 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,
123
123
" the same value data type" );
124
124
}
125
125
126
- // handle special case when both reduction and iteration are 1D contiguous
127
126
bool is_src_c_contig = src.is_c_contiguous ();
128
127
bool is_dst_c_contig = dst.is_c_contiguous ();
129
128
@@ -144,7 +143,8 @@ py_sort(const dpctl::tensor::usm_ndarray &src,
144
143
return std::make_pair (keep_args_alive_ev, comp_ev);
145
144
}
146
145
147
- return std::make_pair (sycl::event (), sycl::event ());
146
+ throw py::value_error (
147
+ " Both source and destination arrays must be C-contiguous" );
148
148
}
149
149
150
150
using dpctl::tensor::kernels::sort_contig_fn_ptr_t ;
You can’t perform that action at this time.
0 commit comments