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

[FEA] A helper for transposing an mdarray #1010

Open
achirkin opened this issue Nov 11, 2022 · 2 comments
Open

[FEA] A helper for transposing an mdarray #1010

achirkin opened this issue Nov 11, 2022 · 2 comments
Labels
feature request New feature or request

Comments

@achirkin
Copy link
Contributor

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 #926 (comment)

@achirkin achirkin added the feature request New feature or request label Nov 11, 2022
@cjnolet
Copy link
Member

cjnolet commented Nov 11, 2022

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

@tfeher
Copy link
Contributor

tfeher commented Nov 11, 2022

The particular use case we have would take an mdspan as an input and create a new mdarray with the new layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants