Skip to content

Commit 933630a

Browse files
author
Diptorup Deb
authored
Merge pull request #1588 from IntelPython/add-python-counterpart-of-local-accessor-kernel-arg-type
Add local_accessor kernel_arg_type
2 parents 4736de1 + a3d87a5 commit 933630a

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

dpctl/_backend.pxd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ cdef extern from "syclinterface/dpctl_sycl_enum_types.h":
6767
_UINT64_T 'DPCTL_UINT64_T',
6868
_FLOAT 'DPCTL_FLOAT32_T',
6969
_DOUBLE 'DPCTL_FLOAT64_T',
70-
_VOID_PTR 'DPCTL_VOID_PTR'
70+
_VOID_PTR 'DPCTL_VOID_PTR',
71+
_LOCAL_ACCESSOR 'DPCTL_LOCAL_ACCESSOR'
7172

7273
ctypedef enum _queue_property_type 'DPCTLQueuePropertyType':
7374
_DEFAULT_PROPERTY 'DPCTL_DEFAULT_PROPERTY'

dpctl/_sycl_queue.pyx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,15 @@ cdef class _kernel_arg_type:
233233
_arg_data_type._VOID_PTR
234234
)
235235

236+
@property
237+
def dpctl_local_accessor(self):
238+
cdef str p_name = "dpctl_local_accessor"
239+
return kernel_arg_type_attribute(
240+
self._name,
241+
p_name,
242+
_arg_data_type._LOCAL_ACCESSOR
243+
)
244+
236245

237246
kernel_arg_type = _kernel_arg_type()
238247

dpctl/tests/test_sycl_kernel_submit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,4 @@ def test_kernel_arg_type():
274274
_check_kernel_arg_type_instance(kernel_arg_type.dpctl_float32)
275275
_check_kernel_arg_type_instance(kernel_arg_type.dpctl_float64)
276276
_check_kernel_arg_type_instance(kernel_arg_type.dpctl_void_ptr)
277+
_check_kernel_arg_type_instance(kernel_arg_type.dpctl_local_accessor)

0 commit comments

Comments
 (0)