Repository navigation
Commit a8a8f73
committed
GPU Metal: allocate the memory pools from anonymous memory
The full system test publishes its time frames seconds apart, and after
a few idle seconds the first command buffer of a time frame waits until
the driver has made the memory pools resident again: in a Metal System
Trace its driver processing takes about 165 ms, with "Wire 5.59 GiB
System Memory" for the 6 GB device pool. That is the ~160 ms by which a
time frame in the full system test was slower than the same time frame
in the standalone benchmark, which never idles; with 2 s between the
time frames the two take the same time. The driver does this faster for
a buffer around anonymous memory than for one Metal allocates: 77 ms
instead of 125 ms for 6 GB after 8 s idle on an M1 Max, in a standalone
test. So wrap mmap'ed memory with newBufferWithBytesNoCopy for the device
and host pools.
On an M1 Max, interleaved over 4 rounds, the warm time frames of the
TPC-only reconstruction of the 10-collision Pb-Pb full system test take
955 ms instead of 1003 (median of the chain's wall time, 8 s between the
time frames), with the same 1,355,432 clusters. The 30-collision Pb-Pb
benchmark is unchanged (970 against 967 ms per event over 3 rounds), and
its clusters are byte-identical to the CPU's, as on sim5pp.1 parent cabb816 commit a8a8f73
1 file changed
Lines changed: 28 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
53 | 79 | | |
54 | 80 | | |
55 | 81 | | |
| |||
116 | 142 | | |
117 | 143 | | |
118 | 144 | | |
119 | | - | |
| 145 | + | |
120 | 146 | | |
121 | 147 | | |
122 | 148 | | |
| |||
143 | 169 | | |
144 | 170 | | |
145 | 171 | | |
146 | | - | |
| 172 | + | |
147 | 173 | | |
148 | 174 | | |
149 | 175 | | |
| |||
0 commit comments