pin_memory_fn¶
- torchdata.datapipes.utils.pin_memory_fn(data, device=None)¶
Utility function to move data to pinned memory. If special treatment is needed to move the input data to pinned memory, please attach a
pin_memory
method to the expected data class.