Skip to content

Commit 0a7c95a

Browse files
committed
remove redundant memory order tests
1 parent 878640b commit 0a7c95a

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
@@ -111,38 +111,6 @@ def test_hyper_complex_contig(np_call, dpt_call, dtype):
111111
)
112112

113113

114-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
115-
@pytest.mark.parametrize("dtype", _all_dtypes)
116-
def test_hyper_order(np_call, dpt_call, dtype):
117-
q = get_queue_or_skip()
118-
skip_if_dtype_not_supported(dtype, q)
119-
120-
arg_dt = np.dtype(dtype)
121-
input_shape = (4, 4, 4, 4)
122-
X = dpt.empty(input_shape, dtype=arg_dt, sycl_queue=q)
123-
if np_call == np.arctanh:
124-
X[..., 0::2] = -0.4
125-
X[..., 1::2] = 0.3
126-
elif np_call == np.arccosh:
127-
X[..., 0::2] = 2.2
128-
X[..., 1::2] = 5.5
129-
else:
130-
X[..., 0::2] = -4.4
131-
X[..., 1::2] = 5.5
132-
133-
for perms in itertools.permutations(range(4)):
134-
U = dpt.permute_dims(X[:, ::-1, ::-1, :], perms)
135-
with np.errstate(all="ignore"):
136-
expected_Y = np_call(dpt.asnumpy(U))
137-
for ord in ["C", "F", "A", "K"]:
138-
Y = dpt_call(U, order=ord)
139-
tol = 8 * max(
140-
dpt.finfo(Y.dtype).resolution,
141-
np.finfo(expected_Y.dtype).resolution,
142-
)
143-
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)
144-
145-
146114
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
147115
@pytest.mark.parametrize("dtype", ["f2", "f4", "f8"])
148116
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
@@ -119,37 +119,6 @@ def test_trig_complex_contig(np_call, dpt_call, dtype):
119119
assert_allclose(dpt.asnumpy(Z), expected, atol=tol, rtol=tol)
120120

121121

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

0 commit comments

Comments
 (0)