Commit 7a4ec13
[ET-VK] 1/n Split dispatches between multiple command buffers. Add semaphore support in command buffer. (#12519)
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at
bottom):
* #12525
* #12523
* #12522
* __->__ #12519
execute stage
## Context
This following diffs aims to improve the performance of the Executorch
Vulkan backend by adding a mechanism to issue multiple command buffers
in prepack and execute function, so GPU work is issues while CPU is
still working on issuing new work.
## This Diff
### Summary
This diff is the first in a series of diffs that aim to split dispatches
between multiple command buffers and add semaphore support in the
command buffer.
The changes in this diff include:
* Adding a `VkSemaphore` parameter to the `CommandBuffer` constructor in
`vk_api/Command.cpp` and `vk_api/Command.h` to support signaling when
the command buffer has completed execution.
* Modifying the `CommandBuffer` constructor in `vk_api/Command.h` and
`vk_api/Command.cpp` to include the `VkSemaphore` parameter.
* Updating the `CommandBuffer` object in `api/Context.cpp` to include
the `VkSemaphore` parameter.
Differential Revision:
[D78282194](https://our.internmc.facebook.com/intern/diff/D78282194/)
---------
Co-authored-by: Stephen Jia <[email protected]>1 parent 24a1e2f commit 7a4ec13
File tree
3 files changed
+41
-4
lines changed- backends/vulkan/runtime
- api
- vk_api
3 files changed
+41
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
31 | 34 | | |
32 | | - | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
304 | 310 | | |
305 | 311 | | |
306 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
307 | 319 | | |
308 | 320 | | |
309 | 321 | | |
| |||
314 | 326 | | |
315 | 327 | | |
316 | 328 | | |
| 329 | + | |
317 | 330 | | |
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
321 | 334 | | |
322 | 335 | | |
323 | 336 | | |
324 | | - | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
| |||
337 | 350 | | |
338 | 351 | | |
339 | 352 | | |
| 353 | + | |
340 | 354 | | |
341 | 355 | | |
342 | 356 | | |
| |||
348 | 362 | | |
349 | 363 | | |
350 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
351 | 376 | | |
352 | 377 | | |
353 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
103 | 113 | | |
104 | 114 | | |
105 | 115 | | |
| |||
130 | 140 | | |
131 | 141 | | |
132 | 142 | | |
| 143 | + | |
| 144 | + | |
133 | 145 | | |
134 | 146 | | |
135 | 147 | | |
| |||
0 commit comments