Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] fix the wrong nproc_per_node in the multi gpu test #2422

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_multigpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def test_pad_across_processes(self):
with patch_environment(omp_num_threads=1):
execute_subprocess_async(cmd, env=os.environ.copy())

@require_multi_device
@require_multi_gpu
def test_distributed_data_loop(self):
"""
This TestCase checks the behaviour that occurs during distributed training or evaluation,
when the batch size does not evenly divide the dataset size.
"""
print(f"Found {device_count} devices, using 2 devices only")
cmd = ["torchrun", f"--nproc_per_node={device_count}", self.data_loop_file_path]
cmd = ["torchrun", "--nproc_per_node=2", self.data_loop_file_path]
with patch_environment(omp_num_threads=1, cuda_visible_devices="0,1"):
execute_subprocess_async(cmd, env=os.environ.copy())

Expand Down
Loading