File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change 13
13
This tutorial examines two key methods for device-to-device data transfer in PyTorch:
14
14
:meth:`~torch.Tensor.pin_memory` and :meth:`~torch.Tensor.to` with the ``non_blocking=True`` option.
15
15
16
- Key Learnings
17
- ~~~~~~~~~~~~~
16
+ What you will learn
17
+ ~~~~~~~~~~~~~~~~~~~
18
+
18
19
Optimizing the transfer of tensors from the CPU to the GPU can be achieved through asynchronous transfers and memory
19
20
pinning. However, there are important considerations:
20
21
52
53
#
53
54
# We start by outlining the theory surrounding these concepts, and then move to concrete test examples of the features.
54
55
#
55
- # - :ref:`Background <pinned_memory_background>`
56
- #
57
- # - :ref:`Memory management basics <pinned_memory_memory>`
58
- # - :ref:`CUDA and (non-)pageable memory <pinned_memory_cuda_pageable_memory>`
59
- # - :ref:`Asynchronous vs. Synchronous Operations with non_blocking=True <pinned_memory_async_sync>`
60
- #
61
- # - :ref:`A PyTorch perspective <pinned_memory_pt_perspective>`
62
- #
63
- # - :ref:`pin_memory <pinned_memory_pinned>`
64
- # - :ref:`non_blocking=True <pinned_memory_non_blocking>`
65
- # - :ref:`Synergies <pinned_memory_synergies>`
66
- # - :ref:`Other copy directions (GPU -> CPU) <pinned_memory_other_direction>`
67
- #
68
- # - :ref:`Practical recommendations <pinned_memory_recommendations>`
69
- # - :ref:`Additional considerations <pinned_memory_considerations>`
70
- # - :ref:`Conclusion <pinned_memory_conclusion>`
71
- # - :ref:`Additional resources <pinned_memory_resources>`
72
- #
73
56
#
74
57
# Background
75
58
# ----------
You can’t perform that action at this time.
0 commit comments