Skip to content

Commit bec95f9

Browse files
Use ti._zeros_usm_ndarray in dpctl.tensor.zeros
1 parent 3f9a5bf commit bec95f9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dpctl/tensor/_ctors.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,11 @@ def zeros(
945945
order=order,
946946
buffer_ctor_kwargs={"queue": sycl_queue},
947947
)
948-
# FIXME: replace with asynchronous call to ti
949-
res.usm_data.memset()
948+
_manager = dpctl.utils.SequentialOrderManager[sycl_queue]
949+
# populating new allocation, no dependent events
950+
hev, zeros_ev = ti._zeros_usm_ndarray(res, sycl_queue)
951+
_manager.add_event_pair(hev, zeros_ev)
952+
950953
return res
951954

952955

0 commit comments

Comments
 (0)