Skip to content

Commit c5a9d4e

Browse files
authored
Merge pull request #7939 from yosefe/topic/ucp-rndv-disable-put-pipeline-when-sender-v1.12.x
UCP/RNDV: Disable put-pipeline when sender side is host memory - v1.12.x
2 parents ccb6cbb + c6b0285 commit c5a9d4e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Fixed continuously triggering wakeup fd when keepalive is used
1515
* Fixed memtype cache fallback when memory hooks are not installed
1616
* Fixed parsing header flags of worker address
17+
* Fixed pipeline protocol when sending from host memory to GPU memory
1718
### Important changes
1819
* If Cuda memory hooks on driver API cannot be installed, memory type cache and
1920
memory registration cache will be disabled. This may lead to lower performance

src/ucp/rndv/rndv.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,15 @@ static int ucp_rndv_is_recv_pipeline_needed(ucp_request_t *rndv_req,
116116

117117
static UCS_F_ALWAYS_INLINE int
118118
ucp_rndv_is_put_pipeline_needed(uintptr_t remote_address, size_t length,
119+
const void *rkey_buf,
119120
const ucp_ep_rndv_zcopy_config_t *get_zcopy,
120121
const ucp_ep_rndv_zcopy_config_t *put_zcopy,
121122
int is_get_zcopy_failed)
122123
{
124+
if (ucp_rkey_packed_mem_type(rkey_buf) == UCS_MEMORY_TYPE_HOST) {
125+
return 0;
126+
}
127+
123128
/* Fallback to PUT pipeline if: */
124129
return /* Remote mem type is non-HOST memory OR can't do GET ZCOPY */
125130
((remote_address == 0) || (get_zcopy->max == 0) ||
@@ -1507,8 +1512,8 @@ UCS_PROFILE_FUNC_VOID(ucp_rndv_receive, (worker, rreq, rndv_rts_hdr, rkey_buf),
15071512
put_zcopy = &ep_config->rndv.put_zcopy;
15081513
ucp_rndv_recv_data_init(rreq, rndv_rts_hdr->size);
15091514
if (ucp_rndv_is_put_pipeline_needed(rndv_rts_hdr->address,
1510-
rndv_rts_hdr->size, get_zcopy,
1511-
put_zcopy,
1515+
rndv_rts_hdr->size, rkey_buf,
1516+
get_zcopy, put_zcopy,
15121517
is_get_zcopy_failed)) {
15131518
/* send FRAG RTR for sender to PUT the fragment. */
15141519
ucp_rndv_send_frag_rtr(worker, rndv_req, rreq, rndv_rts_hdr);

0 commit comments

Comments
 (0)