Skip to content

Commit eebe2cc

Browse files
Expose has_aspect_emulated attribute for SyclDevice
1 parent 972a4c4 commit eebe2cc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dpctl/_sycl_device.pyx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,20 @@ cdef class SyclDevice(_SyclDevice):
770770
cdef _aspect_type AT = _aspect_type._host_debuggable
771771
return DPCTLDevice_HasAspect(self._device_ref, AT)
772772

773+
@property
774+
def has_aspect_emulated(self):
775+
""" Returns ``True`` if this device is somehow emulated, ``False``
776+
otherwise. A device with this aspect is not intended for performance,
777+
and instead will generally have another purpose such as emulation
778+
or profiling.
779+
780+
Returns:
781+
bool:
782+
Indicates if device is somehow emulated.
783+
"""
784+
cdef _aspect_type AT = _aspect_type._emulated
785+
return DPCTLDevice_HasAspect(self._device_ref, AT)
786+
773787
@property
774788
def image_2d_max_width(self):
775789
""" Returns the maximum width of a 2D image or 1D image in pixels.

0 commit comments

Comments
 (0)