Skip to content

Add aten::all_reduce with meta impl#93109

Closed
wconstab wants to merge 8 commits intogh/wconstab/77/basefrom
gh/wconstab/77/head
Closed

Add aten::all_reduce with meta impl#93109
wconstab wants to merge 8 commits intogh/wconstab/77/basefrom
gh/wconstab/77/head

Conversation

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 26, 2023


# Collectives
# TODO: add reduce_op and add some form of ranks instead of processgroup obj
- func: all_reduce(Tensor self, int group_id, str reduce_op) -> Tensor
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

quick question: would this group_id be just a single process group id across all ranks? for example we have two pgs, and we do all_reduce on two pgs together, would this group_id be different across two pgs? If this is the case, I feel this make it not SPMD and I'm wondering we should make this SPMD instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

don't look at this part too closely. we've moved on to a new API proposal with list[rank] but I didn't bother to update this stack until we converged on the design

result: auto_linear

- name: all_reduce(Tensor self, int group_id, str reduce_op) -> Tensor
self: at::ones_like(self)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That sounds wrong!
This should be a all_scatter() no?
If you don't want it to be differentiable right now, mark it as such with non_differentiable (see doc at the top of this file for details).

@wconstab wconstab closed this Feb 28, 2023
@facebook-github-bot facebook-github-bot deleted the gh/wconstab/77/head branch June 8, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: releng release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants