Support torchrun-style InfiniTrain multi-process launch#184
Open
chen2021673 wants to merge 4 commits into
Open
Support torchrun-style InfiniTrain multi-process launch#184chen2021673 wants to merge 4 commits into
chen2021673 wants to merge 4 commits into
Conversation
Add a dedicated 8_proc test group containing the 8-process variants of the original basic multi-GPU cases.
Track DataLoader progress by global batches so distributed ranks slice data consistently and can resume/cycle from saved consumption counts. Also scope CCL unique ID files per run, generate NCCL IDs only on the main rank, clean up run-local rendezvous files, and add DataLoader coverage.
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
InfiniTrain’s existing parallel execution model primarily launches multiple training threads within a single process. This PR adds a torchrun-style multi-process launcher, allowing each local process to bind to its own GPU while preserving the existing intra-process multithreading mode. It also fixes DataLoader and NCCL unique ID file conflicts in multi-process environments.
Changes
Update
infini_runto:--as the launcher/training-args separatornproc_per_nodechild processesUpdate parallel runtime to:
Update GPT-2/Llama3 examples and parallel helpers to use local-device mapping.
Update
scripts/run_models_and_profile.bashto:infini_runnproc_per_nodeas launcher-only confignthread_per_processas the per-process thread countUpdate
scripts/test_config.jsonto use multi-process configs:nproc_per_node=8, nthread_per_process=1nproc_per_node=4, nthread_per_process=1Add documentation describing behavior, compatibility, and example usage.
Compatibility
Existing direct runs remain supported:
The launcher can also preserve the old single-process multi-thread behavior:
The recommended single-node 8-GPU multi-process usage is:
Test