fairseq
fairseq copied to clipboard
Move tensors created in sample_negatives to the DEVICE to prevent it …
…from becoming a performance bottleneck during distributed training.
Before submitting
- [x] Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
- [x] Did you read the contributor guideline?
- [x] Did you make sure to update the docs?
- [x] Did you write any new necessary tests?
What does this PR do?
Fixes #4856