-
Notifications
You must be signed in to change notification settings - Fork 110
Add support for ucc_mem_map and ucc_mem_unmap #1070
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
base: master
Are you sure you want to change the base?
Add support for ucc_mem_map and ucc_mem_unmap #1070
Conversation
Can one of the admins verify this patch? |
61ab0da
to
4a2f9c6
Compare
@janjust @nsarka Can you test on your setup? Ask @wfaderhold21 for details. |
f02340e
to
41f0b4e
Compare
1a327f1
to
ebc57c5
Compare
Example user usage of API changes: https://github.com/wfaderhold21/simple-ucc-ex |
src/core/ucc_context.c
Outdated
if (flags == UCC_MEM_MAP_IMPORT || flags == UCC_MEM_MAP_IMPORT_OFFLOAD) { | ||
return ucc_mem_map_import(context, flags, params, memh_size, memh); | ||
} else { | ||
if (params->n_segments > 1) { |
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.
do we really need to support multiple mapping at a time in future? what is a use case?
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.
A use case would include onesided alltoall where both the destination and global work buffer are associated with the destination memory handles. This would allow use of the current algorithm implementation in UCC already. However, implementing this may not be clean...
23d5050
to
9691c1f
Compare
@Sergei-Lebedev Thank you for the feedback. I believe I have addressed all your concerns. Please let me know if I haven't. |
@janjust do we need more code review concerning this PR or can we apply the completed label? |
thanks, I reviewed only part of this PR since it's big. I will continue reviewing this week. |
src/components/cl/basic/cl_basic.c
Outdated
@@ -10,6 +10,13 @@ ucc_status_t ucc_cl_basic_get_lib_attr(const ucc_base_lib_t *lib, | |||
ucc_base_lib_attr_t *base_attr); | |||
ucc_status_t ucc_cl_basic_get_context_attr(const ucc_base_context_t *context, | |||
ucc_base_ctx_attr_t *base_attr); | |||
ucc_status_t ucc_cl_basic_mem_map(const ucc_base_context_t *context, int type, |
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.
I leave it up to you but these declarations could even go into the macro UCC_BASE_IFACE_DECLARE
, it would save a lot of duplication
CL/BASIC: add support for ucc_mem_map/unmap CL/HIER: add support for ucc_mem_map/unmap CL/DOCA_UROM: add support for ucc_mem_map/unmap TL/CUDA: add support for ucc_mem_map/unmap TL/MLX5: add support for ucc_mem_map/unmap TL/NCCL: add support for ucc_mem_map/unmap TL/RCCL: add support for ucc_mem_map/unmap TL/SELF: add support for ucc_mem_map/unmap TL/SHARP: add support for ucc_mem_map/unmap
TL/UCP: add support for communication with memmap REVIEW: various fixes TL/UCP: Enable multiple packed buffers
2f469f5
to
bb5ee28
Compare
TL/UCP: additional support for memh in onesided alltoall
bb5ee28
to
f88c054
Compare
@Sergei-Lebedev Thanks again for the time and comments related to this PR. I've updated the PR based on what you've suggested and answered your comments. Please let me know if there is anymore feedback. |
tl_error(ctx->super.super.lib, "unable to pack memory handle without TL handles"); | ||
return UCC_ERR_INVALID_PARAM; | ||
} | ||
if (ctx->cfg.exported_memory_handle && mode == UCC_MEM_MAP_MODE_EXPORT) { |
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.
should it be UCC_MEM_MAP_MODE_EXPORT_OFFLOAD?
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.
UCC_MEM_MAP_MODE_EXPORT_OFFLOAD is used to perform an export of a memory handle on an offload device (e.g., DPU). In that case, there's no need to pack the UCP memory handle on the DPU. It can just pack rkeys.
@wfaderhold21 thank you for all the hard work you've put into this pull request — it's greatly appreciated! |
What
Implementation of PR #1037
NOTE: branch is branched from #1037 and will need to be rebased before merging