feat(ci): add multi-GPU tests and CI job for DDP validation#37
Merged
Conversation
…fault torch.compile=on combined with DataLoader spawn workers during LER validation causes a segfault (20 leaked semaphores, core dumped). Set PREDECODER_TORCH_COMPILE=0 for the Train all orientations step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…vent segfault" This reverts commit 7f0f6c8.
- Add code/tests/test_multi_gpu.py with three test classes (skipped
unless torch.cuda.device_count() >= 2):
- TestNCCLCommunication: verifies NCCL all_reduce sum across 2 ranks
- TestDDPForwardBackward: DDP forward+backward with PreDecoder, checks
finite gradients
- TestMultiGPUDataGenerator: QCDataGeneratorTorch places output on the
correct cuda:{rank} device per rank
Uses mp.spawn with file:// rendezvous to avoid port conflicts.
- Add multi-gpu-tests job to ci-gpu.yml:
- Runs on linux-amd64-gpu-rtxpro6000-latest-2 (2-GPU runner)
- Post-merge only (if: main + needs: gpu-tests), 20 min timeout
- Verifies >=2 GPUs are visible before proceeding
- Runs test_multi_gpu.py then a 2-GPU DDP smoke train+inference via
local_run.sh with GPUS=2 (smoke_run.sh hardcodes GPUS=1)
- LER check <= 0.35 matches the existing gpu-tests threshold
Signed-off-by: Ivan Basov <ibasov@nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Apply yapf formatting (blank lines before top-level functions, assert formatting) to test_multi_gpu.py - Remove `if: github.ref == 'refs/heads/main'` from multi-gpu-tests so the job appears in PR CI checks (was invisible on pull-request branches) Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
check_ler_from_log.py looks for [LER Validation] lines which are emitted during training, not inference. Was incorrectly pointing at the inference log. Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
|
Thank you, @ivanbasov. @kvmto - do you know if the tests in this PR would've caught the multi-GPU integration issue you previously mentioned today (with respect to cuStabilizer)? |
Collaborator
This overlaps with what I found. I would merge it. |
ivanbasov
added a commit
that referenced
this pull request
Apr 10, 2026
* fix(ci): disable torch.compile in orientation training to prevent segfault torch.compile=on combined with DataLoader spawn workers during LER validation causes a segfault (20 leaked semaphores, core dumped). Set PREDECODER_TORCH_COMPILE=0 for the Train all orientations step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Revert "fix(ci): disable torch.compile in orientation training to prevent segfault" This reverts commit 7f0f6c8. * feat(ci): add multi-GPU tests and CI job for DDP validation - Add code/tests/test_multi_gpu.py with three test classes (skipped unless torch.cuda.device_count() >= 2): - TestNCCLCommunication: verifies NCCL all_reduce sum across 2 ranks - TestDDPForwardBackward: DDP forward+backward with PreDecoder, checks finite gradients - TestMultiGPUDataGenerator: QCDataGeneratorTorch places output on the correct cuda:{rank} device per rank Uses mp.spawn with file:// rendezvous to avoid port conflicts. - Add multi-gpu-tests job to ci-gpu.yml: - Runs on linux-amd64-gpu-rtxpro6000-latest-2 (2-GPU runner) - Post-merge only (if: main + needs: gpu-tests), 20 min timeout - Verifies >=2 GPUs are visible before proceeding - Runs test_multi_gpu.py then a 2-GPU DDP smoke train+inference via local_run.sh with GPUS=2 (smoke_run.sh hardcodes GPUS=1) - LER check <= 0.35 matches the existing gpu-tests threshold Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ci): fix YAPF formatting and show multi-gpu-tests on PRs - Apply yapf formatting (blank lines before top-level functions, assert formatting) to test_multi_gpu.py - Remove `if: github.ref == 'refs/heads/main'` from multi-gpu-tests so the job appears in PR CI checks (was invisible on pull-request branches) Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ci): check training log for LER in multi-gpu-tests check_ler_from_log.py looks for [LER Validation] lines which are emitted during training, not inference. Was incorrectly pointing at the inference log. Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
ivanbasov
added a commit
that referenced
this pull request
Apr 10, 2026
* fix(ci): disable torch.compile in orientation training to prevent segfault torch.compile=on combined with DataLoader spawn workers during LER validation causes a segfault (20 leaked semaphores, core dumped). Set PREDECODER_TORCH_COMPILE=0 for the Train all orientations step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Revert "fix(ci): disable torch.compile in orientation training to prevent segfault" This reverts commit 7f0f6c8. * feat(ci): add multi-GPU tests and CI job for DDP validation - Add code/tests/test_multi_gpu.py with three test classes (skipped unless torch.cuda.device_count() >= 2): - TestNCCLCommunication: verifies NCCL all_reduce sum across 2 ranks - TestDDPForwardBackward: DDP forward+backward with PreDecoder, checks finite gradients - TestMultiGPUDataGenerator: QCDataGeneratorTorch places output on the correct cuda:{rank} device per rank Uses mp.spawn with file:// rendezvous to avoid port conflicts. - Add multi-gpu-tests job to ci-gpu.yml: - Runs on linux-amd64-gpu-rtxpro6000-latest-2 (2-GPU runner) - Post-merge only (if: main + needs: gpu-tests), 20 min timeout - Verifies >=2 GPUs are visible before proceeding - Runs test_multi_gpu.py then a 2-GPU DDP smoke train+inference via local_run.sh with GPUS=2 (smoke_run.sh hardcodes GPUS=1) - LER check <= 0.35 matches the existing gpu-tests threshold Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ci): fix YAPF formatting and show multi-gpu-tests on PRs - Apply yapf formatting (blank lines before top-level functions, assert formatting) to test_multi_gpu.py - Remove `if: github.ref == 'refs/heads/main'` from multi-gpu-tests so the job appears in PR CI checks (was invisible on pull-request branches) Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ci): check training log for LER in multi-gpu-tests check_ler_from_log.py looks for [LER Validation] lines which are emitted during training, not inference. Was incorrectly pointing at the inference log. Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Signed-off-by: Ivan Basov <ibasov@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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
code/tests/test_multi_gpu.pywith three short-running tests (skip unlesstorch.cuda.device_count() >= 2):(rank+1), verify sum = 3.0PreDecoderModelMemory_v1(d=3) in DDP, asserts all gradients finite after backwardQCDataGeneratorTorchoutput lands oncuda:{rank}multi-gpu-testsjob toci-gpu.ymlrunning onlinux-amd64-gpu-rtxpro6000-latest-2(post-merge only, 20 min timeout), with a 2-GPU DDP smoke train+inference and LER ≤ 0.35 checkNotes
mp.spawnwithfile://rendezvous avoids port conflicts between parallel test runslocal_run.shdirectly withGPUS=2—smoke_run.shhardcodesGPUS=1so cannot be reusedlinux-amd64-gpu-rtxpro6000-latest-2is assumed based on the existing-1single-GPU naming pattern; confirm this label exists in the runner pool before merging, otherwise the job will queue indefinitelyTest plan
linux-amd64-gpu-rtxpro6000-latest-2runner label existstest_multi_gpu.pyskips cleanly on single-GPU CI runners (existinggpu-testsjob)multi-gpu-testsjob passes on a 2-GPU runner after merge to main🤖 Generated with Claude Code