barrier

paddle.distributed. barrier ( group=None ) [source]

Barrier among all participators in the group.

Parameters

group (Group) – The group instance return by new_group or None for global default group.

Returns

None.

Examples

>>> 
>>> import paddle
>>> from paddle.distributed import init_parallel_env

>>> paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id)
>>> init_parallel_env()
>>> paddle.distributed.barrier()