← Back to Pull requests

UCT/CUDA_IPC/UCP: Propagate only peer-level cuda_ipc unreachability #12344

Closed
unknown closed this pull request without merging on Nov 25, 2026 15:58 UTC
View on GitHub
unknown unknown commented on Nov 16, 2026 14:47 UTC
Author

What


Since #11979, cudf-polars PDS-H on GB200 NVL72 is 7-9x slower (SF10K Q9: 1 node 22 s -> 184-203 s, 2 nodes 13.5 s -> 88 s).

The cause is the UCP part of #11979 in ucp_proto_rndv_ctrl_select_remote_proto(): MDs which the receiver failed to unpack from the sender's rkey are also marked unreachable in the estimation of the protocol the peer runs on the local buffer. This holds when the two devices cannot access each other, but not when only the sender's buffer cannot be mapped. In this workload the user buffers come from an RMM async memory pool without an exportable handle type, so cuda_ipc packs them as NO_IPC, while the receiver's rndv fragments (allocated by UCX with an exportable handle) are accessible by the sender.

Between GPUs of the same node, the receiver's rendezvous data fetch into cuda/GPU0 from cuda/dev[0] changes from zero-copy flushed write to remote, cuda_copy, frag cuda | cuda_ipc/cuda (rtr/mtype) to fragmented copy-in copy-out | sysv/memory. Inter-node is not affected, since NO_IPC buffers are not packed with cuda_ipc for inter-node peers (#11754); the 2-node slowdown comes from the intra-node peers.

Single-node reproducer: UCX_CUDA_COPY_ASYNC_MEM_TYPE=cuda ucx_perftest -t tag_bw -m cuda-async:1,cuda-async:0 -s 67108864 between two GPUs with P2P access: 22.9 GB/s with this PR, 4.6 GB/s on master (DGX-1 V100).

How


  • cuda_ipc rkey unpack returns UCS_ERR_UNSUPPORTED if mapping failed, NVML reports P2P access to the remote device and the remote buffer has no IPC handle (NO_IPC). All other failures keep returning UCS_ERR_UNREACHABLE, including when NVML cannot tell whether P2P access exists. The per-device accessibility cache gets an explicit state enum to remember which of the two it was.

  • UCP rkey unpack treats both statuses as unreachable for the remote key, so protocol selection for that key does not change, and sets UCP_RKEY_CONFIG_FLAG_PEER_UNREACHABLE only for UCS_ERR_UNREACHABLE. ucp_proto_rndv_ctrl_select_remote_proto() propagates unreachable MDs to the remote protocol estimation only if this flag is set.

  • gtest: test_ucp_proto_mock_cuda_ipc.rndv_recv_unreachable sets the flag; new rndv_recv_unsupported_handle checks that cuda_ipc is still used for rtr/mtype without it; new test_cuda_ipc_md.unpack_no_ipc_handle.
  • Testing


  • GB200 NVL72, SF10K Q9: 2 nodes 12.3 s (master 88 s), 1 node 22.1 s (master 184-203 s); protocol tables identical to c036c8414e9a (before #11979).

  • DGX-1 V100, ucx_perftest tag_bw 64 MB:
  • | | cuda, P2P | cuda, no P2P | cuda-async, P2P | cuda-async, no P2P |
    |---|---|---|---|---|
    | master | 23.1 GB/s | 4.2 GB/s | 4.6 GB/s | 4.9 GB/s |
    | this PR | 23.1 GB/s | 4.7 GB/s | 22.9 GB/s | 4.6 GB/s |

    Alternatives considered


  • Revert the UCP part of #11979, or skip the propagation for UCP_PROTO_COMMON_KEEP_MD_MAP protocols (rndv/rtr/mtype): on the no-P2P pair with cudaMalloc buffers the bandwidth drops to 0.08 GB/s, because the receiver again selects a cuda_ipc put into its fragment that the sender cannot do.

  • Require a new UCS_MEM_FLAG_IPC_CAPABLE for cuda_ipc, so NO_IPC buffers carry no cuda_ipc rkey: on the no-P2P pair with NO_IPC buffers the bandwidth drops to 0.68 GB/s, because the receiver never gets the peer's device UUID for the NVML check.
  • Diff: 411 lines (+308 / -103) across 5 files Reviewer: pentschev Review duration: 13030m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 411 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.360
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12344"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.7% · Safe to merge
    17.7%
    Repository