Skip to content

Commit 129f7b9

Browse files
committed
Release GIL before calling mkl_lapack::orgqr()
1 parent 71d3c23 commit 129f7b9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpnp/backend/extensions/lapack/orgqr.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,17 @@ static sycl::event orgqr_impl(sycl::queue &exec_q,
8787

8888
sycl::event orgqr_event;
8989
try {
90+
// Release GIL to avoid serialization of host task submissions
91+
// to the same queue in OneMKL
92+
py::gil_scoped_release lock{};
93+
9094
scratchpad = sycl::malloc_device<T>(scratchpad_size, exec_q);
9195

96+
// mkl_lapack::orgqr() is done through GPU-to-Host reverse offload:
97+
// exec_q.submit([&](sycl::handler& cgh) {
98+
// cgh.depends_on(depends);
99+
// cgh.host_task([=]() { orgqr_host(...); });
100+
// }).wait();
92101
orgqr_event = mkl_lapack::orgqr(
93102
exec_q,
94103
m, // The number of rows in the matrix; (0 ≤ m).

0 commit comments

Comments
 (0)