Average computed params over all devices
(devices, model, use_nccl=False)
| 1530 | |
| 1531 | |
| 1532 | def _BroadcastComputedParamsSingleHost(devices, model, use_nccl=False): |
| 1533 | ''' |
| 1534 | Average computed params over all devices |
| 1535 | ''' |
| 1536 | if len(devices) == 1: |
| 1537 | return |
| 1538 | |
| 1539 | for param_name in model._computed_param_names: |
| 1540 | # Copy from master to others -- averaging would be perhaps better, |
| 1541 | # but currently NCCLAllReduce is too prone to deadlock |
| 1542 | _Broadcast(devices, model, model.net, param_name, use_nccl) |
| 1543 | |
| 1544 | |
| 1545 | def _GetReverseOrderedGrads(model): |
no test coverage detected
searching dependent graphs…