The backward() function should compute one step of the chain rule of your function y = f(x)
grad_output is the gradient flowing from the lower layers dl/dy. And you should return dl/dx.
The way to compute it is by doing: dl/dx = dl/dy * dy/dx.