Hi community.
I have some doubts on the steps required to make sure I am doing the training using the GPUs avalible.
After some checks on the available resources:
cuda = torch.cuda.is_available()
n_workers = multiprocessing.cpu_count()
device = 'cuda' if torch.cuda.is_available() else 'cpu'

print('Cuda: ', str(cuda))
print('Device: ', str(device))
print('Cores: ', str(n_workers))
print('GPUs available', str(torch.cuda.device_count()))

Output:
Cuda:  True
Device:  cuda
Cores:  24
GPUs available 8

Now, I can move both the data and the model to the avaible GPUs:
Before training, allocate the model:
model.train()
model.to(device)

During training, allocate the tensors:
images = images.to(device)
labels = labels.to(device)

My question now is, when do I need nn.Parallell and what funtionalities it is adding beyond the ones that I have already applied with device?
Thanks in advance,
Pablo