|
26 | 26 |
|
27 | 27 | @pytest.mark.parametrize("op1_dtype", _integral_dtypes) |
28 | 28 | @pytest.mark.parametrize("op2_dtype", _integral_dtypes) |
29 | | -def test_bitwise_right_shift_dtype_matrix_contig(op1_dtype, op2_dtype): |
| 29 | +def test_bitwise_right_shift_dtype_matrix(op1_dtype, op2_dtype): |
30 | 30 | q = get_queue_or_skip() |
31 | 31 | skip_if_dtype_not_supported(op1_dtype, q) |
32 | 32 | skip_if_dtype_not_supported(op2_dtype, q) |
@@ -56,58 +56,6 @@ def test_bitwise_right_shift_dtype_matrix_contig(op1_dtype, op2_dtype): |
56 | 56 | assert (dpt.asnumpy(r) == r_np).all() |
57 | 57 |
|
58 | 58 |
|
59 | | -@pytest.mark.parametrize("op1_dtype", _integral_dtypes) |
60 | | -@pytest.mark.parametrize("op2_dtype", _integral_dtypes) |
61 | | -def test_bitwise_right_shift_dtype_matrix_strided(op1_dtype, op2_dtype): |
62 | | - q = get_queue_or_skip() |
63 | | - skip_if_dtype_not_supported(op1_dtype, q) |
64 | | - skip_if_dtype_not_supported(op2_dtype, q) |
65 | | - |
66 | | - if op1_dtype != op2_dtype and "u8" in [op1_dtype, op2_dtype]: |
67 | | - return |
68 | | - |
69 | | - sz = 11 |
70 | | - n = 2 * sz |
71 | | - dt1 = dpt.dtype(op1_dtype) |
72 | | - dt2 = dpt.dtype(op2_dtype) |
73 | | - |
74 | | - x1_range_begin = -sz if dpt.iinfo(dt1).min < 0 else 0 |
75 | | - x1 = dpt.arange(x1_range_begin, x1_range_begin + n, dtype=dt1)[::-2] |
76 | | - x2 = dpt.arange(0, n, dtype=dt2)[::2] |
77 | | - |
78 | | - r = dpt.bitwise_right_shift(x1, x2) |
79 | | - assert isinstance(r, dpt.usm_ndarray) |
80 | | - assert r.sycl_queue == x1.sycl_queue |
81 | | - assert r.sycl_queue == x2.sycl_queue |
82 | | - |
83 | | - x1_np = np.arange(x1_range_begin, x1_range_begin + n, dtype=dt1)[::-2] |
84 | | - x2_np = np.arange(0, n, dtype=dt2)[::2] |
85 | | - r_np = np.right_shift(x1_np, x2_np) |
86 | | - |
87 | | - assert r.dtype == r_np.dtype |
88 | | - assert (dpt.asnumpy(r) == r_np).all() |
89 | | - |
90 | | - |
91 | | -@pytest.mark.parametrize("op_dtype", _integral_dtypes) |
92 | | -def test_bitwise_right_shift_range(op_dtype): |
93 | | - q = get_queue_or_skip() |
94 | | - skip_if_dtype_not_supported(op_dtype, q) |
95 | | - |
96 | | - x = dpt.ones(255, dtype=op_dtype) |
97 | | - y = dpt.asarray(64, dtype=op_dtype) |
98 | | - |
99 | | - z = dpt.bitwise_right_shift(x, y) |
100 | | - assert dpt.all(dpt.equal(z, 0)) |
101 | | - |
102 | | - |
103 | | -@pytest.mark.parametrize("dtype", _integral_dtypes) |
104 | | -def test_bitwise_right_shift_inplace_python_scalar(dtype): |
105 | | - q = get_queue_or_skip() |
106 | | - skip_if_dtype_not_supported(dtype, q) |
107 | | - X = dpt.zeros((10, 10), dtype=dtype, sycl_queue=q) |
108 | | - X >>= int(0) |
109 | | - |
110 | | - |
111 | 59 | @pytest.mark.parametrize("op1_dtype", _integral_dtypes) |
112 | 60 | @pytest.mark.parametrize("op2_dtype", _integral_dtypes) |
113 | 61 | def test_bitwise_right_shift_inplace_dtype_matrix(op1_dtype, op2_dtype): |
|
0 commit comments