Commit 6fa26d4
committed
[ExecuTorch][WebGPU] Per-pass compute dispatch ordering for fused multi-dispatch ops
Pull Request resolved: pytorch#20072
WebGPU has no write->read ordering between dispatches in a single compute pass, so a fused multi-dispatch op (SDPA) can read stale writes. Record one compute pass per dispatch in `execute()` (both the full and ranged paths) -- the pass boundary is WebGPU's implicit barrier (there is no `vkCmdPipelineBarrier`). Single-dispatch ops are unchanged. Also flips this file to the C++17 nested namespace. Consumed by the fused SDPA op above.
ghstack-source-id: 391378799
@exported-using-ghexport
Differential Revision: [D107543258](https://our.internmc.facebook.com/intern/diff/D107543258/)1 parent 3dcb1c4 commit 6fa26d4
2 files changed
Lines changed: 15 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 381 | + | |
387 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
388 | 386 | | |
389 | 387 | | |
390 | 388 | | |
391 | 389 | | |
392 | 390 | | |
| 391 | + | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
| |||
423 | 420 | | |
424 | 421 | | |
425 | 422 | | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
431 | 427 | | |
432 | 428 | | |
433 | 429 | | |
434 | 430 | | |
435 | 431 | | |
| 432 | + | |
| 433 | + | |
436 | 434 | | |
437 | 435 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | 436 | | |
442 | 437 | | |
443 | 438 | | |
| |||
545 | 540 | | |
546 | 541 | | |
547 | 542 | | |
548 | | - | |
549 | | - | |
550 | | - | |
| 543 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 194 | + | |
0 commit comments