A function that returns the number of Horovod processes. Returns: An integer scalar containing the number of Horovod processes.
(self)
| 184 | raise ValueError('Horovod has not been initialized; use hvd.init().') |
| 185 | |
| 186 | def size(self): |
| 187 | """A function that returns the number of Horovod processes. |
| 188 | |
| 189 | Returns: |
| 190 | An integer scalar containing the number of Horovod processes. |
| 191 | """ |
| 192 | size = self.MPI_LIB_CTYPES.horovod_size() |
| 193 | if size == -1: |
| 194 | raise ValueError( |
| 195 | 'Horovod has not been initialized; use hvd.init().') |
| 196 | return size |
| 197 | |
| 198 | def local_size(self): |
| 199 | """A function that returns the number of Horovod processes within the |
no outgoing calls