examples CI: shrink CPU DDP arm batch to fix gloo timeout#269
Open
wz337 wants to merge 1 commit into
Open
Conversation
Summary:
The examples GitHub workflow's "Run DDP example on CPU" step launched two gloo
ranks each at local_batch_size=1024 on the 4-core `4-core-ubuntu-gpu-t4` runner.
The combined memory of two 1024-batch processes plus Shampoo preconditioner state
exceeds the runner, so one rank stalls/OOMs and the peer hangs until the 30-min
gloo recv timeout in backward:
RuntimeError: [gloo/transport/tcp/unbound_buffer.cc:78]
Timed out waiting 1800000ms for recv operation to complete
-> ChildFailedError: distributed_shampoo.examples.cifar10_example FAILED
This is a pre-existing latent flake: the example DDP code (cifar10_example.py,
examples/utils.py, examples/parallelism.py, ddp.yaml) is byte-identical to prior
syncs; it only surfaced once a run got past the CIFAR download. The single-process
CPU steps at batch 1024 pass -- it is the 2x memory of the DDP arm that tips over.
Fix: reduce the CPU DDP step to local_batch_size=128 (the config default), which
exercises the same DDP + gloo + Shampoo path at ~8x lower activation memory. The
GPU DDP step and the single-process steps are unchanged.
Differential Revision: D112602955
|
@wz337 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112602955. |
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.
Summary:
The examples GitHub workflow's "Run DDP example on CPU" step launched two gloo
ranks each at local_batch_size=1024 on the 4-core
4-core-ubuntu-gpu-t4runner.The combined memory of two 1024-batch processes plus Shampoo preconditioner state
exceeds the runner, so one rank stalls/OOMs and the peer hangs until the 30-min
gloo recv timeout in backward:
RuntimeError: [gloo/transport/tcp/unbound_buffer.cc:78]
Timed out waiting 1800000ms for recv operation to complete
-> ChildFailedError: distributed_shampoo.examples.cifar10_example FAILED
This is a pre-existing latent flake: the example DDP code (cifar10_example.py,
examples/utils.py, examples/parallelism.py, ddp.yaml) is byte-identical to prior
syncs; it only surfaced once a run got past the CIFAR download. The single-process
CPU steps at batch 1024 pass -- it is the 2x memory of the DDP arm that tips over.
Fix: reduce the CPU DDP step to local_batch_size=128 (the config default), which
exercises the same DDP + gloo + Shampoo path at ~8x lower activation memory. The
GPU DDP step and the single-process steps are unchanged.
Differential Revision: D112602955