Skip to content

Commit

Permalink
Continue triaging test_create_program_from_source failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ndgrigorian committed Jun 27, 2024
1 parent f2bd956 commit 2cb0f33
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions dpctl/tests/test_sycl_kernel_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
@pytest.mark.parametrize(
"ctype_str,dtype,ctypes_ctor",
[
("short", dpt.dtype("i2"), ctypes.c_short),
("int", dpt.dtype("i4"), ctypes.c_int),
("unsigned int", dpt.dtype("u4"), ctypes.c_uint),
("long", dpt.dtype(np.longlong), ctypes.c_longlong),
("unsigned long", dpt.dtype(np.ulonglong), ctypes.c_ulonglong),
# ("short", dpt.dtype("i2"), ctypes.c_short),
# ("int", dpt.dtype("i4"), ctypes.c_int),
# ("unsigned int", dpt.dtype("u4"), ctypes.c_uint),
# ("long", dpt.dtype(np.longlong), ctypes.c_longlong),
# ("unsigned long", dpt.dtype(np.ulonglong), ctypes.c_ulonglong),
("float", dpt.dtype("f4"), ctypes.c_float),
("double", dpt.dtype("f8"), ctypes.c_double),
# ("double", dpt.dtype("f8"), ctypes.c_double),
],
)
def test_create_program_from_source(ctype_str, dtype, ctypes_ctor):
Expand Down Expand Up @@ -92,11 +92,12 @@ def test_create_program_from_source(ctype_str, dtype, ctypes_ctor):
host_dt, device_dt = timer.dt
assert type(host_dt) is float and type(device_dt) is float
c_np = dpt.asnumpy(c)
diff = c_np - ref_c
print(c_np)
print(ref_c)
assert np.allclose(
dpt.asnumpy(c), ref_c
), "Failed for {} with diffs between {} and {}".format(
r, np.max(diff), np.min(diff)
), "Failed for {}, a_np was {}, b_np was {}".format(
r, a_np, b_np
)

for gr, lr in (
Expand Down

0 comments on commit 2cb0f33

Please sign in to comment.