Skip to content

Commit 5d3d8cf

Browse files
ami-GSholly1238
andauthored
There are only four .to(device) calls in code. (pytorch#892)
Co-authored-by: holly1238 <[email protected]>
1 parent 580903e commit 5d3d8cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intermediate_source/model_parallel_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def forward(self, x):
6262

6363
######################################################################
6464
# Note that, the above ``ToyModel`` looks very similar to how one would
65-
# implement it on a single GPU, except the five ``to(device)`` calls which
65+
# implement it on a single GPU, except the four ``to(device)`` calls which
6666
# place linear layers and tensors on proper devices. That is the only place in
6767
# the model that requires changes. The ``backward()`` and ``torch.optim`` will
6868
# automatically take care of gradients as if the model is on one GPU. You only

0 commit comments

Comments
 (0)