Skip to content

UCS/TOPO: Initialize GPU-NIC assignment object in UCP context - #11976

Merged
tvegas1 merged 102 commits into
openucx:masterfrom
guy-ealey-morag:topo-ctx-integration
Sep 23, 2026
Merged

tvegas1 merged 102 commits into
openucx:masterfrom
guy-ealey-morag:topo-ctx-integration

Conversation

@guy-ealey-morag

Copy link
Copy Markdown
Contributor

What?

  • Initialize the GPU-NIC assignment object in UCP context when relevant
  • Move the VERA check from topo to UCP context

Why?

This object will be used (when not NULL) to force lane selection within the assigned groups

Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread src/ucp/core/ucp_context.c Resolved
Comment thread src/ucp/core/ucp_context.c Resolved
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread src/ucp/core/ucp_context.c Resolved
Comment thread src/ucs/sys/topo/base/topo.c Resolved
tvegas1
tvegas1 previously approved these changes Sep 22, 2026
@tvegas1
tvegas1 enabled auto-merge (squash) September 22, 2026 15:08
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

tvegas1
tvegas1 previously approved these changes Sep 22, 2026
@tvegas1
tvegas1 enabled auto-merge (squash) September 22, 2026 15:16
tomerg-nvidia
tomerg-nvidia previously approved these changes Sep 22, 2026
Comment thread src/ucp/core/ucp_context.c Resolved
Comment thread src/ucp/core/ucp_context.c Resolved
Comment thread src/ucp/core/ucp_context.c Resolved
Comment thread src/ucp/core/ucp_context.c Resolved
Signed-off-by: Guy Ealey Morag <gealeymorag@nvidia.com>
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread src/ucp/core/ucp_context.c Resolved
Comment thread src/ucp/core/ucp_context.c Resolved
@svc-ucx

svc-ucx commented Sep 22, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Tests gpu on worker 3) · commit 2bfab52a

TL;DR: The gpu-worker-3 gtest shard failed on a single test, rc_gda/test_ucp_device.get_remote_mem_list_length/1 (cuda), which aborts at ASSERT_UCS_OK when ucp_device_remote_mem_list_create() returns a non‑retryable error for a not-yet-fully-wired endpoint; this is a race in the device mem-list lane lookup, not a regression from PR #11976 (which only builds/logs the GPU‑NIC assignment object).

Full analysis

Summary: make test in the "gpu on worker 3" job exited with code 2 — 1 of 10286 gtests failed: rc_gda/test_ucp_device.get_remote_mem_list_length/1, where GetParam() = rc,rc_gda,cuda_copy,rocm_copy/cuda.

Root cause: The retained log tail only contains the gtest summary (the per-test error line is earlier in the truncated log), but the failure is bounded to test_ucp_device::mem_list construction / length check. Decisive evidence from the same run: the sibling test get_local_mem_list_length/1 — which builds an identical 8-element, 1 KB mem_list on the same transport/variant — passed, as did test_ucp_device_xfer.put/counter on rc_gda. So the failing path is non-deterministic, i.e. a wireup race in ucp_device_remote_mem_list_create():

  • ucp_device_remote_mem_list_params_check() only treats a missing UCP_EP_FLAG_REMOTE_CONNECTED as the retryable UCS_ERR_NOT_CONNECTED (src/ucp/core/ucp_device.c:766-773), and the test loops only on that status (test/gtest/ucp/test_ucp_device.cc:210-214).
  • Once the flag is set but lanes are not yet fully configured, ucp_device_ep_check_lanes() / ucp_device_ep_find_lane() fail and ucp_device_remote_mem_list_create_handle() returns the hard UCS_ERR_INVALID_PARAM ("lane not found for element %zd", src/ucp/core/ucp_device.c:690-703) or UCS_ERR_NO_DEVICE from ucp_device_remote_mem_list_element_pack() (line 545-548). The test's ASSERT_UCS_OK (test_ucp_device.cc:219) expands to UCS_TEST_ABORT → fatal gtest failure, exactly matching a lone FAILED entry with no crash/abort of the process.

PR #11976 (UCS/TOPO: Initialize GPU-NIC assignment object in UCP context) only constructs and debug-logs ucp_gpu_nic_assignment_t; nothing in src/ucp/core/ucp_gpu_nic_assignment.c is consumed by wireup/device-lane selection yet, so it cannot deterministically change rc_gda lane sets. Treat this as a pre-existing flaky device-lane race, not a PR regression.

Implicated commit: Not the PR head (2bfab52, Guy Ealey Morag). The fragile logic comes from 5fb8bfc "UCP/DEVICE: Require connected EP for remote mem list (#11704)" (amastbaum) and [REDACTED:Hex High Entropy String] "UCP/DEVICE: Check no-lkey lanes before lkey (#11807)" (Artemy Kovalyov).

File: src/ucp/core/ucp_device.c:690-703 (hard UCS_ERR_INVALID_PARAM on missing lane) and src/ucp/core/ucp_device.c:766-773; test side: test/gtest/ucp/test_ucp_device.cc:210-220

Suggested fix:

  1. Make the lane-lookup failure retryable: in ucp_device_remote_mem_list_create_handle(), when no tl_type bitmap matches the ep's lanes (or ucp_device_ep_find_lane() returns UCP_NULL_LANE) while the ep is still in wireup (ucp_ep_has_wireup_lanes/UCP_EP_FLAG_LOCAL_CONNECTED not complete), return UCS_ERR_NOT_CONNECTED and demote the ucs_error to ucs_diag, so the existing test/application retry-with-progress loop handles it.
  2. Harden the test: in test_ucp_device::mem_list, retry on UCS_ERR_NOT_CONNECTED and UCS_ERR_INVALID_PARAM/UCS_ERR_NO_DEVICE under a bounded wait_for_cond, or call flush_ep(sender()) before ucp_device_remote_mem_list_create() so lanes are guaranteed configured.
  3. Re-run the gpu-worker-3 shard to confirm the failure does not reproduce; if it does reproduce consistently on this PR, re-check ucp_device_get_tl_bitmap() (ctl_device vs local_sys_dev filtering, src/ucp/core/ucp_device.c:203-221) against the newly built GPU-NIC assignment.

Related: PR #11976 (this PR); PR #11704, PR #11807 (device remote mem-list lane logic); PR #11968 "UCT/DEVICE: fix gda qp state and uar" (recent rc_gda device fixes)

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 9501305c-7f32-4e95-b4ab-6f57d2d2c950 in the triage console for the audit trail.

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.

7 participants