Skip to content

Commit 1c866fb

Browse files
committed
- Update torch version in requirements.txt
- Remove CPU execution option since DDP requires 2 GPUs for this example. Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
1 parent a84f91c commit 1c866fb

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

distributed/rpc/ddp_rpc/main.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,8 @@ def run_worker(rank, world_size):
150150
for fut in futs:
151151
fut.wait()
152152
elif rank <= 1:
153-
if torch.accelerator.is_available():
154-
acc = torch.accelerator.current_accelerator()
155-
device = torch.device(acc)
156-
else:
157-
device = torch.device("cpu")
153+
acc = torch.accelerator.current_accelerator()
154+
device = torch.device(acc)
158155
backend = torch.distributed.get_default_backend_for_device(device)
159156
torch.accelerator.device_index(rank)
160157
# Initialize process group for Distributed DataParallel on trainers.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
torch>=2.7.1
1+
torch>=2.7.0
22
numpy

0 commit comments

Comments
 (0)