Repository navigation
Commit 6d52586
committed
GPU Metal: let more groups of the tracklet constructor fit on a core
The tracklet constructor follows each tracklet row by row through a
chain of dependent reads: hit data, links and three spline evaluations
of the transformation per row, which take about 60% of its time. On an
M1 Max it is bound by their latency, not by bandwidth, address
translation or ALU (ALU utilization 16%, LLC limiter 22%, MMU limiter
5%, compute occupancy 10%), so it gets faster with more threads in
flight, and two limits kept them few: the 12 KB of rows that each group
copies to threadgroup memory, and registers allocated for groups of
128 threads.
On Metal the rows are now read from device memory, and the pipeline is
compiled as for 640 threads per group while it still runs groups of
128, as the minimum blocks of __launch_bounds__ do. Either change alone
gains nothing. Together the kernel takes 14% less time on a quarter of
a 30 kHz Pb-Pb time frame: 421 -> 362 ms (--debug 1, three interleaved
rounds), with the same number of tracks. Compiling for 512 to 768
threads is within 4%, 1024 is slower; groups of 64 or 192 threads
are slower than 128.
The sim5pp cluster dump is byte-identical to the CPU, and pbpb30 in
deterministic mode gives 22,183 tracks. Other backends compile the
existing code unchanged.1 parent 4ef5f46 commit 6d52586
3 files changed
Lines changed: 23 additions & 5 deletions
File tree
- GPU/GPUTracking
- Base/metal
- SectorTracker
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | | - | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
| |||
96 | 105 | | |
97 | 106 | | |
98 | 107 | | |
99 | | - | |
| 108 | + | |
100 | 109 | | |
101 | 110 | | |
102 | 111 | | |
| |||
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
109 | | - | |
| 118 | + | |
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
| |||
482 | 491 | | |
483 | 492 | | |
484 | 493 | | |
| 494 | + | |
485 | 495 | | |
| 496 | + | |
486 | 497 | | |
487 | 498 | | |
488 | 499 | | |
| |||
509 | 520 | | |
510 | 521 | | |
511 | 522 | | |
| 523 | + | |
| 524 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
0 commit comments