Skip to content

Commit adab4ab

Browse files
committed
remove redundant usm_type tests
1 parent 8bd0e7f commit adab4ab

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

dpctl/tests/elementwise/test_hyperbolic.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -108,34 +108,6 @@ def test_hyper_complex_contig(np_call, dpt_call, dtype):
108108
)
109109

110110

111-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
112-
@pytest.mark.parametrize("usm_type", ["device", "shared", "host"])
113-
def test_hyper_usm_type(np_call, dpt_call, usm_type):
114-
q = get_queue_or_skip()
115-
116-
arg_dt = np.dtype("f4")
117-
input_shape = (10, 10, 10, 10)
118-
X = dpt.empty(input_shape, dtype=arg_dt, usm_type=usm_type, 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-
Y = dpt_call(X)
130-
assert Y.usm_type == X.usm_type
131-
assert Y.sycl_queue == X.sycl_queue
132-
assert Y.flags.c_contiguous
133-
134-
expected_Y = np_call(dpt.asnumpy(X))
135-
tol = 8 * dpt.finfo(Y.dtype).resolution
136-
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)
137-
138-
139111
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
140112
@pytest.mark.parametrize("dtype", _all_dtypes)
141113
def test_hyper_order(np_call, dpt_call, dtype):

dpctl/tests/elementwise/test_trigonometric.py

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

120120

121-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
122-
@pytest.mark.parametrize("usm_type", ["device", "shared", "host"])
123-
def test_trig_usm_type(np_call, dpt_call, usm_type):
124-
q = get_queue_or_skip()
125-
126-
arg_dt = np.dtype("f4")
127-
input_shape = (10, 10, 10, 10)
128-
X = dpt.empty(input_shape, dtype=arg_dt, usm_type=usm_type, 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-
Y = dpt_call(X)
140-
assert Y.usm_type == X.usm_type
141-
assert Y.sycl_queue == X.sycl_queue
142-
assert Y.flags.c_contiguous
143-
144-
expected_Y = np_call(dpt.asnumpy(X))
145-
tol = 8 * dpt.finfo(Y.dtype).resolution
146-
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)
147-
148-
149121
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
150122
@pytest.mark.parametrize("dtype", _all_dtypes)
151123
def test_trig_order(np_call, dpt_call, dtype):

0 commit comments

Comments
 (0)