Repository navigation
Wake each PE's own chares per epoch instead of three array broadcasts - #45
Open
AdvaitTahilyani wants to merge 5 commits into
Open
AdvaitTahilyani wants to merge 5 commits into
AdvaitTahilyani wants to merge 5 commits into
Conversation
…dcasts
receive_dag and receive_get_request run on every PE (group broadcast from
PE 0), and each of them ended with partition_proxy_{1,2,3}.run(): three
array broadcasts per PE per epoch. Each went to PE 0 (the serializer) and
from there to every PE, so an epoch cost 3 P broadcasts and 3 P^2 message
deliveries, and every chare got run() P times.
Charm++ also keeps every array broadcast on every PE until the second
1-minute spring cleaning after it (for elements created later). On the
ofi/cxi layer a received message occupies a whole 64 KB eager receive
buffer (a 128 KB slot of the registered message pool), so each process
retained 3 P x 128 KB per epoch: 6 MB per epoch at 16 processes, about
1.4 GB per linreg repeat and 10 GB or more per process after two minutes.
The pool grows in 128 MB blocks that are never returned, and its
allocator searches the full blocks first to last on every allocation, so
message allocation got slower as the run went on.
Each PE now sends run() to its own chares (wake_local_partitions). A chare
created later still starts itself from init(), and finds the stored DAGs
of the epochs it missed, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What was wrong.
receive_dagandreceive_get_requestrun on every PE (a group broadcast from PE 0), and each ended withpartition_proxy_{1,2,3}.run(): three array broadcasts per PE per epoch, i.e. 3P broadcasts and 3P² deliveries per epoch, and every chare woken P times. Charm++ keeps every array broadcast on every PE until the second 1-minute spring cleaning (for elements created later). On ofi/cxi a received message holds a 128 KB slot of the registered message pool, so each process retained 3P × 128 KB per epoch (6 MB at 16 processes). The pool grows in 128 MB blocks that are never returned, and its allocator scans the full blocks on every allocation, so message handling slowed down as a run went on: at 16 GPUs repeats drifted and resident memory reached 10–12 GB (linreg) and 26–27 GB (cg) per process within a minute.Change.
wake_local_partitions()(partition_lifecycle.cpp) sendsrun()to this PE's own chares; the three call sites use it. A chare created later still starts itself frominit()and replays the stored DAGs of the epochs it missed, as before.Measured (per-repeat seconds, ofi build; measured on the older integration tree
scale-intwith and without this commit, not on this stack head):-n 4000 -i 2000-n 120 -m 3000Resident memory at 16 GPUs: 1.0–1.25 GB per process and flat, against 9.7–27 GB. The allocator's block search (
checkblock) on process 0 went from 2.6% → 7.8% of CPU time (cg baseline) to 0.2%.Validated. nc build; CPU regress (
regress.sh) at +p1 and +p2 on this branch: originals 15/15, ports 25/25, ops 38/38 at each (job 24506761). GPU: covered by the validation of the top of this stack (#48).Known limits.
array_metaevery array ever created (about 1 MB/s in linreg); unbounded, but not a time cost in these runs.🤖 Generated with Claude Code