Skip to content

Commit 33d684d

Browse files
committed
Mute modf umath on CUDA explicitly in the test
1 parent c7b4b3f commit 33d684d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

dpnp/tests/skipped_tests_cuda.tbl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
tests/test_arithmetic.py::TestArithmetic::test_modf_part1
55
tests/test_arithmetic.py::TestArithmetic::test_modf_part2
66
tests/test_sycl_queue.py::test_modf[cuda:gpu:0]
7-
tests/test_umath.py::test_umaths[('modf', 'f')]
8-
tests/test_umath.py::test_umaths[('modf', 'd')]
97
tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticModf::test_modf
108

119
# random

dpnp/tests/test_umath.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
get_float_dtypes,
2121
has_support_aspect16,
2222
has_support_aspect64,
23+
is_cuda_device,
2324
is_gpu_device,
2425
)
2526

@@ -108,8 +109,11 @@ def test_umaths(test_cases):
108109
pytest.skip("dpctl-1652")
109110
elif umath in ["divmod", "frexp"]:
110111
pytest.skip("Not implemented umath")
111-
elif umath == "modf" and args[0].dtype == dpnp.float16:
112-
pytest.skip("dpnp.modf is not supported with dpnp.float16")
112+
elif umath == "modf":
113+
if args[0].dtype == dpnp.float16:
114+
pytest.skip("dpnp.modf is not supported with dpnp.float16")
115+
elif is_cuda_device():
116+
pytest.skip("dpnp.modf is not supported on CUDA device")
113117

114118
expected = getattr(numpy, umath)(*args)
115119
result = getattr(dpnp, umath)(*iargs)

0 commit comments

Comments
 (0)