-
Notifications
You must be signed in to change notification settings - Fork 1
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
Check for block shape/grid_shapes that would make empty localarrays. #444
base: master
Are you sure you want to change the base?
Conversation
Closes issue #442 |
@@ -139,6 +139,9 @@ def make_grid_shape(shape, dist, comm_size): | |||
# Trivial case: all processes used for the one distributed dimension. | |||
if comm_size >= shape[distdims[0]]: | |||
dist_grid_shape = (shape[distdims[0]],) | |||
elif (('b' == shape[distdims[0]]) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this issue show up for multi-dimensional block-distributed arrays for certain sizes? The test here needs to be more general to cover the multi-dimensional cases. If it can be refactored so it handles things on a per-dimension basis, that would be ideal.
For example, say we have a 16 engine cluster running. Currently, we get a lot of empty localarrays with a 6 x 9
block-distributed array:
In [5]: d = Distribution.from_shape(c, (6, 9), ('b', 'b'))
In [6]: d.localshapes()
Out[7]:
[(2, 3),
(2, 3),
(2, 3),
(2, 0),
(2, 3),
(2, 3),
(2, 3),
(2, 0),
(2, 3),
(2, 3),
(2, 3),
(2, 0),
(0, 3),
(0, 3),
(0, 3),
(0, 0)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this needs to be done on a per dimension basis.
@cowlicks what's the latest on this one? |
My solution here is pretty flawed. I need to incorporate a fix into the "main case" branch in |
Postponing to 0.7. |
No description provided.