Repository navigation
GPU Metal: allocate the memory pools from anonymous memory - #16069
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.