-
Notifications
You must be signed in to change notification settings - Fork 901
Pass NULL to the collective components for unused buffers. #11552
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
Pass NULL to the collective components for unused buffers. #11552
Conversation
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.
LGTM, just some minor comments. Passing cleaned parameters seems sensible. But what about allreduce and alltoall?
Neither Allreduce or Alltoall provide the opportunity for the user to provide a buffer that shall not be used. That would be possible for the other flavors of |
7ae2b93
to
88ff1d2
Compare
Right, I was thinking in terms of |
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.
LGTM
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.
It would be good to document this behavior in ompi/mca/coll/coll.h.
We want the underlying algorithms to know when they can use a buffer as a temporary, such as when one module delegate a collective to another. Instead of allocating temporaries everywhere, we allow the upper level module to handle the temporary buffers, and pass them into all the others. Thus, we need to make sure that the user provided buffers are screened such that they don't make it as temporaries. Signed-off-by: George Bosilca <[email protected]>
88ff1d2
to
1edc1b5
Compare
With open-mpi#11552, rbuf is *either* valid & appropriately sized, or NULL, and collectives implementations downstream from HAN (e.g. XHC) rely on this convention. Signed-off-by: George Katevenis <[email protected]>
Improve handling of the rbuf pointer. Previously, it was possible for the pointer to become non-NULL, even though it does not point to valid memory. This becomes a problem for the assurances that open-mpi#11552 tries to introduce. Signed-off-by: George Katevenis <[email protected]>
Hi, were there any concerns or issues left to resolve with this? Is it good to be merged? |
We want the underlying algorithms to know when they can use a buffer as a temporary, such as when one module delegate a collective to another. Instead of allocating temporaries everywhere, we allow the upper level module to handle the temporary buffers, and pass them into all the others. Thus, we need to make sure that the user provided buffers are screened such that they don't make it as temporaries.
This could help #11418 to streamline the call to the xhc reduction.