Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pageable/pinned tensor to cuda reliability note in pinmem tutorial #3261

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Jan 24, 2025

Adds some more info on when it is unsafe to use non_blocking (namely with pinned tensors)

cc @nairbv

Copy link

pytorch-bot bot commented Jan 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3261

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 4812b2a with merge base c2faee4 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@vmoens vmoens force-pushed the add-pin-mem-caveat branch from efb8e51 to a707b7f Compare January 24, 2025 20:51
@svekars svekars added the rl Issues related to reinforcement learning tutorial, DQN, and so on label Jan 27, 2025
# However, in other cases we cannot make the same asusmption: when a tensor is placed in pinned memory, mutating the
# original copy after calling the host-to-device transfer may corrupt the data received on GPU.
# Similarly, when a transfer is achieved in the opposite direction, from GPU to CPU, or from any device that is not CPU
# or GPU to any device that is not a CUDA-handled GPU (e.g., MPS), there is no guarantee that the data read on GPU is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# or GPU to any device that is not a CUDA-handled GPU (e.g., MPS), there is no guarantee that the data read on GPU is
# or GPU to any device that is not a CUDA-handled GPU (such as, MPS), there is no guarantee that the data read on GPU is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed rl Issues related to reinforcement learning tutorial, DQN, and so on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants