Commit 01dbd72
Keep the wide N tile when K per group only partly fills it.
_pick_tile rejected every tile with TILE_N > K/groups, so the Qwen-Image VAE
layers with cout=96 dropped from (128,128,2,4) to (64,64,2,2) and lost 30-47%
of their GEMM time: the narrower tile halves the waves per block and doubles
the A traffic per output element, which costs far more than the 25% of masked
N columns. Accept a tile whose N span is at least TILE_MIN_N_FILL full; the
wave-count check still demotes it when the problem cannot fill the device.
Measured on gfx950, bf16, 3x3, wall clock (independent process per shape, new
and old selector alternated in-process, min of 5):
shape calls before after
96->96 @1024x1024 10 0.527 0.394
96->96 @1328x1328 10 0.973 0.692
192->96 @1024x1024 1 0.925 0.694
96->96 @1025 s2 1 0.269 0.224
3->96 @1024x1024 1 0.142 0.130
The other 13 VAE shapes keep their tile and are unchanged. Weighted over the
VAE call mix: 1024 path 14.46 -> 12.82 ms (1.29x -> 1.45x vs MIOpen), the two
1328 layers 12.04 -> 9.22 ms (1.37x -> 1.79x).1 parent d25d855 commit 01dbd72
2 files changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
954 | 956 | | |
955 | 957 | | |
956 | 958 | | |
957 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
958 | 964 | | |
959 | 965 | | |
960 | 966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
132 | 152 | | |
133 | 153 | | |
134 | 154 | | |
| |||
0 commit comments