Commit 3b007d9
authored
[UR][L0] Init/deinit L0 adapter on first/last use (#19089)
Instead of using a global constructor to initialize the L0 adapter,
do it in the first call to `urAdapterGet`. Likewise, instead of
de-initing it as a global destructor, do it in the last call to
`urAdapterRelease`.
As well as not doing L0 initialization where the user is not using
L0, it also allows `urAdapterRelease` to be called in a global
destructor (e.g. what the SYCL runtime does) without worrying
about global destructor order.1 parent fb18321 commit 3b007d9
File tree
4 files changed
+27
-69
lines changed- unified-runtime/source/adapters/level_zero
4 files changed
+27
-69
lines changedLines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 93 | | |
101 | 94 | | |
102 | 95 | | |
| |||
195 | 188 | | |
196 | 189 | | |
197 | 190 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | 191 | | |
204 | 192 | | |
205 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
| 668 | + | |
| 669 | + | |
668 | 670 | | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
678 | 674 | | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | 675 | | |
685 | 676 | | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
686 | 681 | | |
687 | 682 | | |
688 | 683 | | |
| |||
692 | 687 | | |
693 | 688 | | |
694 | 689 | | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
701 | 697 | | |
702 | | - | |
703 | | - | |
704 | | - | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
705 | 701 | | |
706 | | - | |
707 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
708 | 707 | | |
709 | 708 | | |
710 | 709 | | |
711 | 710 | | |
712 | 711 | | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
718 | 715 | | |
719 | 716 | | |
720 | 717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
Lines changed: 0 additions & 25 deletions
This file was deleted.
0 commit comments