Skip to content

Commit

Permalink
Try copying a and b before sending to Numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
ndgrigorian committed Jun 28, 2024
1 parent 3e4d3cd commit a34eb9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dpctl/tests/test_sycl_kernel_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def test_create_program_from_source(ctype_str, dtype, ctypes_ctor):

assert n_elems % lws == 0

b_np = dpt.asnumpy(b)
a_np = dpt.asnumpy(a)
ref_c = a_np * np.array(d, dtype=dtype) + b_np
b_np = dpt.asnumpy(dpt.copy(b))
a_np = dpt.asnumpy(dpt.copy(a))
ref_c = a_np * np.asarray(d, dtype=dtype) + b_np
print(a_np, b_np, ref_c)

for r in (
Expand Down

0 comments on commit a34eb9a

Please sign in to comment.