Repository navigation
[graph_trainer] Add gradient accumulation integration test - #2814
Closed
SherlockNoMad wants to merge 1 commit into
Closed
SherlockNoMad wants to merge 1 commit into
SherlockNoMad wants to merge 1 commit into
Conversation
Core torchtitan tests gradient accumulation via global_batch_size but graph_trainer never tested this code path. Gradient accumulation interacts with graph_trainer's custom forward_backward_step and SimpleFSDP's gradient handling, so it warrants explicit coverage. Add a JIT mode test with local_batch_size=8 on 4 GPUs (default global_batch_size=32) and global_batch_size=64 to trigger 2 gradient accumulation steps per optimizer step. [ghstack-poisoned]
This was referenced Apr 3, 2026
SherlockNoMad
added a commit
that referenced
this pull request
Apr 9, 2026
Port PR #2814: Add a JIT gradient accumulation integration test that verifies training with 2 gradient accumulation steps (local_batch_size=8, global_batch_size=64, 4 GPUs).
2 tasks
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.
Stack from ghstack (oldest at bottom):
Core torchtitan tests gradient accumulation via global_batch_size but
graph_trainer never tested this code path. Gradient accumulation
interacts with graph_trainer's custom forward_backward_step and
SimpleFSDP's gradient handling, so it warrants explicit coverage.
Add a JIT mode test with local_batch_size=8 on 4 GPUs (default
global_batch_size=32) and global_batch_size=64 to trigger 2 gradient
accumulation steps per optimizer step.