Open achirkin opened 2 years ago
This is great! A few of us were just talking about the need for something like this yesterday.
Though do you see any reason to do this only for mdarray and not for mdspan?
Tagging @hcho3 @wphicks @dantegd @divyegala
The particular use case we have would take an mdspan as an input and create a new mdarray with the new layout.
When optimizing cuda kernels, modifying the layout of the data seems to be a common approach - to facilitate coalesced data access. That often boils down to transposing a multidimensional data along a pair of indices. It would be handy to have something like this as a helper for the
mdarray
type to reduce the boilerplate code.Inspired by https://github.com/rapidsai/raft/pull/926#discussion_r1019992068