Add managed_gradient_accumulation for ZeRO stage 0/1 (#8184)