How to use autograd with normalized gradient?

Do I have to write the backward pass myself? Or is there a workaround that allows me to use autograd but with the gradient normalized?

Have a look at backward hooks. It should work without an own implementation of the backward function.