Repository navigation
Commit f81c675
committed
GPU Metal: do not let Metal track hazards on the memory buffers
All memory of the reconstruction lives in three MTLBuffers, so with
Metal's default hazard tracking every encoder that writes device
memory conflicts with every other one, and Metal ordered them even
across the streams' command queues: in a Metal System Trace the
per-sector kernels the chain spreads over 8 streams did not overlap at
all (kernel time summed to the GPU busy time). The backend orders the
work itself, as CUDA streams do: a fence between the encoders of a
stream, an event between its command buffers, and the chain's events
between streams. So create the buffers untracked; the kernels of
different streams now overlap by about 150 ms per event.
On an M1 Max, interleaved over 3 rounds of 10 runs (load average 4 to
7), the 30-collision Pb-Pb time frame takes 975 ms per event instead
of 1046, and a 10-collision Pb-Pb time frame dumped from the full
system test 754 ms instead of 850. The clusters are byte-identical to
the CPU's on the 30-collision time frame and on sim5pp.1 parent 49dec7f commit f81c675
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
0 commit comments