Skip to content

Commit 2a6314c

Browse files
Fixed docstring, added wait method to Device class
1 parent 50be964 commit 2a6314c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dpctl/tensor/_device.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Device:
2222
2323
This is a wrapper around :class:`dpctl.SyclQueue` with custom
2424
formatting. The class does not have public constructor,
25-
but a class method to construct it from device= keyword
26-
in Array-API functions.
25+
but a class method `create_device` to construct it from device= keyword
26+
argument in Array-API functions.
2727
2828
Instance can be queried for ``sycl_queue``, ``sycl_context``,
2929
or ``sycl_device``.
@@ -111,6 +111,12 @@ def __repr__(self):
111111
# This is a sub-device
112112
return repr(self.sycl_queue)
113113

114+
def wait(self):
115+
"""
116+
Call ``wait`` method of the underlying ``sycl_queue``.
117+
"""
118+
self.sycl_queue_.wait()
119+
114120

115121
def normalize_queue_device(sycl_queue=None, device=None):
116122
"""

0 commit comments

Comments
 (0)