Commit c527a0e
authored
[SYCL] Fix device comparison in removeDuplicateDevices (#6730)
Kernel bundles attempt to remove duplicate devices from a passed device
list. This is done through the `removeDuplicateDevices` function which
creates a set through comparing devices by their native handles.
However, the `getNative` member function on `device_impl` used to get
these handles will retain the native devices if the backend is OpenCL.
For root devices this will not have an effect, but on sub-devices this
can potentially lead to a leak of the devices. As a fix this commit
compares the PI devices rather than the native handles.
Signed-off-by: Larsen, Steffen <[email protected]>1 parent 3f2403b commit c527a0e
File tree
6 files changed
+17
-14
lines changed- sycl
- include/sycl
- source
- test/abi
- unittests
- kernel-and-program
- misc
6 files changed
+17
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 376 | + | |
| 377 | + | |
389 | 378 | | |
390 | 379 | | |
391 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
116 | 129 | | |
117 | 130 | | |
118 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3841 | 3841 | | |
3842 | 3842 | | |
3843 | 3843 | | |
| 3844 | + | |
3844 | 3845 | | |
3845 | 3846 | | |
3846 | 3847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
0 commit comments