Repository navigation
Commit 2b562ba
committed
GPU Metal: wait for other streams in a command buffer of its own
StreamWaitForEvents encoded the waits into the stream's open command buffer,
after whatever work had accumulated there. With the merger's SectorRefit on
all streams, stream 0's buffer (its own 4 sectors of refit) then waited for
the 7 other streams: on pbpb30 its GPU work ended 36 ms before the wait was
satisfied, and the buffer stayed incomplete meanwhile. Commit the pending
work first, so that every GPU-side wait sits at the start of a buffer with no
work before it. The host drains the stream right after the waits anyway.
pbpb30, M1 Max, 3 rounds of 10 events: 958.8 -> 959.7 ms/ev; 6 rounds of
the same change as a runtime switch: 971.2 -> 961.3 ms/ev. Metal dumps
byte-identical on pbpb30, sim5pp identical to the CPU.1 parent 57490e0 commit 2b562ba
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
494 | 499 | | |
495 | 500 | | |
496 | 501 | | |
| |||
0 commit comments