Enhances process_group_test
#113
Merged
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.
See #109 for more context, but there was a desire to:
What does this PR do?
_test_multi_pg
and replaces it with individualrun_{collective}_test
srun_{collective}_test
robust to different world sizes (i.e. 1, 2, or 3) to be more generalizableMultiPgBaseTest
, a base test that spins up process groups and threadpool executors on setup (and destroys on teardown) so they can be re-used inbetween each test invocation.MultiPgBaseTest
introduces:_run_parallel
, a convenience function to run a collective test across its process groups, and_run_with_resiliency
, a convenience function that runs a collective test, invokes failure modes and tests for correct resiliency behaviors._test_multi_pg
intoGlooMultiPgTest
,BabyGlooMultiPgTest
,BabyNcclMultiPgTest
andBabyNcclResiliencyTest
BabyNcclMultiPgTest
andBabyNcclResiliencyTest
are separated so that the former can test for 2 GPUs, and the latter for 3. While all collectives could theoretically be tested with only 2 GPUs, it seems a bit trivial to run with only one process group.Note that the test time increases from ~17s to ~43.48s:
mostly due to the resiliency tests taking awhile to run. Without the resiliency tests it takes 24.3 seconds: