Skip to content

Commit e92d1f9

Browse files
Add tests for strided input where contig implementation is applicable
1 parent c63c545 commit e92d1f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dpctl/tests/test_usm_ndarray_reductions.py

+8
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ def test_search_reduction_kernels(arg_dtype):
169169
m = dpt.argmax(x)
170170
assert m == idx
171171

172+
m = dpt.argmax(dpt.flip(x))
173+
assert m == x.size - 1 - idx
174+
175+
y = dpt.ones(2 * x.size, dtype=arg_dtype, sycl_queue=q)
176+
y[::2] = x
177+
m = dpt.argmax(y)
178+
assert m == 2 * idx
179+
172180
x = dpt.reshape(x, (24, 1025))
173181

174182
x[idx_tup[0], :] = 3

0 commit comments

Comments
 (0)