Skip to content

Commit 871070d

Browse files
authored
bug fixer (#8314) (#8318)
1 parent 590cee9 commit 871070d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

paddlenlp/trainer/trainer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ def _inner_training_loop(
10111011
self.timers and self.timers("optimizer-step").start()
10121012

10131013
if self.args.gradient_accumulation_steps > 1 and self._enable_delay_scale_loss():
1014+
paddle.device.synchronize()
10141015
for p in model._layers.parameters():
10151016
with paddle.no_grad():
10161017
if hasattr(p, "main_grad") and p.main_grad is not None:

0 commit comments

Comments
 (0)