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

Remove take_along_axis and take #1366

Closed
josevalim opened this issue Nov 12, 2023 · 5 comments · Fixed by #1439
Closed

Remove take_along_axis and take #1366

josevalim opened this issue Nov 12, 2023 · 5 comments · Fixed by #1439
Labels
area:exla Applies to EXLA area:nx Applies to nx area:torchx Applies to Torchx kind:chore Internal improvements

Comments

@josevalim
Copy link
Collaborator

take can directly call gather, no need for optional callbacks. take_along_axis should have an optional callback.

@josevalim josevalim added kind:chore Internal improvements area:exla Applies to EXLA area:nx Applies to nx area:torchx Applies to Torchx labels Nov 12, 2023
@Benjamin-Philip
Copy link
Contributor

Could I have a stab at this?

@polvalente
Copy link
Contributor

Yeah! To be clear, take can be replaced by gather (look at how EXLA does it) at the Nx level. take_along_axis also can be, but as an optional callback (again look at EXLA). Torchx has a simpler operation for take_along_axis

@Benjamin-Philip
Copy link
Contributor

Yeah! To be clear, take can be replaced by gather (look at how EXLA does it) at the Nx level. take_along_axis also can be, but as an optional callback (again look at EXLA). Torchx has a simpler operation for take_along_axis

Thanks! I understood that from José's original wording as well.

@Benjamin-Philip
Copy link
Contributor

Quick question: for which backend(s) do you want to implement the take_along_axis optional axis callback?

@polvalente
Copy link
Contributor

Torchx should have the specific implementation. EXLA and BinaryBackend can use the default that delegates to gather

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:exla Applies to EXLA area:nx Applies to nx area:torchx Applies to Torchx kind:chore Internal improvements
Projects
None yet
3 participants