Returns a list of tensors with the all-reduce min across `tensors`. The computation is done with an all-reduce operation, so if only some of the returned tensors are evaluated then the computation will hang. Args: tensors: The input tensors across which to reduce; must be assigned
(tensors)
| 94 | |
| 95 | |
| 96 | def all_min(tensors): |
| 97 | """Returns a list of tensors with the all-reduce min across `tensors`. |
| 98 | |
| 99 | The computation is done with an all-reduce operation, so if only some of the |
| 100 | returned tensors are evaluated then the computation will hang. |
| 101 | |
| 102 | Args: |
| 103 | tensors: The input tensors across which to reduce; must be assigned |
| 104 | to GPU devices. |
| 105 | |
| 106 | Returns: |
| 107 | List of tensors, each with the minimum of the input tensors, where tensor i |
| 108 | has the same device as `tensors[i]`. |
| 109 | """ |
| 110 | return _apply_all_reduce('min', tensors) |
| 111 | |
| 112 | |
| 113 | def all_max(tensors): |
nothing calls this directly
no test coverage detected