MCPcopy Create free account
hub / github.com/pytorch/pytorch / InferOpDeviceAsBlobDevices

Function InferOpDeviceAsBlobDevices

caffe2/python/core.py:194–198  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

192
193
194def InferOpDeviceAsBlobDevices(op):
195 op_dev = op.device_option if op.device_option else caffe2_pb2.DeviceOption()
196 input_dev = [op_dev] * len(op.input)
197 output_dev = [op_dev] * len(op.output)
198 return input_dev, output_dev
199
200
201GradientSlice = namedtuple('GradientSlice', ['indices', 'values'])

Callers 1

InjectCrossDeviceCopiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…