mlx.core.distributed.init

目录

mlx.core.distributed.init#

init(strict: bool = False, backend: str = 'any') Group#

Initialize the communication backend and create the global communication group.

示例

import mlx.core as mx

group = mx.distributed.init(backend="ring")
参数:
  • 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) -- Which distributed backend to initialize. Possible values mpi, ring, nccl, jaccl, any. If set to any all available backends are tried and the first one that succeeds becomes the global group which will be returned in subsequent calls. Default: any

返回:

The group representing all the launched processes.

返回类型:

Group