# A question concerning batchsize and multiple GPUs in Pytorch

**URL:** <https://discuss.pytorch.org/t/a-question-concerning-batchsize-and-multiple-gpus-in-pytorch/33767>\
**Category:** Uncategorized\
**Created:** [January 4, 2019, 10:08am UTC](https://discuss.pytorch.org/t/a-question-concerning-batchsize-and-multiple-gpus-in-pytorch/33767 "2019-01-04T10:08:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [January 4, 2019, 9:18pm UTC](https://discuss.pytorch.org/t/a-question-concerning-batchsize-and-multiple-gpus-in-pytorch/33767/2 "2019-01-04T21:18:50Z")

</div>

`nn.DataParallel` splits the data along the batch dimension so that each specified GPU will get a chunk of the batch. If you just call `.cuda()` (or the equivalent `.to()` call), you will push the tensor or parameters onto the specified single device.

---

_[View the full topic](https://discuss.pytorch.org/t/a-question-concerning-batchsize-and-multiple-gpus-in-pytorch/33767)._
