Commit 57aef87
committed
[L0v2] fix unbounded memory growth of queue's submitted kernels
L0v2 avoids internally tracking each kernel submission through
an event for lifetime management. Instead, when a kernel is submitted
to the queue, its handle is added to a vector, to be removed at the
next queue synchronization point, urQueueFinish(). This is a much more
efficient way of handling kernel tracking, since it avoids taking and
storing an event. However, if the application never synchronizes the
queue, this vector of submitted kernels will grow unbounded.
This patch forcibly synchronizes the queue once the submitted kernels
vector reaches a threshold.1 parent 7b05a8c commit 57aef87
File tree
2 files changed
+28
-9
lines changed- unified-runtime/source/adapters/level_zero/v2
2 files changed
+28
-9
lines changedLines changed: 23 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 149 | + | |
| 150 | + | |
153 | 151 | | |
154 | 152 | | |
155 | 153 | | |
| |||
161 | 159 | | |
162 | 160 | | |
163 | 161 | | |
| 162 | + | |
164 | 163 | | |
165 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
168 | 180 | | |
169 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
170 | 185 | | |
171 | 186 | | |
172 | 187 | | |
| |||
195 | 210 | | |
196 | 211 | | |
197 | 212 | | |
198 | | - | |
| 213 | + | |
199 | 214 | | |
200 | 215 | | |
201 | 216 | | |
| |||
847 | 862 | | |
848 | 863 | | |
849 | 864 | | |
850 | | - | |
| 865 | + | |
851 | 866 | | |
852 | 867 | | |
853 | 868 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
0 commit comments