nx icon indicating copy to clipboard operation
nx copied to clipboard

Remove take_along_axis and take

Open josevalim opened this issue 2 years ago • 5 comments

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

josevalim avatar Nov 12 '23 19:11 josevalim

Could I have a stab at this?

Benjamin-Philip avatar Nov 15 '23 14:11 Benjamin-Philip

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

polvalente avatar Nov 15 '23 15:11 polvalente

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 avatar Nov 15 '23 15:11 Benjamin-Philip

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

Benjamin-Philip avatar Nov 20 '23 15:11 Benjamin-Philip

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

polvalente avatar Nov 20 '23 15:11 polvalente