What does pin_memory_device do in DataLoader

(The documentation looks way too high level and I didn’t find much useful by search engine.)

Is it that pin to a specific device (e.g. 'cuda:0') is faster (for later data transfers to device) than a general pin if I know which device it’s going to? Also Is this equivalent to Tensor.pin_memory(device) ? (It appears that Tensor.pin_memory accepts an optional device argument, although it’s not in the official documentation.)

1 Like

From this topic it’s a placeholder for other backends which might support pinned memory.

1 Like