mlx.core.distributed.init#
- init(strict: bool = False, backend: str = 'any') Group #
Initialize the communication backend and create the global communication group.
Example
import mlx.core as mx
group = mx.distributed.init(backend=”ring”)
- Parameters:
strict (bool, optional) – If set to False it returns a singleton group in case
mx.distributed.is_available()
returns False otherwise it throws a runtime error. Default:False
backend (str, optional) – Select a specific distributed backend to initialize. If set to
any
then try all available backends and return the first one that succeeds. Subsequent calls will return the first backend that was initialized. Default:any
- Returns:
The group representing all the launched processes.
- Return type: