KEMBAR78
Deprecate DataLoader pin_memory_device param by divyanshk · Pull Request #158323 · pytorch/pytorch · GitHub
Skip to content

Conversation

@divyanshk
Copy link
Contributor

Build on top of #146821

  • Moves enabling pin_memory back inside _BaseDataLoaderIter
    • This is required for StatefulDataloader which leveraged _BaseDataLoaderIter directly and not the Dataloader class init
  • Add a simple test for CPU only env where setting pin_memory=True is a no-op.

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 15, 2025

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 43dded4 with merge base 7ac70ac (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot pytorch-bot bot added the release notes: dataloader release notes category label Jul 15, 2025
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 15, 2025
@divyanshk
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased opt/dataloader/pin_memory_device onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout opt/dataloader/pin_memory_device && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the opt/dataloader/pin_memory_device branch from af71e0f to bb4f7dc Compare July 15, 2025 17:47
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@divyanshk divyanshk marked this pull request as ready for review July 16, 2025 00:07
@divyanshk divyanshk requested a review from ramanishsingh as a code owner July 16, 2025 00:07
@divyanshk
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased opt/dataloader/pin_memory_device onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout opt/dataloader/pin_memory_device && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the opt/dataloader/pin_memory_device branch from bb4f7dc to 787a207 Compare July 16, 2025 18:28
@divyanshk divyanshk force-pushed the opt/dataloader/pin_memory_device branch from 787a207 to 2abd259 Compare July 16, 2025 19:54
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@divyanshk
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased opt/dataloader/pin_memory_device onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout opt/dataloader/pin_memory_device && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the opt/dataloader/pin_memory_device branch from 2abd259 to 46edbcf Compare July 16, 2025 21:23
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@divyanshk
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased opt/dataloader/pin_memory_device onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout opt/dataloader/pin_memory_device && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the opt/dataloader/pin_memory_device branch from 46edbcf to 431daa1 Compare July 22, 2025 23:36
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@divyanshk divyanshk force-pushed the opt/dataloader/pin_memory_device branch from 431daa1 to f7a4af7 Compare July 30, 2025 18:21
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@divyanshk divyanshk force-pushed the opt/dataloader/pin_memory_device branch from f7a4af7 to ce83de7 Compare July 31, 2025 01:15
@divyanshk
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased opt/dataloader/pin_memory_device onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout opt/dataloader/pin_memory_device && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the opt/dataloader/pin_memory_device branch from ce83de7 to 43dded4 Compare July 31, 2025 01:17
@facebook-github-bot
Copy link
Contributor

@divyanshk has imported this pull request. If you are a Meta employee, you can view this in D78319576.

@divyanshk
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

yangw-dev pushed a commit that referenced this pull request Aug 1, 2025
Build on top of #146821

- Moves enabling pin_memory back inside `_BaseDataLoaderIter`
  - This is required for `StatefulDataloader` which leveraged  `_BaseDataLoaderIter` directly and not the `Dataloader` class init
- Add a simple test for CPU only env where setting `pin_memory=True` is a no-op.
Pull Request resolved: #158323
Approved by: https://github.com/ramanishsingh

Co-authored-by: zeshengzong <zesheng.zong@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: dataloader release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants