facebookresearch / fairseq

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.
MIT License
30.54k stars 6.41k forks source link

Wav2vec2 sample_negatives device mismatch #2582

Closed arminarj closed 4 years ago

arminarj commented 4 years ago

🐛 Bug

It seems there is a device mismatch at these lines, (one) and (two).

To Reproduce

During the training time, when calling the sample_negatives() function, there is a device mismatch that occurs when the torch.randint()(link) and the new tszs (link) using the same device. And it seems the problem can be solved using the device= tags.

Regards

lematt1991 commented 4 years ago

Can you provide a gist of the full backtrace you get. Please run with the CUDA_LAUNCH_BLOCKING=1 environment variable.