Created
May 19, 2025 18:07
-
-
Save kabouzeid/f3251e4bfbbd9e6099d85781691d8ce9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
torchrun \ | |
--nproc-per-node=$SLURM_GPUS_ON_NODE\ | |
--nnodes=$SLURM_JOB_NUM_NODES \ | |
--node_rank=$SLURM_NODEID \ | |
--master_addr=$(scontrol show hostnames $SLURM_JOB_NODELIST | head -n1) \ | |
--master_port=$(expr 10000 + $(echo -n $SLURM_JOBID | tail -c 4)) \ | |
"$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment