That depends on what you do with the gradients after.
If you need a linear combination of them, you can apply it before and then backward once.
If you need something more complex, I’m afraid you have to call multiple backwards