Skip to content

Commit 91c1746

Browse files
author
Diptorup Deb
committed
Fix typos and address review comments.
1 parent 2bd1432 commit 91c1746

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

dpctl/_sycl_device.pyx

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ cdef class SyclDevice(_SyclDevice):
298298
if ret == -1:
299299
raise SyclDeviceCreationError(
300300
"Could not create a SyclDevice with the selector string "
301-
"'{selector_string}'".format(selector_string=arg)
301+
"'{selector_string}'".format(selector_string=arg)
302302
)
303303
elif isinstance(arg, _SyclDevice):
304304
ret = self._init_from__SyclDevice(arg)
@@ -544,7 +544,7 @@ cdef class SyclDevice(_SyclDevice):
544544
@property
545545
def has_aspect_usm_device_allocations(self):
546546
""" Returns True if this device supports explicit USM allocations,
547-
False otherwise (refer Siction 4.8 of SYCL 2020 specs).
547+
False otherwise (refer Section 4.8 of SYCL 2020 specs).
548548
549549
Returns:
550550
bool: Indicates that the device supports explicit USM allocations.
@@ -555,11 +555,11 @@ cdef class SyclDevice(_SyclDevice):
555555
@property
556556
def has_aspect_usm_host_allocations(self):
557557
""" Returns True if this device can access USM-host memory,
558-
False otherwise (refer Siction 4.8 of SYCL 2020 specs).
558+
False otherwise (refer Section 4.8 of SYCL 2020 specs).
559559
560560
Returns:
561561
bool: Indicates that the device can access USM memory
562-
allocated via ``usm::alloc::host``.
562+
allocated using ``sycl::malloc_host``.
563563
"""
564564
cdef _aspect_type AT = _aspect_type._usm_host_allocations
565565
return DPCTLDevice_HasAspect(self._device_ref, AT)
@@ -571,7 +571,7 @@ cdef class SyclDevice(_SyclDevice):
571571
572572
Returns:
573573
bool: Indicates that the device supports USM memory
574-
allocated via ``usm::alloc::shared``.
574+
allocated using ``sycl::malloc_shared``.
575575
"""
576576
cdef _aspect_type AT = _aspect_type._usm_shared_allocations
577577
return DPCTLDevice_HasAspect(self._device_ref, AT)
@@ -582,8 +582,8 @@ cdef class SyclDevice(_SyclDevice):
582582
allocated as restricted USM, False otherwise.
583583
584584
Returns:
585-
bool: Indicates that the device supports USM memory allocated via
586-
``usm::alloc::shared`` as restricted USM.
585+
bool: Indicates that the device supports USM memory allocated using
586+
``sycl::malloc_shared`` as restricted USM.
587587
588588
.. deprecated:: 0.14
589589
"""
@@ -597,8 +597,8 @@ cdef class SyclDevice(_SyclDevice):
597597
False otherwise.
598598
599599
Returns:
600-
bool: Indicates that system allocator may be used instead of SYCL
601-
``usm::alloc::shared``.
600+
bool: Indicates that system allocator may be used instead of
601+
``sycl::malloc_shared``.
602602
"""
603603
cdef _aspect_type AT = _aspect_type._usm_system_allocations
604604
return DPCTLDevice_HasAspect(self._device_ref, AT)
@@ -607,7 +607,10 @@ cdef class SyclDevice(_SyclDevice):
607607
def has_aspect_usm_atomic_host_allocations(self):
608608
""" Returns True if this device supports USM-host allocations and
609609
the host and this device may concurrently access and atomically
610-
modify host allocations, False otherwise
610+
modify host allocations, False otherwise.
611+
612+
Returns:
613+
bool: Indicates if the device supports USM atomic host allocations.
611614
"""
612615
cdef _aspect_type AT = _aspect_type._usm_atomic_host_allocations
613616
return DPCTLDevice_HasAspect(self._device_ref, AT)
@@ -991,7 +994,11 @@ cdef class SyclDevice(_SyclDevice):
991994

992995
@property
993996
def __name__(self):
994-
"Name of the class `dpctl.SyclDevice`"
997+
""" Returns the name of the class :class:`dpctl.SyclDevice`
998+
999+
Returns:
1000+
str: Name of the class as a string.
1001+
"""
9951002
return "SyclDevice"
9961003

9971004
def __repr__(self):
@@ -1009,9 +1016,8 @@ cdef class SyclDevice(_SyclDevice):
10091016
)
10101017

10111018
def __hash__(self):
1012-
"""
1013-
Returns a hash value by hashing the underlying ``sycl::device`` object.
1014-
1019+
"""Returns a hash value by hashing the underlying ``sycl::device``
1020+
object.
10151021
"""
10161022
return DPCTLDevice_Hash(self._device_ref)
10171023

0 commit comments

Comments
 (0)