Skip to content

Commit 39b79c0

Browse files
committed
bug fix
1 parent 87f57a0 commit 39b79c0

File tree

1 file changed

+2
-0
lines changed
  • python/paddle/distributed/auto_parallel

1 file changed

+2
-0
lines changed

python/paddle/distributed/auto_parallel/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ def lazy_init_hook(param, origin_hook):
195195

196196
# lazy init hook with randomness controlling
197197
def _init_func(var, block):
198+
if dist.get_rank() not in param.process_mesh.process_ids:
199+
return
198200
# get the unique rng name
199201
rng_name = determinate_rng(
200202
dist.get_rank(),

0 commit comments

Comments
 (0)