@@ -103,6 +103,7 @@ from ._sycl_platform cimport SyclPlatform
103
103
104
104
import collections
105
105
import warnings
106
+ from typing import Tuple
106
107
107
108
__all__ = [
108
109
" SyclDevice" , " SyclDeviceCreationError" , " SyclSubDeviceCreationError" ,
@@ -737,17 +738,24 @@ cdef class SyclDevice(_SyclDevice):
737
738
def max_work_item_dims (self ):
738
739
""" Returns the maximum dimensions that specify the global and local
739
740
work-item IDs used by the data parallel execution model.
741
+
742
+ Returns:
743
+ int: The maximum number of work items supported by the device.
740
744
"""
741
745
cdef uint32_t max_work_item_dims = 0
742
746
max_work_item_dims = DPCTLDevice_GetMaxWorkItemDims(self ._device_ref)
743
747
return max_work_item_dims
744
748
745
749
@property
746
- def max_work_item_sizes1d (self ):
750
+ def max_work_item_sizes1d (self ) -> Tuple[ int ,] :
747
751
""" Returns the maximum number of work-items that are permitted in each
748
752
dimension of the work-group of the nd_range<1>. The minimum value is
749
- `(1 )` for devices that are not of device type
750
- ``info::device_type::custom``.
753
+ `(1 )` for devices that evaluate to False for
754
+ :py:attr:`~has_aspect_custom`.
755
+
756
+ Returns:
757
+ A tuple with the maximum allowed value for a 1D range used to
758
+ enqueue a kernel on the device.
751
759
"""
752
760
cdef size_t *max_work_item_sizes1d = NULL
753
761
max_work_item_sizes1d = DPCTLDevice_GetMaxWorkItemSizes1d(
@@ -758,11 +766,15 @@ cdef class SyclDevice(_SyclDevice):
758
766
return res
759
767
760
768
@property
761
- def max_work_item_sizes2d (self ):
769
+ def max_work_item_sizes2d(self ) -> Tuple[ int , int] :
762
770
""" Returns the maximum number of work-items that are permitted in each
763
771
dimension of the work-group of the nd_range<2>. The minimum value is
764
- `(1; 1)` for devices that are not of device type
765
- ``info::device_type::custom``.
772
+ `(1; 1)` for devices that evaluate to False for
773
+ :py:attr:`~has_aspect_custom`.
774
+
775
+ Returns:
776
+ A tuple with the maximum allowed value for each dimension of a 2D
777
+ range used to enqueue a kernel on the device.
766
778
"""
767
779
cdef size_t *max_work_item_sizes2d = NULL
768
780
max_work_item_sizes2d = DPCTLDevice_GetMaxWorkItemSizes2d(
@@ -773,7 +785,7 @@ cdef class SyclDevice(_SyclDevice):
773
785
return res
774
786
775
787
@property
776
- def max_work_item_sizes3d (self ):
788
+ def max_work_item_sizes3d(self ) -> Tuple[ int , int] :
777
789
""" Returns the maximum number of work-items that are permitted in each
778
790
dimension of the work-group of the nd_range<3>. The minimum value is
779
791
`(1; 1; 1)` for devices that are not of device type
0 commit comments