[2613] Track GPU memory peaks - #2628
Open
florianscheidl wants to merge 7 commits into
Open
Conversation
…therGenerator into dev/track-peak-memory
florianscheidl
marked this pull request as ready for review
July 13, 2026 12:12
This was referenced Jul 20, 2026
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.
Description
We add the option to track peaks in allocated and reserved CUDA memory and log these per trainer_logging.metrics steps. We introduce a MemoryTracker class with a similar structure to the ThroughputTracker. Since we are primarily interested in peak memory, we max-reduce the peak memory across devices.
It's currently configured as opt-in in the config (requires that
train_logging.memory_tracking=True).We add tests to check that the tracker works as expected.
Example:
{"weathergen.timestamp": 1783935174691, "weathergen.time": 20260713113254, "stage": "train", "weathergen.step": 280, "performance.memory.train.max_allocated_gib": 15.098231315612793, "performance.memory.train.max_reserved_gib": 17.353515625, ...}
Issue Number
Fixes #2613.
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60