mlx.core.distributed.init#
- init(strict: bool = False, backend: str = 'any') 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:Falsebackend (str, optional) -- Which distributed backend to initialize. Possible values
mpi,ring,nccl,jaccl,any. If set toanyall 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.
- 回傳型別: