examples
examples copied to clipboard
Adding torch accelerator to ddp-tutorial-series example
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
Deploy Preview for pytorch-examples-preview ready!
| Name | Link |
|---|---|
| Latest commit | cf74c6f23ca1b205ec75415048eaafbcb8ca58c5 |
| 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...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
@gujinghui @EikanWang