Skip to content

Commit 08928bf

Browse files
authored
Resolve possible race condition in dpnp.inv() implemenetation (#1940)
1 parent 4ad786f commit 08928bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2091,7 +2091,10 @@ def dpnp_inv(a):
20912091
usm_a_f = a_f.T.get_array()
20922092
usm_b_f = b_f.T.get_array()
20932093

2094-
ht_ev, gesv_ev = li._gesv(a_sycl_queue, usm_a_f, usm_b_f, depends=[copy_ev])
2094+
# depends on copy_ev and an event from dpt.eye() call
2095+
ht_ev, gesv_ev = li._gesv(
2096+
a_sycl_queue, usm_a_f, usm_b_f, depends=_manager.submitted_events
2097+
)
20952098
_manager.add_event_pair(ht_ev, gesv_ev)
20962099

20972100
return b_f

0 commit comments

Comments
 (0)