Skip to content

Commit bea14e7

Browse files
committed
TBD
1 parent e2d9012 commit bea14e7

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

dpnp/tests/third_party/cupy/core_tests/test_core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
class TestSize(unittest.TestCase):
12+
1213
# def tearDown(self):
1314
# # Free huge memory for slow test
1415
# cupy.get_default_memory_pool().free_all_blocks()
@@ -51,6 +52,7 @@ def test_size_huge(self, xp):
5152

5253
@pytest.mark.skip("no cupy._core submodule")
5354
class TestOrder(unittest.TestCase):
55+
5456
@testing.for_orders(_orders.keys())
5557
def test_ndarray(self, order):
5658
order_expect = _orders[order]
@@ -101,6 +103,7 @@ def test_cupy_ndarray(self, dtype):
101103
)
102104
@pytest.mark.skip("compiling cupy headers are not supported")
103105
class TestCuPyHeaders(unittest.TestCase):
106+
104107
def setUp(self):
105108
self.temporary_cache_dir_context = test_raw.use_temporary_cache_dir()
106109
self.cache_dir = self.temporary_cache_dir_context.__enter__()

dpnp/tests/third_party/cupy/core_tests/test_elementwise.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ def test_large_int_upper_3(self, xp, dtype):
119119
and numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0"
120120
):
121121
pytest.skip("numpy promotes dtype differently")
122-
elif dtype == numpy.uint64 and not has_support_aspect64():
122+
elif (
123+
dtype in (numpy.uint64, numpy.ulonglong)
124+
and not has_support_aspect64()
125+
):
123126
pytest.skip("no fp64 support")
124127

125128
a = xp.array([xp.iinfo(dtype).max], dtype=dtype)
@@ -134,7 +137,10 @@ def test_large_int_upper_4(self, xp, dtype):
134137
and numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0"
135138
):
136139
pytest.skip("numpy promotes dtype differently")
137-
elif dtype == numpy.uint64 and not has_support_aspect64():
140+
elif (
141+
dtype in (numpy.uint64, numpy.ulonglong)
142+
and not has_support_aspect64()
143+
):
138144
pytest.skip("no fp64 support")
139145

140146
a = xp.array([xp.iinfo(dtype).max - 1], dtype=dtype)
@@ -163,7 +169,10 @@ def test_large_int_lower_3(self, xp, dtype):
163169
and numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0"
164170
):
165171
pytest.skip("numpy promotes dtype differently")
166-
elif dtype == numpy.uint64 and not has_support_aspect64():
172+
elif (
173+
dtype in (numpy.uint64, numpy.ulonglong)
174+
and not has_support_aspect64()
175+
):
167176
pytest.skip("no fp64 support")
168177

169178
a = xp.array([xp.iinfo(dtype).min], dtype=dtype)
@@ -173,7 +182,10 @@ def test_large_int_lower_3(self, xp, dtype):
173182
@testing.for_int_dtypes(no_bool=True)
174183
@testing.numpy_cupy_array_equal()
175184
def test_large_int_lower_4(self, xp, dtype):
176-
if dtype == numpy.uint64 and not has_support_aspect64():
185+
if (
186+
dtype in (numpy.uint64, numpy.ulonglong)
187+
and not has_support_aspect64()
188+
):
177189
pytest.skip("no fp64 support")
178190

179191
a = xp.array([xp.iinfo(dtype).min + 1], dtype=dtype)

dpnp/tests/third_party/cupy/core_tests/test_flags.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
@pytest.mark.skip("class Flags is not exposed")
1111
class TestFlags(unittest.TestCase):
12+
1213
def setUp(self):
1314
self.flags = flags.Flags(1, 2, 3)
1415

@@ -42,6 +43,7 @@ def test_repr(self):
4243
)
4344
)
4445
class TestContiguityFlags(unittest.TestCase):
46+
4547
def setUp(self):
4648
self.flags = None
4749

dpnp/tests/third_party/cupy/core_tests/test_include.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import os
22
from unittest import mock
33

4-
import cupy
54
import pytest
65

6+
import dpnp as cupy
7+
78
pytest.skip("CUDA compile is not supported", allow_module_level=True)
89

910
_code_base = """

0 commit comments

Comments
 (0)