Active Message APIs: support scatter-gather I/O and user-defined header data (Part 2: Python APIs)#595
Open
grlee77 wants to merge 32 commits intorapidsai:mainfrom
Open
Active Message APIs: support scatter-gather I/O and user-defined header data (Part 2: Python APIs)#595grlee77 wants to merge 32 commits intorapidsai:mainfrom
grlee77 wants to merge 32 commits intorapidsai:mainfrom
Conversation
add test for strict memory policy unsupported-path
…structors are created
The std::visit lambda was taking data::AmSend amSend by value, creating a temporary copy. For IOV sends, sendBuffer pointed to amSend._iov.data() — the copy's vector storage. When the lambda returned, the copy was destroyed, but ucp_am_send_nbx is async and still needed the IOV descriptors, causing a use-after-free. Changed to const data::AmSend& amSend so it references the original data in _requestData, which lives as long as the RequestAm object. Add UCP_OP_ATTR_FIELD_DATATYPE so UCX doesn't ignore the .datatype field
this is needed to include host-side information on tensor shape, strides, dtype etc when using I/O Vector (iov) APIs
7e0d5bc to
9cc3dc7
Compare
Co-authored-by: Peter Andreas Entschev <peter@entschev.com>
wrap the amSend overload taking amSendParams
add basic sync and async test cases for send/recv of AM I/O Vector messages
9cc3dc7 to
c517f79
Compare
Member
|
/ok to test 92e8aac |
Member
|
/ok to test efa8f07 |
Member
|
/ok to test 12ae26d |
Member
|
/ok to test 26f0f71 |
Member
|
/ok to test 02a29ce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please review #594 first as those C++ changes are also included here.
See the description in that MR for the motivation for these features. This PR adds Python APIs corresponding to the C++ enhancements made there.
As for the C++ APIs, the changes here have backwards compatible defaults (
memory_type_policy=None, user_header=None).In order to preserve the existing function signature of
Endpoint.am_recva newEndpoint.am_recv_with_headerwas added if the user needs the customuser_headersupport. Another API option would be adding a new boolean flag likereturn_header=Falseto the existing method signature, but then the return type is not always the same. I thought it may be cleaner to just provide a separate method.The majority of the lines added here are in test cases.