Skip to content

UCT/CUDA/CUDA_IPC: Unmap memory handle at ucp_device_mem_list_release. - #11730

Merged
rakhmets merged 1 commit into
openucx:masterfrom
rakhmets:topic/cuda-ipc-md-mem-elem-pack
Aug 14, 2026
Merged

rakhmets merged 1 commit into
openucx:masterfrom
rakhmets:topic/cuda-ipc-md-mem-elem-pack

Conversation

@rakhmets

@rakhmets rakhmets commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

What?

Added UCT API uct_md_mem_elem_release to be able to release resources allocated during uct_md_mem_elem_pack.

Why?

cuda_ipc implementation of uct_md_mem_elem_pack maps remote address, opening interprocess handle. It's not possible to release the memory without closing all opened interprocess handles.

@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch from ad06eaf to 2a05e5c Compare August 5, 2026 09:57
@rakhmets rakhmets added the WIP-DNM Work in progress / Do not review label Aug 5, 2026
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch 3 times, most recently from 7be37e3 to 5a6c215 Compare August 5, 2026 11:31
@rakhmets rakhmets removed the WIP-DNM Work in progress / Do not review label Aug 5, 2026
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch from 5a6c215 to 8574cab Compare August 5, 2026 12:12
@rakhmets rakhmets added the WIP-DNM Work in progress / Do not review label Aug 5, 2026
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch 4 times, most recently from c5ff148 to b1170d9 Compare August 5, 2026 17:41
@rakhmets rakhmets changed the title UCT/CUDA/CUDA_IPC: Map remote memory once at memory element pack. UCT/CUDA/CUDA_IPC: Unmap memory handle at ucp_device_mem_list_release. Aug 5, 2026
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch 2 times, most recently from 3b48958 to 3c6e5c8 Compare August 6, 2026 08:16
@rakhmets rakhmets removed the WIP-DNM Work in progress / Do not review label Aug 6, 2026
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch 8 times, most recently from 4bde128 to cd3f59b Compare August 10, 2026 08:57
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-md-mem-elem-pack branch from cd3f59b to 2360023 Compare August 10, 2026 09:07
Comment thread src/ucp/core/ucp_device.c
ucp_device_local_mem_list_h *mem_list_h)
{
ucp_device_mem_elem_release_handles_t release_handles =
UCS_ARRAY_DYNAMIC_INITIALIZER;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next PR: We know the mem list length in advance, can we move to fixed size array?

@ofirfarjun7

ofirfarjun7 commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

@edgargabriel @mshanthagit FYI

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.

2 participants