latest (dev)
Copy
Latest development documentation · Updated 2026-10-08
PostLocalSGDState
- class tensorplay.distributed.algorithms.ddp_comm_hooks.post_localSGD_hook.PostLocalSGDState(process_group, subgroup, start_localSGD_iter, post_local_gradient_allreduce=True)[source]
Store state for all-reducing gradients globally until given step, then locally after.
Stores the state for all-reducing gradients globally using
process_groupuntil stepstart_localSGD_iter, and all-reducing gradients locally usingsubgroupafterwards.If
process_groupisNone, the global process group will be used. IfsubgroupisNone, the intra-node process group on each machine will be used.Additionally,
post_local_gradient_allreducemay be worth tuning, because both true and false may give a faster convergence.- maybe_increase_iter(bucket)[source]
Track iterations and trigger log message at start of local SGD.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

