UCT/CUDA_IPC/UCP: Propagate only peer-level cuda_ipc unreachability #12344
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
pentschev
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 fromzero-copy flushed write to remote, cuda_copy, frag cuda | cuda_ipc/cuda(rtr/mtype) tofragmented 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 67108864between two GPUs with P2P access: 22.9 GB/s with this PR, 4.6 GB/s on master (DGX-1 V100).How
UCS_ERR_UNSUPPORTEDif mapping failed, NVML reports P2P access to the remote device and the remote buffer has no IPC handle (NO_IPC). All other failures keep returningUCS_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_CONFIG_FLAG_PEER_UNREACHABLEonly forUCS_ERR_UNREACHABLE.ucp_proto_rndv_ctrl_select_remote_proto()propagates unreachable MDs to the remote protocol estimation only if this flag is set.test_ucp_proto_mock_cuda_ipc.rndv_recv_unreachablesets the flag; newrndv_recv_unsupported_handlechecks that cuda_ipc is still used for rtr/mtype without it; newtest_cuda_ipc_md.unpack_no_ipc_handle.Testing
| | 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
UCP_PROTO_COMMON_KEEP_MD_MAPprotocols (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.UCS_MEM_FLAG_IPC_CAPABLEfor 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.