Basically it is just one line to use DataParallel:
net = torch.nn.DataParallel(model, device_ids=[0, 1, 2])
output = net(input_var)

Just wrap your model with DataParallel and call the returned net on your data.
The device_ids parameter specifies the used GPUs.