From 00286b6081a542ce1a8033f5dcc41aee57860856 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Mon, 26 Dec 2022 14:28:01 -0600 Subject: [PATCH 1/2] Added convenience Device.print_device_info method --- dpctl/tensor/_device.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dpctl/tensor/_device.py b/dpctl/tensor/_device.py index 6cf7106f37..86b9877806 100644 --- a/dpctl/tensor/_device.py +++ b/dpctl/tensor/_device.py @@ -114,6 +114,10 @@ def __repr__(self): # This is a sub-device return repr(self.sycl_queue) + def print_device_info(self): + "Outputs information about targeted SYCL device" + self.sycl_device.print_device_info() + def wait(self): """ Call ``wait`` method of the underlying ``sycl_queue``. From 82d615db4bcc39f3bfec71c1c4371b2bfd567ca8 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Mon, 26 Dec 2022 14:28:20 -0600 Subject: [PATCH 2/2] Exercise Device.print_device_info in tests --- dpctl/tests/test_usm_ndarray_ctor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dpctl/tests/test_usm_ndarray_ctor.py b/dpctl/tests/test_usm_ndarray_ctor.py index 20ffa1779c..0b1764d86b 100644 --- a/dpctl/tests/test_usm_ndarray_ctor.py +++ b/dpctl/tests/test_usm_ndarray_ctor.py @@ -363,6 +363,7 @@ def test_datapi_device(): X.device.sycl_queue X.device.sycl_device repr(X.device) + X.device.print_device_info() def _pyx_capi_fnptr_to_callable(