Please could you avoid tagging multiple people like that. We are reading the forum, this just creates a lot a noise.
You have to write a backward() function when you are not working with Variables.
With Variables, you only need to write the forward because some people implemented the backward in pytorch.
If you introduce new operations that are not supported by Variables, you will have to write the backward.