Skip to content

Advanced indexing#220

Closed
ipdemes wants to merge 12 commits intonv-legate:branch-22.03from
ipdemes:advanced_indexing
Closed

Advanced indexing#220
ipdemes wants to merge 12 commits intonv-legate:branch-22.03from
ipdemes:advanced_indexing

Conversation

@ipdemes
Copy link
Contributor

@ipdemes ipdemes commented Mar 18, 2022

No description provided.

@ipdemes ipdemes force-pushed the advanced_indexing branch 3 times, most recently from ae89065 to 5c1dd42 Compare March 21, 2022 16:16
@ipdemes ipdemes force-pushed the advanced_indexing branch 3 times, most recently from bdc493e to 0da9dca Compare March 22, 2022 02:15
@ipdemes ipdemes force-pushed the advanced_indexing branch from 0da9dca to 7793cc9 Compare March 22, 2022 02:19
Comment on lines +56 to +58
#ifdef LEGION_BOUNDS_CHECKS
bool dense = false;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this as an #else above where dense is defined. Otherwise line 53 will not compile if LEGION_BOUNDS_CHECKS is defined.

const size_t volume = rect.volume();
if (dense) {
auto outptr = out.ptr(rect);
for (size_t idx = 0; idx < volume; ++idx) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would cache the input array pointers here; there may be some math needed to compute them, might as well not do it for every element.

@manopapad
Copy link
Contributor

Still working on enumerating all special cases, to make sure we're covering everything. So far I came up with this counterexample, where NumPy and cuNumeric are producing different results:

import numpy as np
import cunumeric as cn

x = np.ones((3,4,5,6))
print(x[:,[0,1],:,[0,1]].shape)

x = cn.ones((3,4,5,6))
print(x[:,[0,1],:,[0,1]].shape)

prints:

(2, 3, 5)
(3, 2, 6)

@ipdemes
Copy link
Contributor Author

ipdemes commented Mar 23, 2022

Thank you @manopapad ! I will try to fix it ASAP

@ipdemes ipdemes force-pushed the advanced_indexing branch from c60717d to 8535ba3 Compare March 24, 2022 19:45
@ipdemes
Copy link
Contributor Author

ipdemes commented Mar 25, 2022

Closing a PR due to the GitHub issues. Will reopen it shortly

@ipdemes ipdemes closed this Mar 25, 2022
ipdemes pushed a commit to ipdemes/cunumeric that referenced this pull request Jun 7, 2022
* Bump minpy to 3.8

* Update README

* Revert "Update README"

This reverts commit 5df94c2dcf6c2b60ee1132647502cbb7b456634f.

* placate conda

Co-authored-by: Manolis Papadakis <mpapadakis@nvidia.com>
manopapad pushed a commit that referenced this pull request Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants