MCPcopy Index your code
hub / github.com/pytorch/pytorch / CopyDeviceOption

Function CopyDeviceOption

caffe2/python/core_gradients_test.py:35–38  ·  view source on GitHub ↗
(op, src_op)

Source from the content-addressed store, hash-verified

33
34
35def CopyDeviceOption(op, src_op):
36 if src_op.HasField('device_option'):
37 op.device_option.CopyFrom(src_op.device_option)
38 return op
39
40
41# First gradient: (in -> out) leading to (out_grad -> in_grad)

Callers 3

AddDirectGradientFunction · 0.85
AddUseOutputGradientFunction · 0.85
AddUseInputGradientFunction · 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…