Incorrect type in output of utils.pad_across_processes
when input is torch.bool
#3218
Open
2 of 4 tasks
System Info
Information
Tasks
no_trainer
script in theexamples
folder of thetransformers
repo (such asrun_no_trainer_glue.py
)Reproduction
Running the following code using
accelerate launch example.py
On a machine with at least two GPUs will output (example for three GPUs):
The padded tensors have the incorrect data type of
torch.int64
and there is cross-device mismatch, which will further make downstream (e.g.,gather
) ops freeze and hard to debug.Expected behavior
The output tensor should have the same
dtype
on all devices, and it should be the same as the inputdtype
The text was updated successfully, but these errors were encountered: