Skip to content

Commit 13fd655

Browse files
authored
[Bug Fix] fix allreduce tensor dtype (PaddlePaddle#7876)
* [Bug Fix] fix allreduce tensor dtype Reason: some CCL not support bool dtype * update int8 to int32
1 parent ca79444 commit 13fd655

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddlenlp/trainer/trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def train(
626626
# The resume_from_checkpoint could be None in some machine node.
627627
# Here we reset None to temp directory.
628628
if args.world_size > 1:
629-
is_resume_from_checkpoint = paddle.to_tensor([resume_from_checkpoint is not None])
629+
is_resume_from_checkpoint = paddle.to_tensor([resume_from_checkpoint is not None], dtype="int32")
630630
paddle.distributed.all_reduce(is_resume_from_checkpoint)
631631
is_resume_from_checkpoint = is_resume_from_checkpoint.item()
632632
if is_resume_from_checkpoint > 0 and is_resume_from_checkpoint < paddle.distributed.get_world_size():

0 commit comments

Comments
 (0)