Skip to content

Commit eaca5b2

Browse files
authored
bug fixer (#8314)
1 parent bc91dc6 commit eaca5b2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

paddlenlp/trainer/trainer.py

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

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

0 commit comments

Comments
 (0)