We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a909131 commit a38749dCopy full SHA for a38749d
docs/source/notes/cuda.rst
@@ -29,12 +29,15 @@ Below you can find a small example showcasing this::
29
b = torch.FloatTensor(1).cuda()
30
# a.get_device() == b.get_device() == 1
31
32
+ c = a + b
33
+ # c.get_device() == 1
34
+
35
z = x + y
- # z.get_device() == 1
36
+ # z.get_device() == 0
37
38
# even within a context, you can give a GPU id to the .cuda call
- c = torch.randn(2).cuda(2)
- # c.get_device() == 2
39
+ d = torch.randn(2).cuda(2)
40
+ # d.get_device() == 2
41
42
Best practices
43
--------------
0 commit comments