Commit bd73e57
Lazily initialize GlobalAdapter (#21490)
**Problem**
`ur_win_proxy_loader` loads L0 adapter DLL in its `DLLMain`. Global
variables are initialized during DLL loading and so is `GlobalAdapter` -
which tries to initialize L0 driver (`zeInit`). `zeInit` may spawn
threads and it's illegal to spawn threads directly or indirectly from
`DLLMain`.
This is causing deadlock with some L0 driver versions.
**Proposed Solution**
Lazily initialize `GlobalAdapter`, just like what we do on Linux.1 parent 9a298c6 commit bd73e57
1 file changed
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 25 | | |
32 | | - | |
| 26 | + | |
33 | 27 | | |
34 | 28 | | |
35 | 29 | | |
| |||
0 commit comments