When I train my PyTorch Lightning model on two GPUs on jupyter lab with strategy=“ddp_notebook”, only two CPUs are used and their usages are 100%. How can I overcome this CPU bottleneck?

Edit: I tested with PyTorchProfiler and it was because of old ssds used on the server

You are viewing a single thread.
View all comments
4 points

Without knowing more, I would expect it is a dataloader issue: your CPUs are bottlenecked trying to get enough data to your GPUs.

You can add more workers to your dataloader in order to paralyze it, though this can lead to weird parallelization bugs sometimes, so if things start acting weird, that might be a reason.

permalink
report
reply
3 points

Yup this, if you would like more help we need the code, or at least a minimal viable reproduction scenario.

permalink
report
parent
reply

Machine Learning

!machinelearning@lemmy.ml

Create post

Community stats

  • 12

    Monthly active users

  • 186

    Posts

  • 144

    Comments

Community moderators