Skip to content

UCP/CORE: Restore cached mem_flags for UCX-owned allocations - #11681

Closed
guy-ealey-morag wants to merge 1 commit into
openucx:masterfrom
guy-ealey-morag:restore-mem-flags
Closed

UCP/CORE: Restore cached mem_flags for UCX-owned allocations#11681
guy-ealey-morag wants to merge 1 commit into
openucx:masterfrom
guy-ealey-morag:restore-mem-flags

Conversation

@guy-ealey-morag

Copy link
Copy Markdown
Contributor

What

When ucp_memh_create_from_mem() builds a memory handle for a UCX-owned allocation, restore the memory-type flags (notably UCS_MEM_FLAG_REGISTRABLE) from the cached allocation MD instead of relying solely on pointer detection.

Why

memh->mem_flags drives which MDs the rendezvous protocol must register the buffer on. For CUDA memory, deriving UCS_MEM_FLAG_REGISTRABLE via pointer detection can depend on a thread-local CUDA context on the calling thread.
NIXL allocates/registers buffers from a thread that does not have the CUDA context bound (a worker/progress thread separate from the one that created the context). On that thread, REGISTRABLE is silently dropped from the handle.

Internal Bug

Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
@guy-ealey-morag

Copy link
Copy Markdown
Contributor Author

Possibly already resolved by a different PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant