MCPcopy Create free account
hub / github.com/pytorch/tutorials / pin_copy_to_device

Function pin_copy_to_device

intermediate_source/pinmem_nonblock.py:441–445  ·  view source on GitHub ↗
(*tensors)

Source from the content-addressed store, hash-verified

439
440
441def pin_copy_to_device(*tensors):
442 result = []
443 for tensor in tensors:
444 result.append(tensor.pin_memory().to("cuda:0"))
445 return result
446
447
448def pin_copy_to_device_nonblocking(*tensors):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected