@@ -1553,6 +1553,8 @@ cdef class WorkGroupMemory:
1553
1553
Workgroup Memory oneAPI SYCL extension for low-overhead allocation of local
1554
1554
memory shared by the workitems in a workgroup.
1555
1555
1556
+ This class is intended be used as kernel argument when launching kernels.
1557
+
1556
1558
This is based on a DPC++ SYCL extension and only available in newer
1557
1559
versions. Use ``is_available()`` to check availability in your build.
1558
1560
@@ -1589,12 +1591,16 @@ cdef class WorkGroupMemory:
1589
1591
if len (args) == 1 :
1590
1592
if not isinstance (args[0 ], numbers.Integral):
1591
1593
raise TypeError (" WorkGroupMemory single argument constructor"
1592
- " expects number of bytes as integer value" )
1594
+ " expects first argument to be `int`" ,
1595
+ f" but got {type(args[0])}" )
1593
1596
nbytes = < size_t> (args[0 ])
1594
1597
else :
1595
- if not isinstance (args[0 ], str ) or not isinstance (args[1 ], numbers.Integral):
1596
- raise TypeError (" WorkGroupMemory constructor expects type as"
1597
- " string and number of bytes as integer value." )
1598
+ if not isinstance (args[0 ], str ):
1599
+ raise TypeError (" WorkGroupMemory constructor expects first"
1600
+ f" argument to be `str`, but got {type(args[0])}" )
1601
+ if not isinstance (args[1 ], numbers.Integral):
1602
+ raise TypeError (" WorkGroupMemory constructor expects second"
1603
+ f" argument to be `int`, but got {type(args[1])}" )
1598
1604
dtype = < str > (args[0 ])
1599
1605
count = < size_t> (args[1 ])
1600
1606
if not dtype[0 ] in [" i" , " u" , " f" ]:
0 commit comments