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":
353353 const DPCTLSyclQueueRef QRef,
354354 const DPCTLSyclEventRef * DepEvents,
355355 size_t NDepEvents)
356+ cdef bool DPCTLQueue_HasEnableProfiling(const DPCTLSyclQueueRef QRef)
356357
357358
358359cdef 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
3838 DPCTLQueue_GetBackend,
3939 DPCTLQueue_GetContext,
4040 DPCTLQueue_GetDevice,
41+ DPCTLQueue_HasEnableProfiling,
4142 DPCTLQueue_Hash,
4243 DPCTLQueue_IsInOrder,
4344 DPCTLQueue_MemAdvise,
@@ -851,6 +852,12 @@ cdef class SyclQueue(_SyclQueue):
851852 """ True if SyclQueue is in-order, False if it is out-of-order."""
852853 return DPCTLQueue_IsInOrder(self ._queue_ref)
853854
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+
854861 @property
855862 def __name__ (self ):
856863 return " SyclQueue"
Original file line number Diff line number Diff line change @@ -373,6 +373,14 @@ def test_context_equals():
373373 assert hash (ctx0 ) == hash (ctx1 )
374374
375375
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+
376384def test_hashing_of_queue ():
377385 """
378386 Test that a :class:`dpctl.SyclQueue` object can be used as
You can’t perform that action at this time.
0 commit comments