Skip to content

Commit 8efb558

Browse files
Wait for each host_task after calling _syevd
1 parent 238f0e4 commit 8efb558

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -932,14 +932,6 @@ def dpnp_eigh(a, UPLO, eigen_mode="V"):
932932
sycl_queue=a_sycl_queue,
933933
)
934934

935-
# TODO: Remove this w/a when MKLD-17201 is solved.
936-
# Waiting for a host task executing an OneMKL LAPACK syevd call
937-
# on CPU causes deadlock due to serialization of all host tasks
938-
# in the queue.
939-
# We need to wait for each host tasks before calling _seyvd to avoid deadlock.
940-
if lapack_func == "_syevd" and is_cpu_device:
941-
ht_list_ev[2 * i].wait()
942-
943935
# call LAPACK extension function to get eigenvalues and eigenvectors of a portion of matrix A
944936
ht_list_ev[2 * i + 1], _ = getattr(li, lapack_func)(
945937
a_sycl_queue,
@@ -950,6 +942,15 @@ def dpnp_eigh(a, UPLO, eigen_mode="V"):
950942
depends=[copy_ev],
951943
)
952944

945+
# TODO: Remove this w/a when MKLD-17201 is solved.
946+
# Waiting for a host task executing an OneMKL LAPACK syevd call
947+
# on CPU causes deadlock due to serialization of all host tasks
948+
# in the queue.
949+
# We need to wait for each host tasks before calling _seyvd again
950+
# to avoid deadlock.
951+
if lapack_func == "_syevd" and is_cpu_device:
952+
ht_list_ev[2 * i + 1].wait()
953+
953954
dpctl.SyclEvent.wait_for(ht_list_ev)
954955

955956
w = w.reshape(w_orig_shape)

0 commit comments

Comments
 (0)