Skip to content

Fix gather for 0d tensor#152

Merged
sgugger merged 1 commit intomainfrom
gather_0d_tensor
Aug 31, 2021
Merged

Fix gather for 0d tensor#152
sgugger merged 1 commit intomainfrom
gather_0d_tensor

Conversation

@sgugger
Copy link
Copy Markdown
Collaborator

@sgugger sgugger commented Aug 30, 2021

Right now, using accelerator.gather on 0d tensors will fail since the tensors can't be concatenated from each process. This PR fixes that by adding a new dimension in that case.

Copy link
Copy Markdown
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice trick

@sgugger sgugger merged commit 545cddb into main Aug 31, 2021
@sgugger sgugger deleted the gather_0d_tensor branch August 31, 2021 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants