Skip to content

Commit 71b59e5

Browse files
Added property dpctl.program.SyclKernel.num_args
1 parent 4bdbad8 commit 71b59e5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dpctl/program/_program.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ cdef class SyclKernel:
102102
"""
103103
return int(<size_t>self._kernel_ref)
104104

105+
@property
106+
def num_args(self):
107+
""" Property equivalent to method call `SyclKernel.get_num_args()`
108+
"""
109+
return self.get_num_args()
110+
105111
@property
106112
def work_group_size(self):
107113
""" Returns the maximum number of work-items in a work-group that can

dpctl/tests/test_sycl_program.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def _check_multi_kernel_program(prog):
4949
assert type(axpyKernel.addressof_ref()) is int
5050

5151
for krn in [addKernel, axpyKernel]:
52+
na = krn.num_args
53+
assert na == krn.get_num_args()
5254
wgsz = krn.work_group_size
5355
assert type(wgsz) is int
5456
pwgszm = krn.preferred_work_group_size_multiple

0 commit comments

Comments
 (0)