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

Method _DisambiguateGradOpOutput

caffe2/python/core.py:783–790  ·  view source on GitHub ↗
(self, grad_op, idx, cnt)

Source from the content-addressed store, hash-verified

781 break
782
783 def _DisambiguateGradOpOutput(self, grad_op, idx, cnt):
784 new_grad_output = (
785 '_' + grad_op.output[idx] + '_autosplit_{}'.format(cnt))
786 if grad_op.type == "If":
787 disambiguate_grad_if_op_output(grad_op, idx, new_grad_output)
788 else:
789 grad_op.output[idx] = new_grad_output
790 return grad_op.output[idx], cnt + 1
791
792 def _CheckSumOpsConflict(self, out_base_name, g):
793 if str(out_base_name) == str(g):

Callers 2

_MakeDenseSumOpsMethod · 0.95
_MakeSparseSumOpsMethod · 0.95

Calls 2

formatMethod · 0.45

Tested by

no test coverage detected