-
Notifications
You must be signed in to change notification settings - Fork 70
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
More accurate array overlap test #39
Comments
@manopapad I 'm not sure if the following code snippet is relevant to this issue or the original issue (#16): import legate.numpy as np
a = np.arange(49).reshape((7, 7))
a[2:-2, 0] = a[2:-2, 2] I got an error from this test code:
Only errors from Legion. No errors & traceback from Python. Ran with However, if |
Thank you for finding this. It turns out the simple overlap check above actually captures the behavior of the partitioning code in most cases (the partitioning code also takes the convex hull of the boundary points on the base region), so I reinstated it. Now instead of the Legion error you should get a Closing this issue, since the overlap check is already good enough. #40 tracks work on actually supporting overlapping array copies. @piyueh: So we know what to prioritize, is this feature useful for your actual application? |
@manopapad Currently, I haven't encountered this issue in my application. |
Suppress some -Wswitch warnings
The current
RegionField
overlap test (meant to check whether an intra-array copy is safe to be implemented with a single Legion copy/task) is too conservative to be useful.https://github.com/nv-legate/legate.numpy/blob/5ec509907b9e49d98edcbc2fdc9ff2b55d2f5f33/legate/numpy/runtime.py#L496-L517
It ignores slice steps, and is very inaccurate when going from a 2d view to a 1d base array, e.g. for:
it will decide that
b[3:5:, 0:2]
andb[3:5, 2:4]
overlap, because it translates the rectangles to the base 1d space, and considers the bounding boxes on that space (a[15:22]
anda[17:24]
in this example).The text was updated successfully, but these errors were encountered: