Commit 3ab1216
authored
Release GIL when calling
This PR fixes a deadlock in QR decomposition tests by adding GIL release
before `mkl_lapack::orgqr` call.
The hang occurred because:
1. dpnp/dpctl submits a `host_task` to manage Python object lifetimes
2. host_task needs to acquire the GIL to decrement reference counts
3. if the main thread holds the GIL during queue submission → deadlock
4. `orgqr` is currently implemented in oneMKL as GPU-to-Host reverse
offload:
```cpp
exec_q.submit([&](sycl::handler& cgh) {
cgh.depends_on(depends);
cgh.host_task([=]() { orgqr_host(...); });
}).wait();
```
As a solution PR proposes to release GIL using before calling the OneMKL
operations. The GIL is automatically reacquired when the function
returns (RAII).mkl_lapack::orgqr (#2850)1 parent 206d85d commit 3ab1216
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| |||
0 commit comments