File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -277,8 +277,9 @@ memory. CPU tensors and storages expose a :meth:`~torch.Tensor.pin_memory`
277277method, that returns a copy of the object, with data put in a pinned region.
278278
279279Also, once you pin a tensor or storage, you can use asynchronous GPU copies.
280- Just pass an additional ``non_blocking=True `` argument to a :meth: `~torch.Tensor.cuda `
281- call. This can be used to overlap data transfers with computation.
280+ Just pass an additional ``non_blocking=True `` argument to a
281+ :meth: `~torch.Tensor.to ` or a :meth: `~torch.Tensor.cuda ` call. This can be used
282+ to overlap data transfers with computation.
282283
283284You can make the :class: `~torch.utils.data.DataLoader ` return batches placed in
284285pinned memory by passing ``pin_memory=True `` to its constructor.
You can’t perform that action at this time.
0 commit comments