Skip to content

Commit d337076

Browse files
authored
Merge branch 'master' into resolve-gh-2352-2353
2 parents 93f195e + e9a79f4 commit d337076

File tree

16 files changed

+1200
-388
lines changed

16 files changed

+1200
-388
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
5656
* Dropped support for Python 3.9 [#2626](https://github.com/IntelPython/dpnp/pull/2626)
5757
* Removed the obsolete interface from DPNP to Numba JIT [#2647](https://github.com/IntelPython/dpnp/pull/2647)
5858
* Removed the `newshape` parameter from `dpnp.reshape`, which has been deprecated since dpnp 0.17.0. Pass it positionally or use `shape=` on newer versions [#2670](https://github.com/IntelPython/dpnp/pull/2670)
59+
* Removed unused `pytest` configuration from `pyproject.toml` [#2729](https://github.com/IntelPython/dpnp/pull/2729)
5960

6061
### Fixed
6162

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %}
22
{% set required_compiler_and_mkl_version = "2025.0" %}
3-
{% set required_dpctl_version = "0.21.0" %}
3+
{% set required_dpctl_version = "0.22.0*" %}
44

55
{% set pyproject = load_file_data('pyproject.toml') %}
66
{% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %}

dpnp/tests/helper.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import importlib.util
2+
from enum import Enum
23
from sys import platform
34

45
import dpctl
@@ -11,6 +12,11 @@
1112
from . import config
1213

1314

15+
class LTS_VERSION(Enum):
16+
V1_3 = "1.3"
17+
V1_6 = "1.6"
18+
19+
1420
def _assert_dtype(a_dt, b_dt, check_only_type_kind=False):
1521
if check_only_type_kind:
1622
assert a_dt.kind == b_dt.kind, f"{a_dt.kind} != {b_dt.kind}"
@@ -475,13 +481,13 @@ def is_lnl(device=None):
475481
return _get_dev_mask(device) == 0x6400
476482

477483

478-
def is_lts_driver(device=None):
484+
def is_lts_driver(version=LTS_VERSION.V1_3, device=None):
479485
"""
480486
Return True if a test is running on a GPU device with LTS driver version,
481487
False otherwise.
482488
"""
483489
dev = dpctl.select_default_device() if device is None else device
484-
return dev.has_aspect_gpu and "1.3" in dev.driver_version
490+
return dev.has_aspect_gpu and version.value in dev.driver_version
485491

486492

487493
def is_ptl(device=None):

dpnp/tests/test_mathematical.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from dpnp.dpnp_utils import map_dtype_to_device
2121

2222
from .helper import (
23+
LTS_VERSION,
2324
assert_dtype_allclose,
2425
generate_random_numpy_array,
2526
get_abs_array,
@@ -33,7 +34,7 @@
3334
has_support_aspect16,
3435
has_support_aspect64,
3536
is_intel_numpy,
36-
is_ptl,
37+
is_lts_driver,
3738
numpy_version,
3839
)
3940
from .third_party.cupy import testing
@@ -218,7 +219,7 @@ def _get_exp_array(self, a, axis, dtype):
218219
@pytest.mark.parametrize("axis", [None, 2, -1])
219220
@pytest.mark.parametrize("include_initial", [True, False])
220221
def test_basic(self, dtype, axis, include_initial):
221-
if axis is None and is_ptl():
222+
if axis is None and not is_lts_driver(version=LTS_VERSION.V1_6):
222223
pytest.skip("due to SAT-8336")
223224

224225
a = dpnp.ones((3, 4, 5, 6, 7), dtype=dtype)
@@ -238,7 +239,7 @@ def test_basic(self, dtype, axis, include_initial):
238239
@pytest.mark.parametrize("axis", [None, 2, -1])
239240
@pytest.mark.parametrize("include_initial", [True, False])
240241
def test_include_initial(self, dtype, axis, include_initial):
241-
if axis is None and is_ptl():
242+
if axis is None and not is_lts_driver(version=LTS_VERSION.V1_6):
242243
pytest.skip("due to SAT-8336")
243244

244245
a = dpnp.ones((3, 4, 5, 6, 7), dtype=dtype)

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
from __future__ import annotations
22

3-
import unittest
4-
53
from dpnp.tests.third_party.cupy import testing
64

75

8-
class TestElementwise(unittest.TestCase):
6+
class TestElementwise:
97

108
@testing.for_int_dtypes()
119
@testing.numpy_cupy_array_equal()

dpnp/tests/third_party/cupy/binary_tests/test_packing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import unittest
1+
from __future__ import annotations
22

33
import numpy
44
import pytest
@@ -11,7 +11,7 @@
1111
)
1212

1313

14-
class TestPacking(unittest.TestCase):
14+
class TestPacking:
1515

1616
@testing.for_int_dtypes()
1717
@testing.numpy_cupy_array_equal()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import unittest
1+
from __future__ import annotations
22

33
import numpy
44
import pytest
@@ -11,7 +11,7 @@
1111
)
1212

1313

14-
class TestArrayFunction(unittest.TestCase):
14+
class TestArrayFunction:
1515

1616
@testing.with_requires("numpy>=1.17.0")
1717
def test_array_function(self):

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
from __future__ import annotations
22

33
import sys
4-
import unittest
54

65
import numpy
76
import pytest
87

98
import dpnp as cupy
9+
10+
# from cupy._core import core
1011
from dpnp.tests.third_party.cupy import testing
1112
from dpnp.tests.third_party.cupy.testing._protocol_helpers import (
1213
DummyObjectWithCudaArrayInterface,
1314
DummyObjectWithCuPyGetNDArray,
1415
)
1516

17+
# from cupy_tests.core_tests import test_raw
18+
1619

17-
class TestSize(unittest.TestCase):
20+
class TestSize:
1821

1922
# def tearDown(self):
2023
# # Free huge memory for slow test
@@ -58,7 +61,7 @@ def test_size_huge(self, xp):
5861

5962

6063
@pytest.mark.skip("no cupy._core submodule")
61-
class TestOrder(unittest.TestCase):
64+
class TestOrder:
6265

6366
@testing.for_orders(_orders.keys())
6467
def test_ndarray(self, order):

0 commit comments

Comments
 (0)