Get the size of the process group mesh. Args: dim (Optional[int], optional): Dimension of the process group mesh. `None` means all dimensions. Defaults to None. Returns: Union[int, Tuple[int, ...]]: Size of the target dimension or the whole process group mes
(self, dim: Optional[int] = None)
| 81 | return self._rank |
| 82 | |
| 83 | def size(self, dim: Optional[int] = None) -> Union[int, Tuple[int, ...]]: |
| 84 | """Get the size of the process group mesh. |
| 85 | |
| 86 | Args: |
| 87 | dim (Optional[int], optional): Dimension of the process group mesh. `None` means all dimensions. Defaults to None. |
| 88 | |
| 89 | Returns: |
| 90 | Union[int, Tuple[int, ...]]: Size of the target dimension or the whole process group mesh. |
| 91 | """ |
| 92 | if dim is None: |
| 93 | return self._shape |
| 94 | else: |
| 95 | return self._shape[dim] |
| 96 | |
| 97 | def coordinate(self, dim: Optional[int] = None) -> Union[int, Tuple[int, ...]]: |
| 98 | """Get the coordinate of the process group mesh. |
no outgoing calls