I’m not sure, if this question is related to amp or the general usage of scaling the loss by the gradient accumulation steps.
If I’m not mistaken, you would divide the loss by the step size to accumulate the gradients in such a way, which would keep the gradient magnitude as it would be using the “bigger batch size”.
If that doesn’t fir your use case, you could remove it.