Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-GPU doesn't work with SLURM #220

Open
ksikka opened this issue Nov 12, 2024 · 0 comments
Open

Multi-GPU doesn't work with SLURM #220

ksikka opened this issue Nov 12, 2024 · 0 comments
Assignees

Comments

@ksikka
Copy link
Collaborator

ksikka commented Nov 12, 2024

From #138, multi-GPU doesn't work out of the box with SLURM

1. Add docs that you need to do the following

  1. set --ntasks-per-node = 4 in your submit script, replacing 4 with the number of GPUs you want to use.
#SBATCH --gres=gpu:4
#SBATCH --ntasks-per-node=4
  1. use srun python ... instead of just python.

2. Fix code: LOCAL_RANK not set in SLURM

In addition to LOCAL_RANK, check SLURM_LOCALID in losses.py and dali.py. See Lightning-AI/pytorch-lightning#6797.

@ksikka ksikka self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant