Skip to content

Commit 8c225f9

Browse files
committed
is_composite and is_component -> has_aspect_composite and has_aspect_component
Aligns with the rest of the SyclDevice properties Adds tests for the aspects
1 parent 9bd36f9 commit 8c225f9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dpctl/_sycl_device.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ cdef class SyclDevice(_SyclDevice):
798798
return DPCTLDevice_HasAspect(self._device_ref, AT)
799799

800800
@property
801-
def is_component(self):
801+
def has_aspect_is_component(self):
802802
""" Returns ``True`` if this device is a component device, ``False``
803803
otherwise. A device with this aspect will have a composite device
804804
from which it is descended.
@@ -812,7 +812,7 @@ cdef class SyclDevice(_SyclDevice):
812812

813813

814814
@property
815-
def is_composite(self):
815+
def has_aspect_is_composite(self):
816816
""" Returns ``True`` if this device is a composite device, ``False``
817817
otherwise. A device with this aspect contains component devices.
818818

dpctl/tests/test_sycl_device.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def test_equal():
165165
"usm_atomic_host_allocations",
166166
"usm_atomic_shared_allocations",
167167
"emulated",
168+
"is_component",
169+
"is_composite",
168170
]
169171

170172
# SYCL 2020 spec aspects not presently

dpctl/tests/test_sycl_device_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,6 @@ def test_get_composite_devices():
192192
if devices:
193193
num_devices = len(devices)
194194
for i in range(num_devices):
195-
assert devices[i].is_composite
195+
assert devices[i].has_aspect_is_composite
196196
else:
197197
pytest.skip()

0 commit comments

Comments
 (0)