Pin memory for tch-rs
AzHicham opened this issue · comments
Hicham Azimani commented
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 ?
Tudyx commented
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.
Hicham Azimani commented
Yeah!
Btw for tch-rs there is already a method than can be used after collating tensors
Tudyx commented
Interesting, do you have any link to this method? I couldn't find it in there repo
Hicham Azimani commented
here it is -> https://docs.rs/tch/0.13.0/tch/struct.Tensor.html#method.pin_memory :)