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

[Feature] empty_like & co. to support the shape and order arguments #840

Open
madsbk opened this issue Mar 10, 2023 · 1 comment
Open

[Feature] empty_like & co. to support the shape and order arguments #840

madsbk opened this issue Mar 10, 2023 · 1 comment
Labels
category:new-feature PR introduces a new feature and will be classified as such in release notes

Comments

@madsbk
Copy link
Contributor

madsbk commented Mar 10, 2023

... to match numpy.empty_like(), numpy.ones_like(), etc.

shape should be straightforward to support.
order might be more difficult but at least NotImplementedError could be raised, if the order is being changed.

@manopapad manopapad added the category:new-feature PR introduces a new feature and will be classified as such in release notes label Mar 10, 2023
@manopapad
Copy link
Contributor

I agree, shape should be straightforward to implement.

order currently does not affect the layout of actual instances in cuNumeric. Instead we lay them out at our discretion, according to the requirements of the library that we use (e.g. cuSolver requires column-major, so that's what we do). We can do that because these instances are not immediately accessible to the user code (they can only interact with them through the legate library). So we've pretty much been ignoring the order parameter.

What we should be doing is recording this information, so that if the user code ever asks for the whole array to be collected in one place (which happens implicitly if they try to print it, or iterate over its elements), then at that point we respect the user's wishes. This would also require that when "inline mapping" a region (that's the Legion mechanism we use to make that "local full-data collection" happen) we propagate this order requirement to the inline mapping operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-feature PR introduces a new feature and will be classified as such in release notes
Projects
None yet
Development

No branches or pull requests

2 participants