pin_memory should be true only if gpus are specified #245
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Milestone
Hey folks,
First of all, thank you for this amazing package. It has saved many hours of coding :)
I was using for the first time the pl data modules when I hit the following line
cifar10_datamodule.py#L132. The problem is: when I am training/evaluating/testing on CPU, the data module try to pin the data and try to reserve a batch size memory amount in gpu. Nothing goes wrong if I have GPU with enough memory ran, but, when I try to run in CPU mode with all my GPUs in use I get the following error:
The fix is simple and we can borrow the code from the pl core implementation as in pytorch_lightning/accelerators/accelerator_connector.py#L90
Bests.
The text was updated successfully, but these errors were encountered: