Skip to content

Commit

Permalink
fixed a typo in doc tensor.ipynb
Browse files Browse the repository at this point in the history
In Copy & device transfer

# Device -> another Device.
a_gpu_0 = o3c.Tensor([0, 1, 2], device=o3c.Device("CUDA:0"))
a_gpu_1 = a_gpu_0.cuda(0)
print(a_gpu_1)

here a_gpu_0.cuda(0) should be a_gpu_0.cuda(1) to match the variable
  • Loading branch information
vincentme authored Feb 9, 2025
1 parent c6d474b commit d36d12e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/jupyter/core/tensor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"[0 1 2]\n",
"Tensor[shape={3}, stride={1}, Int64, CPU:0, 0x55d05c254780]\n",
"[0 1 2]\n",
"Tensor[shape={3}, stride={1}, Int64, CUDA:0, 0x7f40ff000000]\n"
"Tensor[shape={3}, stride={1}, Int64, CUDA:1, 0x7f40ff000000]\n"
]
}
],
Expand All @@ -188,7 +188,7 @@
"\n",
"# Device -> another Device.\n",
"a_gpu_0 = o3c.Tensor([0, 1, 2], device=o3c.Device(\"CUDA:0\"))\n",
"a_gpu_1 = a_gpu_0.cuda(0)\n",
"a_gpu_1 = a_gpu_0.cuda(1)\n",
"print(a_gpu_1)"
]
},
Expand Down

0 comments on commit d36d12e

Please sign in to comment.