Skip to content

Commit 4bdbad8

Browse files
Added tests for kernel_device_specific properties
1 parent 0cc588e commit 4bdbad8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

dpctl/tests/test_sycl_program.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,24 @@ def _check_multi_kernel_program(prog):
4848
assert type(addKernel.addressof_ref()) is int
4949
assert type(axpyKernel.addressof_ref()) is int
5050

51+
for krn in [addKernel, axpyKernel]:
52+
wgsz = krn.work_group_size
53+
assert type(wgsz) is int
54+
pwgszm = krn.preferred_work_group_size_multiple
55+
assert type(pwgszm) is int
56+
pmsz = krn.private_mem_size
57+
assert type(pmsz) is int
58+
vmnsg = krn.max_num_sub_groups
59+
assert type(vmnsg) is int
60+
v = krn.max_sub_group_size
61+
assert (
62+
v == NotImplemented
63+
), "SyclKernel.max_sub_group_size acquired implementation, fix the test"
64+
cmnsg = krn.compile_num_sub_groups
65+
assert type(cmnsg) is int
66+
cmsgsz = krn.compile_num_sub_groups
67+
assert type(cmsgsz) is int
68+
5169

5270
def test_create_program_from_source_ocl():
5371
oclSrc = " \

0 commit comments

Comments
 (0)