MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / _async_copy

Function _async_copy

lib/nn/parallel/data_parallel.py:69–79  ·  view source on GitHub ↗
(inputs, device_ids)

Source from the content-addressed store, hash-verified

67
68
69def _async_copy(inputs, device_ids):
70 nr_devs = len(device_ids)
71 assert type(inputs) in (tuple, list)
72 assert len(inputs) == nr_devs
73
74 outputs = []
75 for i, dev in zip(inputs, device_ids):
76 with cuda.device(dev):
77 outputs.append(async_copy_to(i, dev))
78
79 return tuple(outputs)
80
81
82def _async_copy_stream(inputs, device_ids):

Callers

nothing calls this directly

Calls 1

async_copy_toFunction · 0.85

Tested by

no test coverage detected