Changed clip_grad_norm_ total_norm calculation (#32020)
Summary:
Redefines the computation of the total_norm to increase performance as shown in https://github.com/pytorch/pytorch/issues/31474.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32020
Differential Revision: D19353309
Pulled By: ngimel
fbshipit-source-id: bf7530dcd39f56614a211b5f21445864d4f2e875