(tensor)
| 342 | |
| 343 | |
| 344 | def reduce_tensor(tensor): |
| 345 | rt = tensor.clone() |
| 346 | dist.all_reduce(rt, op=dist.ReduceOp.SUM) |
| 347 | rt /= dist.get_world_size() |
| 348 | return rt |
| 349 | |
| 350 | |
| 351 | # https://github.com/facebookresearch/ConvNeXt/blob/main/utils.py |
no outgoing calls
no test coverage detected