-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
ArrayDist storing distribution info for darrays. Deprecated d* functions... #5452
Conversation
cc: @JeffBezanson - please have a look. |
dims::NTuple{N,Int} | ||
pids::Vector{Int} | ||
|
||
SharedDist(dims, pids) = new(dims, pids) |
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.
Not necessary, since default constructors now look like this. The default outer constructor will also infer N
given dims
.
Good. Just a couple small comments. Will definitely merge this after doc updates and rebase. |
Updated docs and rebased. |
Bump @JeffBezanson |
end | ||
|
||
|
||
size(ad::ArrayDist) = ad.dims |
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.
This seems to be inconsistent with getindex
below; i.e. the size does not give the valid range of indexes for getindex
. That could be confusing.
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.
You are right. How about size(ChunkedDist)
returning the size of the indexes, while size(SharedDist)
returns the length of the pids
vector. Both describe the size of the distribution.
size(DArray)
and size(SharedArray)
will return the size of the complete array. There will not be a function to retrieve dims from an ArrayDist
- folks have to use ad.dims
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.
Just pushed an update.
@StefanKarpinski @ViralBShah |
Yeah, this has always bothered me. It's a clear sign of lack of composability every time you have parallel universes of functions that differ by prefix or suffix. How about something like this |
Come to think of it, the name |
@StefanKarpinski ,
So it can be something like For SharedArrays it can be |
6c7c7e3
to
1a4c02f
Compare
Closed due to #10334 |
This PR does the following:
ArrayDist
which is an abstract type. Subtypes areSharedDist
andChunkedDist
. Both store the array dimensions and list of processes participating in the distribution.ChunkedDist
also stores the chunked indexes for theDArray
Will update documentation if the above is OK.
Updates to SharedArray using a SharedDist will be made in a separate PR.