diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e990a601331..680e5ba27a9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.18.0] - 05/DD/2025 +## [0.18.0] - 06/04/2025 This release achieves 100% compliance with Python Array API specification (revision [2024.12](https://data-apis.org/array-api/2024.12/)). The release provides enhanced compatibility with NumPy 2.2.5. Window and mathematical routines are complemented by a set of new functions. @@ -18,6 +18,8 @@ Moreover, it adds support to build `dpnp` from the source for AMD GPUs. * Added implementation of `dpnp.bartlett` [#2366](https://github.com/IntelPython/dpnp/pull/2366) * Added implementation of `dpnp.convolve` [#2205](https://github.com/IntelPython/dpnp/pull/2205) * Added implementation of `dpnp.kaiser` [#2387](https://github.com/IntelPython/dpnp/pull/2387) +* Added implementation of `dpnp.bitwise_count` [#2308](https://github.com/IntelPython/dpnp/pull/2308) +* Added implementation of `dpnp.common_type` [#2391](https://github.com/IntelPython/dpnp/pull/2391) * Added implementation of `dpnp.interp` [#2417](https://github.com/IntelPython/dpnp/pull/2417) * Added support to build `dpnp` for specified AMD GPU architecture using [CodePlay oneAPI plug-in](https://developer.codeplay.com/products/oneapi/amd/home/) [#2302](https://github.com/IntelPython/dpnp/pull/2302) @@ -43,7 +45,7 @@ Moreover, it adds support to build `dpnp` from the source for AMD GPUs. * Updated FFT module to ensure an input array is Hermitian before calling complex-to-real FFT [#2444](https://github.com/IntelPython/dpnp/pull/2444) * Aligned `black` configuration with the list of supported python versions [#2457](https://github.com/IntelPython/dpnp/pull/2457) * Use `pyproject.toml` instead of `setup.py` aligning with current packaging best practices [#2462](https://github.com/IntelPython/dpnp/pull/2462) -* Added a clarification to `dpnp.linalg.cond` docstring about its behavior with singular matrices [#2500] (https://github.com/IntelPython/dpnp/pull/2500) +* Added a clarification to `dpnp.linalg.cond` docstring about its behavior with singular matrices [#2460](https://github.com/IntelPython/dpnp/pull/2460) ### Fixed @@ -52,6 +54,7 @@ Moreover, it adds support to build `dpnp` from the source for AMD GPUs. * Added handling of empty string passed to a test env variable defining data type scope as a `False` value [#2415](https://github.com/IntelPython/dpnp/pull/2415) * Resolved build issues on non-Intel targets in `dpnp.i0` and `dpnp.kaiser` [#2439](https://github.com/IntelPython/dpnp/pull/2439) * Ensure consistency in the `dpnp.linalg.LinAlgError` exception raised on singular input matrices for both non-batched and batched cases in `dpnp.linalg.inv` [#2458] (https://github.com/IntelPython/dpnp/pull/2458) +* Updated test f/w to correct a check of array interface while converting to `numpy.ndarray` for comparison [#2467] (https://github.com/IntelPython/dpnp/pull/2467) ## [0.17.0] - 02/26/2025 diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 22af5f008979..1f30f4fead05 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ {% set max_compiler_and_mkl_version = environ.get("MAX_BUILD_CMPL_MKL_VERSION", "2026.0a0") %} {% set required_compiler_and_mkl_version = "2025.0" %} -{% set required_dpctl_version = "0.20.0*" %} +{% set required_dpctl_version = "0.20.0" %} {% set pyproject = load_file_data('pyproject.toml') %} {% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %} diff --git a/dpnp/dpnp_utils/dpnp_algo_utils.pyx b/dpnp/dpnp_utils/dpnp_algo_utils.pyx index cc8acf068443..732b792af125 100644 --- a/dpnp/dpnp_utils/dpnp_algo_utils.pyx +++ b/dpnp/dpnp_utils/dpnp_algo_utils.pyx @@ -76,9 +76,9 @@ cdef ERROR_PREFIX = "DPNP error:" def convert_item(item): - if getattr(item, "__sycl_usm_array_interface__", False): + if hasattr(item, "__sycl_usm_array_interface__"): item_converted = dpnp.asnumpy(item) - elif getattr(item, "__array_interface__", False): # detect if it is a container (TODO any better way?) + elif hasattr(item, "__array_interface__"): # detect if it is a container (TODO any better way?) mod_name = getattr(item, "__module__", 'none') if (mod_name != 'numpy'): item_converted = dpnp.asnumpy(item) diff --git a/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py b/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py index f195b041b5b2..5613cee41589 100644 --- a/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py +++ b/dpnp/tests/third_party/cupy/math_tests/test_hyperbolic.py @@ -1,5 +1,7 @@ import unittest +import numpy + from dpnp.tests.helper import has_support_aspect64 from dpnp.tests.third_party.cupy import testing @@ -7,13 +9,16 @@ class TestHyperbolic(unittest.TestCase): @testing.for_all_dtypes() - @testing.numpy_cupy_allclose(atol=1e-5, type_check=has_support_aspect64()) + @testing.numpy_cupy_allclose( + atol={numpy.float16: 1e-3, "default": 1e-5}, + type_check=has_support_aspect64(), + ) def check_unary(self, name, xp, dtype): a = testing.shaped_arange((2, 3), xp, dtype) return getattr(xp, name)(a) @testing.for_dtypes(["e", "f", "d"]) - @testing.numpy_cupy_allclose(atol=1e-5) + @testing.numpy_cupy_allclose(atol={numpy.float16: 1e-3, "default": 1e-5}) def check_unary_unit(self, name, xp, dtype): a = xp.array([0.2, 0.4, 0.6, 0.8], dtype=dtype) return getattr(xp, name)(a) @@ -31,7 +36,7 @@ def test_arcsinh(self): self.check_unary("arcsinh") @testing.for_dtypes(["e", "f", "d"]) - @testing.numpy_cupy_allclose(atol=1e-5) + @testing.numpy_cupy_allclose(atol={numpy.float16: 1e-3, "default": 1e-5}) def test_arccosh(self, xp, dtype): a = xp.array([1, 2, 3], dtype=dtype) return xp.arccosh(a) diff --git a/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py b/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py index 9bb8b67870c7..3340565fbcb9 100644 --- a/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py +++ b/dpnp/tests/third_party/cupy/math_tests/test_trigonometric.py @@ -1,5 +1,6 @@ import unittest +import numpy import pytest from dpnp.tests.helper import has_support_aspect64 @@ -24,7 +25,7 @@ def check_binary(self, name, xp, dtype): return getattr(xp, name)(a, b) @testing.for_dtypes(["e", "f", "d"]) - @testing.numpy_cupy_allclose(atol=1e-5) + @testing.numpy_cupy_allclose(atol={numpy.float16: 1e-3, "default": 1e-5}) def check_unary_unit(self, name, xp, dtype): a = xp.array([0.2, 0.4, 0.6, 0.8], dtype=dtype) return getattr(xp, name)(a) diff --git a/environments/dpctl_pkg.txt b/environments/dpctl_pkg.txt index 111da6267ec0..a846eca2b6e2 100644 --- a/environments/dpctl_pkg.txt +++ b/environments/dpctl_pkg.txt @@ -1,2 +1,2 @@ --index-url https://pypi.anaconda.org/dppy/label/dev/simple -dpctl>=0.20.0dev0 +dpctl>=0.20.0 diff --git a/environments/dpctl_pkg.yml b/environments/dpctl_pkg.yml index ff0aecfa0bf7..8b7527ebbf8d 100644 --- a/environments/dpctl_pkg.yml +++ b/environments/dpctl_pkg.yml @@ -2,4 +2,4 @@ name: Install dpctl package channels: - dppy/label/dev dependencies: - - dpctl>=0.20.0dev0 + - dpctl>=0.20.0 diff --git a/pyproject.toml b/pyproject.toml index 68cea36a07a2..a26b1239825b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,7 @@ requires = [ "build>=1.2.2", "cmake>=3.31.6", "cython>=3.0.12", - # WARNING: use only dpctl version available on PyPi - "dpctl>=0.19.0", + "dpctl>=0.20.0", "ninja>=1.11.1; platform_system!='Windows'", # NOTE: no DPNP restriction on NumPy version, so follow NumPy's drop schedule "numpy>=1.25.0", @@ -48,8 +47,7 @@ dependencies = [ # TODO: do we have to set sycl runtime dependencies here # "dpcpp-cpp-rt>=0.59.0", # "intel-cmplr-lib-rt>=0.59.0" - # WARNING: use the latest dpctl dev version, otherwise stable w/f will fail - "dpctl>=0.20.0dev0", + "dpctl>=0.20.0", "numpy>=1.25.0" ] description = "Data Parallel Extension for NumPy"