Skip to content

Commit e65a670

Browse files
Add test to that enum value of dpctl_int8 in kernel_arg_type is zero
1 parent 381bf55 commit e65a670

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

dpctl/tests/test_sycl_kernel_submit.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import dpctl.memory as dpctl_mem
2727
import dpctl.program as dpctl_prog
2828
import dpctl.tensor as dpt
29+
from dpctl.enum_types import kernel_arg_type
2930

3031

3132
@pytest.mark.parametrize(
@@ -244,3 +245,13 @@ def test_submit_async():
244245
Xref[2, i] = min(Xref[0, i], Xref[1, i])
245246

246247
assert np.array_equal(Xnp[:, :n], Xref[:, :n])
248+
249+
250+
def test_kernel_arg_type():
251+
"""
252+
Check that enum values for kernel_arg_type start at 0,
253+
as numba_dpex expects. The next enumerated type must
254+
have next value.
255+
"""
256+
assert kernel_arg_type.dpctl_int8.value == 0
257+
assert kernel_arg_type.dpctl_uint8.value == 1

0 commit comments

Comments
 (0)