From e66810881edfc460056de7334ed69576543fbbc9 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 9 Jun 2026 13:12:19 -0700 Subject: [PATCH 1/2] fix tests for dpctl change to return tuples dpctl returns tuples now rather than lists for devices, subdevices, etc. as these should be immutable to users --- dpnp/tests/tensor/test_usm_ndarray_dlpack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dpnp/tests/tensor/test_usm_ndarray_dlpack.py b/dpnp/tests/tensor/test_usm_ndarray_dlpack.py index 7db73467f78..7d374199562 100644 --- a/dpnp/tests/tensor/test_usm_ndarray_dlpack.py +++ b/dpnp/tests/tensor/test_usm_ndarray_dlpack.py @@ -252,7 +252,7 @@ def test_dlpack_from_subdevice(): sdevs = dev.create_sub_devices(partition=[1, 1]) except dpctl.SyclSubDeviceCreationError: pytest.skip("Default device can not be partitioned") - assert isinstance(sdevs, list) and len(sdevs) > 0 + assert isinstance(sdevs, tuple) and len(sdevs) > 0 try: ctx = sdevs[0].sycl_platform.default_context except dpctl.SyclContextCreationError: @@ -603,7 +603,7 @@ def test_dlpack_from_subdevice_to_kdlcpu(): sdevs = dev.create_sub_devices(partition=[1, 1]) except dpctl.SyclSubDeviceCreationError: pytest.skip("Default device can not be partitioned") - assert isinstance(sdevs, list) and len(sdevs) > 0 + assert isinstance(sdevs, tuple) and len(sdevs) > 0 try: ctx = sdevs[0].sycl_platform.default_context except dpctl.SyclContextCreationError: From 26b23a0ba8b1f508b970d5747089b11048837fbb Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 9 Jun 2026 13:15:11 -0700 Subject: [PATCH 2/2] add gh-2945 to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4472233701e..5fba11c9b71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ This release is compatible with NumPy 2.4.5. * Replaced `.pxi` includes in `dpnp.tensor` with modular `.pxd`/`.pyx` Cython imports [#2913](https://github.com/IntelPython/dpnp/pull/2913) * Reimplemented `dpnp.eye` and `dpnp.tensor.eye` with a branchless kernel [gh-2937](https://github.com/IntelPython/dpnp/pull/2937) * Cleaned up Python bindings for indexing functions, renaming `usm_ndarray_take` and `usm_ndarray_put` to `py_take` and `py_put` and refactoring validation [gh-2935](https://github.com/IntelPython/dpnp/pull/2935) +* Fixed some tests which expected lists from `dpctl` functions which now return tuples (i.e., `dpctl.SyclDevice.create_sub_devices`) [gh-2945](https://github.com/IntelPython/dpnp/pull/2945) ### Deprecated