fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

Move tensors created in sample_negatives to the DEVICE to prevent it …

Open chenjiasheng opened this issue 2 years ago • 0 comments

…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

chenjiasheng avatar Nov 11 '22 03:11 chenjiasheng