grad[0] and grad[1] are the gradient wrt the 0th and 1st output of the forward function. What I called go for my add and backward examples above.
You can’t find these functions because they are automatically generated.
The gradients for most ops are defined in the derivatives.yaml 35 file. And the corresponding cpp binding is generated automatically.