Skip to content

TL/UCP: add memtype to tl_ucp_put/get#1253

Merged
janjust merged 1 commit intoopenucx:masterfrom
wfaderhold21:topic/onesided-cuda
Jan 15, 2026
Merged

TL/UCP: add memtype to tl_ucp_put/get#1253
janjust merged 1 commit intoopenucx:masterfrom
wfaderhold21:topic/onesided-cuda

Conversation

@wfaderhold21
Copy link
Collaborator

What

Adds memory type to the tl_ucp_put/get interfaces to allow for GPU memory in onesided collectives for TL/UCP

@Sergei-Lebedev
Copy link
Contributor

/build

@janjust janjust force-pushed the topic/onesided-cuda branch from a5c8323 to aa06358 Compare January 14, 2026 18:08
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 14, 2026

Greptile Summary

Added memory type parameter to ucc_tl_ucp_put_nb and ucc_tl_ucp_get_nb functions to enable GPU memory support in onesided collectives for TL/UCP.

  • Modified function signatures in tl_ucp_sendrecv.h to accept ucc_memory_type_t mtype parameter
  • Updated both functions to set UCP_OP_ATTR_FIELD_MEMORY_TYPE flag and populate req_param.memory_type using ucc_memtype_to_ucs lookup array
  • Updated all call sites in alltoall_onesided.c (both GET and PUT operations) and alltoallv_onesided.c (PUT operation) to pass the appropriate memory type
  • GET operations correctly use destination buffer memory type (where data is received locally)
  • PUT operations correctly use source buffer memory type (where data is sent from locally)

The implementation follows the existing pattern used in other TL/UCP communication primitives like ucc_tl_ucp_send_common and ucc_tl_ucp_recv_common.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward and follow established patterns in the codebase. The memory type parameter is correctly threaded through the function interfaces and properly used in all call sites. The implementation correctly distinguishes between source and destination memory types for PUT vs GET operations. All changes are consistent with existing code patterns for memory type handling in other TL/UCP primitives.
  • No files require special attention

Important Files Changed

Filename Overview
src/components/tl/ucp/tl_ucp_sendrecv.h Added mtype parameter to ucc_tl_ucp_put_nb and ucc_tl_ucp_get_nb functions, properly setting UCP_OP_ATTR_FIELD_MEMORY_TYPE flag and memory_type field in request parameters
src/components/tl/ucp/alltoall/alltoall_onesided.c Updated GET operation to pass destination memory type and PUT operation to pass source memory type to the onesided communication functions
src/components/tl/ucp/alltoallv/alltoallv_onesided.c Updated PUT operation to pass source memory type to enable GPU memory support in alltoallv onesided collective

@janjust
Copy link
Collaborator

janjust commented Jan 14, 2026

\build

1 similar comment
@Sergei-Lebedev
Copy link
Contributor

\build

@janjust
Copy link
Collaborator

janjust commented Jan 15, 2026

/build

@janjust janjust enabled auto-merge (squash) January 15, 2026 16:05
@janjust janjust merged commit 69fa725 into openucx:master Jan 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants