Write once, run anywhere; ezpz 🍋
See the codeWrite once, run anywhere.
ezpz makes distributed PyTorch launches portable across any supported
hardware {NVIDIA, AMD, Intel, MPS, CPU} with zero code changes.
History class for recording, plotting, and
saving training metricsezpz launch, ezpz test, ezpz doctor for launching
jobs, smoke-testing, and diagnosticsuv pip install git+https://github.com/saforem2/ezpz
import torch
import ezpz
rank = ezpz.setup_torch() # auto-detects device + backend
device = ezpz.get_torch_device()
model = torch.nn.Linear(128, 10).to(device)
model = ezpz.wrap_model(model) # FSDP (default)
# Multi-dim parallelism (TP/PP/CP) on XPU? Use ezpz.init_device_mesh_safe
# instead of torch's init_device_mesh — works around xccl's missing
# split_group on Aurora/Sunspot. See https://ezpz.cool/troubleshooting/.
# Same command everywhere -- Mac laptop, NVIDIA cluster, Intel Aurora:
ezpz launch python3 train.py
For a side-by-side diff against the equivalent raw-torch boilerplate, see the API Cheat Sheet.
ezpz launch python3 train.py # launch distributed training
ezpz submit -N 2 -q debug -- python3 train.py # submit batch job to PBS/SLURM
ezpz test # smoke-test your setup
ezpz benchmark # run + compare example benchmarks
ezpz doctor # diagnose environment issues
Compared to the alternatives:
torchrun / mpirun / srun: one launcher that detects your
scheduler, builds the right command, and works on a laptop too.accelerate: lower surface area, no config files, designed for
HPC schedulers from the ground up rather than retrofitted.DeepSpeed: not an alternative — ezpz wraps your distributed
init so you can still use DeepSpeed (or anything else) underneath.See the full comparison for details.
Full documentation is available at ezpz.cool.
Useful entry points:
Write once, run anywhere; ezpz 🍋
See the codeWrite once, run anywhere.
ezpz makes distributed PyTorch launches portable across any supported
hardware {NVIDIA, AMD, Intel, MPS, CPU} with zero code changes.
History class for recording, plotting, and
saving training metricsezpz launch, ezpz test, ezpz doctor for launching
jobs, smoke-testing, and diagnosticsuv pip install git+https://github.com/saforem2/ezpz
import torch
import ezpz
rank = ezpz.setup_torch() # auto-detects device + backend
device = ezpz.get_torch_device()
model = torch.nn.Linear(128, 10).to(device)
model = ezpz.wrap_model(model) # FSDP (default)
# Multi-dim parallelism (TP/PP/CP) on XPU? Use ezpz.init_device_mesh_safe
# instead of torch's init_device_mesh — works around xccl's missing
# split_group on Aurora/Sunspot. See https://ezpz.cool/troubleshooting/.
# Same command everywhere -- Mac laptop, NVIDIA cluster, Intel Aurora:
ezpz launch python3 train.py
For a side-by-side diff against the equivalent raw-torch boilerplate, see the API Cheat Sheet.
ezpz launch python3 train.py # launch distributed training
ezpz submit -N 2 -q debug -- python3 train.py # submit batch job to PBS/SLURM
ezpz test # smoke-test your setup
ezpz benchmark # run + compare example benchmarks
ezpz doctor # diagnose environment issues
Compared to the alternatives:
torchrun / mpirun / srun: one launcher that detects your
scheduler, builds the right command, and works on a laptop too.accelerate: lower surface area, no config files, designed for
HPC schedulers from the ground up rather than retrofitted.DeepSpeed: not an alternative — ezpz wraps your distributed
init so you can still use DeepSpeed (or anything else) underneath.See the full comparison for details.
Full documentation is available at ezpz.cool.
Useful entry points: