Skip to content

Commit

Permalink
TBD
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed Nov 29, 2024
1 parent e2d9012 commit bea14e7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
3 changes: 3 additions & 0 deletions dpnp/tests/third_party/cupy/core_tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


class TestSize(unittest.TestCase):

# def tearDown(self):
# # Free huge memory for slow test
# cupy.get_default_memory_pool().free_all_blocks()
Expand Down Expand Up @@ -51,6 +52,7 @@ def test_size_huge(self, xp):

@pytest.mark.skip("no cupy._core submodule")
class TestOrder(unittest.TestCase):

@testing.for_orders(_orders.keys())
def test_ndarray(self, order):
order_expect = _orders[order]
Expand Down Expand Up @@ -101,6 +103,7 @@ def test_cupy_ndarray(self, dtype):
)
@pytest.mark.skip("compiling cupy headers are not supported")
class TestCuPyHeaders(unittest.TestCase):

def setUp(self):
self.temporary_cache_dir_context = test_raw.use_temporary_cache_dir()
self.cache_dir = self.temporary_cache_dir_context.__enter__()
Expand Down
20 changes: 16 additions & 4 deletions dpnp/tests/third_party/cupy/core_tests/test_elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def test_large_int_upper_3(self, xp, dtype):
and numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0"
):
pytest.skip("numpy promotes dtype differently")
elif dtype == numpy.uint64 and not has_support_aspect64():
elif (
dtype in (numpy.uint64, numpy.ulonglong)
and not has_support_aspect64()
):
pytest.skip("no fp64 support")

a = xp.array([xp.iinfo(dtype).max], dtype=dtype)
Expand All @@ -134,7 +137,10 @@ def test_large_int_upper_4(self, xp, dtype):
and numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0"
):
pytest.skip("numpy promotes dtype differently")
elif dtype == numpy.uint64 and not has_support_aspect64():
elif (
dtype in (numpy.uint64, numpy.ulonglong)
and not has_support_aspect64()
):
pytest.skip("no fp64 support")

a = xp.array([xp.iinfo(dtype).max - 1], dtype=dtype)
Expand Down Expand Up @@ -163,7 +169,10 @@ def test_large_int_lower_3(self, xp, dtype):
and numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0"
):
pytest.skip("numpy promotes dtype differently")
elif dtype == numpy.uint64 and not has_support_aspect64():
elif (
dtype in (numpy.uint64, numpy.ulonglong)
and not has_support_aspect64()
):
pytest.skip("no fp64 support")

a = xp.array([xp.iinfo(dtype).min], dtype=dtype)
Expand All @@ -173,7 +182,10 @@ def test_large_int_lower_3(self, xp, dtype):
@testing.for_int_dtypes(no_bool=True)
@testing.numpy_cupy_array_equal()
def test_large_int_lower_4(self, xp, dtype):
if dtype == numpy.uint64 and not has_support_aspect64():
if (
dtype in (numpy.uint64, numpy.ulonglong)
and not has_support_aspect64()
):
pytest.skip("no fp64 support")

a = xp.array([xp.iinfo(dtype).min + 1], dtype=dtype)
Expand Down
2 changes: 2 additions & 0 deletions dpnp/tests/third_party/cupy/core_tests/test_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

@pytest.mark.skip("class Flags is not exposed")
class TestFlags(unittest.TestCase):

def setUp(self):
self.flags = flags.Flags(1, 2, 3)

Expand Down Expand Up @@ -42,6 +43,7 @@ def test_repr(self):
)
)
class TestContiguityFlags(unittest.TestCase):

def setUp(self):
self.flags = None

Expand Down
3 changes: 2 additions & 1 deletion dpnp/tests/third_party/cupy/core_tests/test_include.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import os
from unittest import mock

import cupy
import pytest

import dpnp as cupy

pytest.skip("CUDA compile is not supported", allow_module_level=True)

_code_base = """
Expand Down

0 comments on commit bea14e7

Please sign in to comment.