(module, input)
| 156 | if broadcast_buffers: |
| 157 | |
| 158 | def pre_forward_hook(module, input): |
| 159 | with flow.no_grad(): |
| 160 | buffers = list(module.buffers()) |
| 161 | flow._C.comm_broadcast(buffers, inplace=True) |
| 162 | |
| 163 | module.register_forward_pre_hook(pre_forward_hook) |
| 164 |