Commit 59f7b82
Calculating axis's local wg size based on global workload and making it as close as possible to warp size of 32.
Summary:
This diff changes the local workgroup size calculation logic in the Vulkan backend of Executorch.
The workgroup size of the largest axis is kept largest so workgroups are better occupied.
The workgroup size is calculated based on the warp size of 32. When kernel is 2 dimensional largest axis is kept close to warp size it, so threads in the same warp Read / Write to consecutive memory locations, thus improving performance.
Reviewed By: SS-JIA
Differential Revision: D644186321 parent c7474f8 commit 59f7b82
1 file changed
+32
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
489 | 504 | | |
490 | | - | |
491 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
492 | 513 | | |
493 | 514 | | |
494 | | - | |
495 | | - | |
| 515 | + | |
496 | 516 | | |
497 | 517 | | |
498 | | - | |
499 | 518 | | |
500 | | - | |
501 | | - | |
502 | | - | |
| 519 | + | |
| 520 | + | |
503 | 521 | | |
504 | 522 | | |
505 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
506 | 528 | | |
507 | 529 | | |
508 | 530 | | |
| |||
0 commit comments