Skip to content

Commit 6fa9d41

Browse files
committed
Add dependencies to zeros and full kernels in dpnp_fill
1 parent 481eb62 commit 6fa9d41

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dpnp/dpnp_algo/dpnp_fill.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ def dpnp_fill(arr, val):
4848
val = dpnp.get_usm_ndarray(val)
4949
if val.shape != ():
5050
raise ValueError("`val` must be a scalar")
51-
# asarray moves scalar to the correct device
52-
# and casts to the expected dtype
5351
a_val = dpt.asarray(
5452
val,
5553
dtype=arr.dtype,
@@ -78,8 +76,8 @@ def dpnp_fill(arr, val):
7876
dep_evs = _manager.submitted_events
7977
# can leverage efficient memset when val is 0
8078
if arr.flags["FORC"] and val == 0:
81-
h_ev, zeros_ev = _zeros_usm_ndarray(arr, exec_q)
79+
h_ev, zeros_ev = _zeros_usm_ndarray(arr, exec_q, depends=dep_evs)
8280
_manager.add_event_pair(h_ev, zeros_ev)
8381
else:
84-
h_ev, fill_ev = _full_usm_ndarray(val, arr, exec_q)
82+
h_ev, fill_ev = _full_usm_ndarray(val, arr, exec_q, depends=dep_evs)
8583
_manager.add_event_pair(h_ev, fill_ev)

0 commit comments

Comments
 (0)