Skip to content
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

UCP/RNDV: Disable put-pipeline when sender side is host memory - v1.12.x #7939

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Fixed continuously triggering wakeup fd when keepalive is used
* Fixed memtype cache fallback when memory hooks are not installed
* Fixed parsing header flags of worker address
* Fixed pipeline protocol when sending from host memory to GPU memory
### Important changes
* If Cuda memory hooks on driver API cannot be installed, memory type cache and
memory registration cache will be disabled. This may lead to lower performance
Expand Down
9 changes: 7 additions & 2 deletions src/ucp/rndv/rndv.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ static int ucp_rndv_is_recv_pipeline_needed(ucp_request_t *rndv_req,

static UCS_F_ALWAYS_INLINE int
ucp_rndv_is_put_pipeline_needed(uintptr_t remote_address, size_t length,
const void *rkey_buf,
const ucp_ep_rndv_zcopy_config_t *get_zcopy,
const ucp_ep_rndv_zcopy_config_t *put_zcopy,
int is_get_zcopy_failed)
{
if (ucp_rkey_packed_mem_type(rkey_buf) == UCS_MEMORY_TYPE_HOST) {
return 0;
}

/* Fallback to PUT pipeline if: */
return /* Remote mem type is non-HOST memory OR can't do GET ZCOPY */
((remote_address == 0) || (get_zcopy->max == 0) ||
Expand Down Expand Up @@ -1507,8 +1512,8 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_receive, (worker, rreq, rndv_rts_hdr, rkey_buf),
put_zcopy = &ep_config->rndv.put_zcopy;
ucp_rndv_recv_data_init(rreq, rndv_rts_hdr->size);
if (ucp_rndv_is_put_pipeline_needed(rndv_rts_hdr->address,
rndv_rts_hdr->size, get_zcopy,
put_zcopy,
rndv_rts_hdr->size, rkey_buf,
get_zcopy, put_zcopy,
is_get_zcopy_failed)) {
/* send FRAG RTR for sender to PUT the fragment. */
ucp_rndv_send_frag_rtr(worker, rndv_req, rreq, rndv_rts_hdr);
Expand Down