All reduce norm statistics in different devices.
(module)
| 95 | |
| 96 | |
| 97 | def all_reduce_norm(module): |
| 98 | """ |
| 99 | All reduce norm statistics in different devices. |
| 100 | """ |
| 101 | states = get_async_norm_states(module) |
| 102 | states = all_reduce(states, op="mean") |
| 103 | module.load_state_dict(states, strict=False) |
no test coverage detected