Skip to content

UCT/CUDA/CUDA_IPC: Tightened the check of single process in unmap. - #11291

Merged
yosefe merged 1 commit into
openucx:masterfrom
rakhmets:topic/cuda-ipc-check-pid
Mar 30, 2026
Merged

yosefe merged 1 commit into
openucx:masterfrom
rakhmets:topic/cuda-ipc-check-pid

Conversation

@rakhmets

@rakhmets rakhmets commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

What?

Tightened the check for single process use case in uct_cuda_ipc_unmap_memhandle.

Why?

The same mapped_addr can be returned during opening CUDA IPC memory handle exported from another process. This case may be observed when two processes use a single GPU.

tvegas1
tvegas1 previously approved these changes Mar 24, 2026
@rakhmets

rakhmets commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Converted to draft to prevent merging before #11295 to avoid merge conflicts in #11295.

@rakhmets
rakhmets marked this pull request as draft March 25, 2026 08:33
shasson5
shasson5 previously approved these changes Mar 25, 2026
@rakhmets
rakhmets dismissed stale reviews from shasson5 and tvegas1 via eea2424 March 30, 2026 13:01
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-check-pid branch from eea2424 to fab7abc Compare March 30, 2026 13:01
@rakhmets
rakhmets force-pushed the topic/cuda-ipc-check-pid branch from fab7abc to c5b14ed Compare March 30, 2026 13:08
@rakhmets

Copy link
Copy Markdown
Contributor Author

Converted to draft to prevent merging before #11295 to avoid merge conflicts in #11295.

Rebased.

@rakhmets
rakhmets marked this pull request as ready for review March 30, 2026 13:08
@rakhmets
rakhmets requested review from shasson5 and tvegas1 March 30, 2026 13:09
Comment on lines +94 to +95
return (pid == rkey_pid) &&
(ucs_sys_get_ns(UCS_SYS_NS_TYPE_PID) == rkey_pid_ns);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

how does it work if 2 processes on different machines happen to have same pid?

@rakhmets rakhmets Mar 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

well... it may not work after this #10933 was merged...
it's a corner case for now, since this is a MNNVL case, and the uuids of the GPUs used must also match.

@yosefe
yosefe enabled auto-merge (squash) March 30, 2026 15:27
@yosefe

yosefe commented Mar 30, 2026

Copy link
Copy Markdown
Member

@rakhmets pls backport to v1.21.x

@yosefe
yosefe merged commit 9c82940 into openucx:master Mar 30, 2026
152 checks passed
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.

4 participants