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

Function AddUseOutputGradient

caffe2/python/core_gradients_test.py:54–62  ·  view source on GitHub ↗
(op, g_output)

Source from the content-addressed store, hash-verified

52# Second gradient: (in -> out) leading to (out, out_grad -> in_grad)
53@GradientRegistry.RegisterGradient('UseOutput')
54def AddUseOutputGradient(op, g_output):
55 return (
56 CopyDeviceOption(
57 CreateOperator(
58 'UseOutputGradient',
59 list(op.output) + NeedAll(op, g_output), GIS(op)),
60 op),
61 GIS(op)
62 )
63
64
65@GradientRegistry.RegisterGradient('UseInput')

Callers

nothing calls this directly

Calls 5

CreateOperatorFunction · 0.90
CopyDeviceOptionFunction · 0.85
listFunction · 0.85
NeedAllFunction · 0.85
GISFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…