barrier

paddle.distributed.collective. barrier ( group=0 ) [source]

Barrier among all participators in the group.

Parameters

group (int) – The id of the process group to work on.

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()