Skip to content

Conversation

@dggaytan
Copy link
Contributor

Adding accelerator to ddp tutorials examples

  • Support for multiple accelerators:
  • Updated ddp_setup functions in multigpu.py, multigpu_torchrun.py, and multinode.py to use torch.accelerator for device management. The initialization of process groups now dynamically selects the backend based on the device type, with a fallback to CPU if no accelerator is available.

Improvements to example execution:

  • Added run_example.sh to simplify running tutorial examples with configurable GPU counts and node settings.
  • Updated run_distributed_examples.sh to include a new function for running all DDP tutorial series examples.

Dependency updates:

  • Increased the minimum PyTorch version requirement in requirements.txt to 2.7 to ensure compatibility with the new torch.accelerator API.

CC: @msaroufim @malfet @dvrogozh

Signed-off-by: dggaytan <diana.gaytan.munoz@intel.com>
@netlify
Copy link

netlify bot commented Sep 10, 2025

Deploy Preview for pytorch-examples-preview ready!

Name Link
🔨 Latest commit cf74c6f
🔍 Latest deploy log https://app.netlify.com/projects/pytorch-examples-preview/deploys/68c1dfab176c190008556e29
😎 Deploy Preview https://deploy-preview-1393--pytorch-examples-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dggaytan
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant