Skip to content

Commit 2e0c3c4

Browse files
Add a w/a for MKLD-17201
1 parent 08626dc commit 2e0c3c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ def dpnp_eigh(a, UPLO, eigen_mode="V"):
858858
a_order = "C" if a.flags.c_contiguous else "F"
859859

860860
if a.ndim > 2:
861+
is_cpu_device = a.sycl_device.has_aspect_cpu
861862
orig_shape = a.shape
862863
# get 3d input array by reshape
863864
a = a.reshape(-1, orig_shape[-2], orig_shape[-1])
@@ -889,6 +890,14 @@ def dpnp_eigh(a, UPLO, eigen_mode="V"):
889890
sycl_queue=a_sycl_queue,
890891
)
891892

893+
# TODO: Remove this w/a when MKLD-17201 is solved.
894+
# Waiting for a host task executing an OneMKL LAPACK syevd call
895+
# on CPU causes deadlock due to serialization of all host tasks
896+
# in the queue.
897+
# We need to wait for each host tasks before calling _seyvd to avoid deadlock.
898+
if lapack_func == "_syevd" and is_cpu_device:
899+
ht_list_ev[2 * i].wait()
900+
892901
# call LAPACK extension function to get eigenvalues and eigenvectors of a portion of matrix A
893902
ht_list_ev[2 * i + 1], _ = getattr(li, lapack_func)(
894903
a_sycl_queue,

0 commit comments

Comments
 (0)