File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -353,6 +353,7 @@ cdef extern from "dpctl_sycl_queue_interface.h":
353
353
const DPCTLSyclQueueRef QRef,
354
354
const DPCTLSyclEventRef * DepEvents,
355
355
size_t NDepEvents)
356
+ cdef bool DPCTLQueue_HasEnableProfiling(const DPCTLSyclQueueRef QRef)
356
357
357
358
358
359
cdef extern from " dpctl_sycl_queue_manager.h" :
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ from ._backend cimport ( # noqa: E211
38
38
DPCTLQueue_GetBackend,
39
39
DPCTLQueue_GetContext,
40
40
DPCTLQueue_GetDevice,
41
+ DPCTLQueue_HasEnableProfiling,
41
42
DPCTLQueue_Hash,
42
43
DPCTLQueue_IsInOrder,
43
44
DPCTLQueue_MemAdvise,
@@ -851,6 +852,12 @@ cdef class SyclQueue(_SyclQueue):
851
852
""" True if SyclQueue is in-order, False if it is out-of-order."""
852
853
return DPCTLQueue_IsInOrder(self ._queue_ref)
853
854
855
+ @property
856
+ def has_enable_profiling (self ):
857
+ """ True if SyclQueue was constructed with enabled_profiling property,
858
+ False otherwise."""
859
+ return DPCTLQueue_HasEnableProfiling(self ._queue_ref)
860
+
854
861
@property
855
862
def __name__ (self ):
856
863
return " SyclQueue"
Original file line number Diff line number Diff line change @@ -373,6 +373,14 @@ def test_context_equals():
373
373
assert hash (ctx0 ) == hash (ctx1 )
374
374
375
375
376
+ def test_has_enable_profiling ():
377
+ try :
378
+ q = dpctl .SyclQueue (property = "enable_profiling" )
379
+ except dpctl .SyclQueueCreationError :
380
+ pytest .skip ()
381
+ assert q .has_enable_profiling
382
+
383
+
376
384
def test_hashing_of_queue ():
377
385
"""
378
386
Test that a :class:`dpctl.SyclQueue` object can be used as
You can’t perform that action at this time.
0 commit comments