Skip to content

Commit adc7f13

Browse files
Add .sycl_queue property to MemoryUSM* classes per #640
1 parent 8921d5a commit adc7f13

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpctl/memory/_memory.pyx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,15 @@ cdef class _Memory:
295295
def __get__(self):
296296
return self.queue.get_sycl_device()
297297

298+
property sycl_queue:
299+
"""
300+
:class:`dpctl.SyclQueue` with :class:`dpctl.SyclContext` the
301+
USM allocation is bound to and :class:`dpctl.SyclDevice` it was
302+
allocated on.
303+
"""
304+
def __get__(self):
305+
return self.queue
306+
298307
def __repr__(self):
299308
return (
300309
"<SYCL(TM) USM-{} allocation of {} bytes at {}>"

0 commit comments

Comments
 (0)