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

Pin memory for tch-rs #13

Open
AzHicham opened this issue Jul 10, 2023 · 4 comments
Open

Pin memory for tch-rs #13

AzHicham opened this issue Jul 10, 2023 · 4 comments

Comments

@AzHicham
Copy link
Contributor

Hello,
I think it could be great to pass a variable (pin_memory) to the dataloader to allow pin memory for the TorchCollate case. Wdyt ?

@AzHicham AzHicham changed the title Pin memory for tech-rss Pin memory for tch-rs Jul 10, 2023
@Tudyx
Copy link
Owner

Tudyx commented Aug 13, 2023

Hi, totally agree, we should provide a similar functionality as the one described in PyTorch doc.
I think we could inspire from rustacuda, but ideally we can find a solution which is GPU agnostics, as pinning (page locked) doesn't require to be bound to cuda.

@AzHicham
Copy link
Contributor Author

AzHicham commented Sep 1, 2023

Yeah!
Btw for tch-rs there is already a method than can be used after collating tensors

@Tudyx
Copy link
Owner

Tudyx commented Sep 5, 2023

Interesting, do you have any link to this method? I couldn't find it in there repo

@AzHicham
Copy link
Contributor Author

AzHicham commented Sep 5, 2023

here it is -> https://docs.rs/tch/0.13.0/tch/struct.Tensor.html#method.pin_memory :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants