Skip to content

Commit a6a1c48

Browse files
committed
remove redundant usm_type tests
1 parent 76aaf9f commit a6a1c48

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
@@ -112,34 +112,6 @@ def test_hyper_complex_contig(np_call, dpt_call, dtype):
112112
)
113113

114114

115-
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
116-
@pytest.mark.parametrize("usm_type", ["device", "shared", "host"])
117-
def test_hyper_usm_type(np_call, dpt_call, usm_type):
118-
q = get_queue_or_skip()
119-
120-
arg_dt = np.dtype("f4")
121-
input_shape = (10, 10, 10, 10)
122-
X = dpt.empty(input_shape, dtype=arg_dt, usm_type=usm_type, 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-
Y = dpt_call(X)
134-
assert Y.usm_type == X.usm_type
135-
assert Y.sycl_queue == X.sycl_queue
136-
assert Y.flags.c_contiguous
137-
138-
expected_Y = np_call(dpt.asnumpy(X))
139-
tol = 8 * dpt.finfo(Y.dtype).resolution
140-
assert_allclose(dpt.asnumpy(Y), expected_Y, atol=tol, rtol=tol)
141-
142-
143115
@pytest.mark.parametrize("np_call, dpt_call", _all_funcs)
144116
@pytest.mark.parametrize("dtype", _all_dtypes)
145117
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
@@ -120,34 +120,6 @@ def test_trig_complex_contig(np_call, dpt_call, dtype):
120120
assert_allclose(dpt.asnumpy(Z), expected, atol=tol, rtol=tol)
121121

122122

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

0 commit comments

Comments
 (0)