-
Notifications
You must be signed in to change notification settings - Fork 54
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
Support pin_memory()
in Multi{Embedding,Nested}Tensor
and TensorFrame
#437
base: master
Are you sure you want to change the base?
Conversation
1d897d0
to
8b209bb
Compare
8b209bb
to
e3c36ca
Compare
Multi{Embedding,Nested}Tensor.pin_memory()
and TensorFrame.pin_memory()
pin_memory()
in Multi{Embedding,Nested}Tensor
and TensorFrame
e3c36ca
to
e1b98de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is pin_memory
? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's useful for moving data to GPU faster: https://pytorch.org/docs/stable/data.html#memory-pinning :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
IMO usually we set pin_memory for the dataloader right?
Co-authored-by: Zecheng Zhang <zecheng@kumo.ai>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO usually we set pin_memory for the dataloader right?
Yes! The dataloader will now call this method on our multi tensors and tensor frame.
No description provided.