Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scatter axis + gather axis primitives #1813

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

awni
Copy link
Member

@awni awni commented Jan 31, 2025

Add a GatherAxis and ScatterAxis primitive to support take_along_axis and put_along_axis.

The ScatterAxis supports two reduce modes (none and sum). The sum is useful for the gradient of GatherAxis. Did not add more reduce modes to manage complexity. One can always use Scatter for the other modes or we can consider adding them in the future.

Incidentally closes #1807

TODO:

[ ] transforms
[ ] benchmarks

@awni awni force-pushed the gather_scatter_axis branch from c273d38 to 6fb1fff Compare January 31, 2025 00:52
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.

[BUG] Put along axis crashes on shapes that it should work for
1 participant