Skip to content

Commit cf7ec47

Browse files
committed
remove redundant memory order tests
1 parent c36b749 commit cf7ec47

File tree

2 files changed

+0
-63
lines changed

2 files changed

+0
-63
lines changed

dpctl/tests/elementwise/test_hyperbolic.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -107,38 +107,6 @@ def test_hyper_complex_contig(np_call, dpt_call, dtype):
107107
)
108108

109109

110-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
111-
@pytest.mark.parametrize("dtype", _all_dtypes)
112-
def test_hyper_order(np_call, dpt_call, dtype):
113-
q = get_queue_or_skip()
114-
skip_if_dtype_not_supported(dtype, q)
115-
116-
arg_dt = np.dtype(dtype)
117-
input_shape = (4, 4, 4, 4)
118-
X = dpt.empty(input_shape, dtype=arg_dt, sycl_queue=q)
119-
if np_call == np.arctanh:
120-
X[..., 0::2] = -0.4
121-
X[..., 1::2] = 0.3
122-
elif np_call == np.arccosh:
123-
X[..., 0::2] = 2.2
124-
X[..., 1::2] = 5.5
125-
else:
126-
X[..., 0::2] = -4.4
127-
X[..., 1::2] = 5.5
128-
129-
for perms in itertools.permutations(range(4)):
130-
U = dpt.permute_dims(X[:, ::-1, ::-1, :], perms)
131-
with np.errstate(all="ignore"):
132-
expected_Y = np_call(dpt.asnumpy(U))
133-
for ord in ["C", "F", "A", "K"]:
134-
Y = dpt_call(U, order=ord)
135-
tol = 8 * max(
136-
dpt.finfo(Y.dtype).resolution,
137-
np.finfo(expected_Y.dtype).resolution,
138-
)
139-
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)
140-
141-
142110
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
143111
@pytest.mark.parametrize("dtype", ["f2", "f4", "f8"])
144112
def test_hyper_real_strided(np_call, dpt_call, dtype):

dpctl/tests/elementwise/test_trigonometric.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -117,37 +117,6 @@ def test_trig_complex_contig(np_call, dpt_call, dtype):
117117
assert_allclose(dpt.asnumpy(Z), expected, atol=tol, rtol=tol)
118118

119119

120-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
121-
@pytest.mark.parametrize("dtype", _all_dtypes)
122-
def test_trig_order(np_call, dpt_call, dtype):
123-
q = get_queue_or_skip()
124-
skip_if_dtype_not_supported(dtype, q)
125-
126-
arg_dt = np.dtype(dtype)
127-
input_shape = (4, 4, 4, 4)
128-
X = dpt.empty(input_shape, dtype=arg_dt, sycl_queue=q)
129-
if np_call in _trig_funcs:
130-
X[..., 0::2] = np.pi / 6
131-
X[..., 1::2] = np.pi / 3
132-
if np_call == np.arctan:
133-
X[..., 0::2] = -2.2
134-
X[..., 1::2] = 3.3
135-
else:
136-
X[..., 0::2] = -0.3
137-
X[..., 1::2] = 0.7
138-
139-
for perms in itertools.permutations(range(4)):
140-
U = dpt.permute_dims(X[:, ::-1, ::-1, :], perms)
141-
expected_Y = np_call(dpt.asnumpy(U))
142-
for ord in ["C", "F", "A", "K"]:
143-
Y = dpt_call(U, order=ord)
144-
tol = 8 * max(
145-
dpt.finfo(Y.dtype).resolution,
146-
np.finfo(expected_Y.dtype).resolution,
147-
)
148-
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)
149-
150-
151120
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
152121
@pytest.mark.parametrize("dtype", ["f2", "f4", "f8"])
153122
def test_trig_real_strided(np_call, dpt_call, dtype):

0 commit comments

Comments
 (0)