Repository navigation
Commit 32841da
committed
GPU Metal: wait for synchronous copies to complete
A copy or constant-memory write on stream -1 is synchronous in the CUDA and
HIP backends, and the callers read the destination right after it. The Metal
backend only encoded the copy into stream 0's open command buffer, so e.g.
CheckErrorCodes read a stale error buffer and lost the errors raised after
the last synchronisation, such as ERROR_MERGER_HIT_OVERFLOW. Drain the stream
before returning.1 parent 1eb67a0 commit 32841da
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
| |||
370 | 373 | | |
371 | 374 | | |
372 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
373 | 379 | | |
374 | 380 | | |
375 | 381 | | |
| |||
0 commit comments