Skip to content

Commit c3a5cab

Browse files
dpnp_array must expose sycl_queue, sycl_device, sycl_context, and device properties
1 parent 9c6bd87 commit c3a5cab

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

dpnp/dpnp_array.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class dpnp_array:
3434
"""
3535
Multi-dimensional array object.
3636
37-
This is a wrapper around dpctl.tensor.usm_ndarray that provide
38-
methods to be complient with original Numpy.
37+
This is a wrapper around dpctl.tensor.usm_ndarray that provides
38+
methods to be compliant with original Numpy.
3939
4040
"""
4141

@@ -100,6 +100,22 @@ def to_device(self, target_device):
100100

101101
return dpnp_array(shape=self.shape, buffer=self.get_array().to_device(target_device))
102102

103+
@property
104+
def sycl_queue(self):
105+
return self._array_obj.sycl_queue
106+
107+
@property
108+
def sycl_device(self):
109+
return self._array_obj.sycl_device
110+
111+
@property
112+
def sycl_context(self):
113+
return self._array_obj.sycl_context
114+
115+
@property
116+
def device(self):
117+
return self._array_obj.device
118+
103119
def __abs__(self):
104120
return dpnp.abs(self)
105121

0 commit comments

Comments
 (0)