Repository navigation
Conversation
|
🤖 Starting review — findings will be posted here when done. |
|
Residual coverage gap: once the test variant issue is fixed, |
|
🤖 CI Triage Agent — TL;DR: The build failed on a single gtest, Full analysisSummary: Root cause: Evidence from the log:
Conclusion: this is an unrelated (pre-existing/flaky) failure in the multi-lane TCP put + worker-flush verification path, not a regression from the PR's commit. Note the exact assertion text could not be confirmed: the test executable ran ~53 minutes and only the last ~500 log lines are retrievable, and the failure line itself scrolled out. Implicated commit: none for this PR (7fbe855 is IB/MLX5-only). Top suspects for the underlying flake, both landed days before this build and touch the flush / multi-lane RMA completion path: File: Suggested fix: Do not change the PR for this — re-trigger "Tests new on worker 2". To root-cause the flake, reproduce in isolation with Related: PR #12180 (this PR, IB/MLX5 UAR, unrelated to the failing TCP test); candidate regressions #11923, #12091; prior multi-rail RMA churn #12082 / #12015 / #12002.
|
|
🤖 Starting review — findings will be posted here when done. |
|
Residual coverage gap: dedicated mode is only exercised with real |
|
🤖 CI Triage Agent — TL;DR: Only the two Full analysisSummary: Root cause: Evidence from the log: the failure is isolated to the new
(The detailed gtest/UCX error lines for those two tests are no longer in the retrievable log window — only the last ~500 lines of a 4662 s run are available — so the exact CUDA error code could not be read; the variant/device isolation plus the single shared code path is what pins the diagnosis.) Implicated commit: 7fbe855 "UCT/IB/MLX5: Use dedicated NC UARs per QP" (Zihao Zhao), refactored by 87df76a "UCT/IB/MLX5: refactor" (Zihao Zhao, HEAD of this PR) File: src/uct/ib/mlx5/gdaki/gdaki.c:1321 (dedicated-mode UAR probe in wrong CUDA context) and src/uct/ib/mlx5/gdaki/gdaki.c:537-546 (ignored Suggested fix:
Related: PR #12180 (branch |
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Starting review — findings will be posted here when done. |
UCT/IB/MLX5: Map dedicated UAR pages into CUDA UCT/IB/MLX5: Reuse registered UAR pages UCT/IB/MLX5: Declare UAR CUDA status in mapping scope UCT/IB/MLX5: Add UAR allocation mode config GTEST/UCT/GDAKI: Add UAR allocation mode variants to device tests UCT/IB/MLX5: dedicated uar UCT/IB/MLX5: format GTEST/UCT/GDAKI: fix variant UCT/IB/MLX5: refactor UCT/IB/MLX5: refactor uar reg UCT/IB/MLX5: lock in cleanup UCT/IB/MLX5: cleanup UCT/IB/MLX5: fix uar reg UCT/IB/MLX5: refactor uar
56702b1 to
ad87f2d
Compare
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Starting review — findings will be posted here when done. |
|
Residual coverage gap: |
|
🤖 CI Triage Agent — TL;DR: The gtest binary aborted on a UCS rcache assertion ( Full analysisSummary: Root cause: Log backtrace (frames 3–7): Implicated commit: Not caused by [REDACTED:Hex High Entropy String]; the unsafe lock-free put path originates in 37c574d "UCP/MM: lock free when deregistration memory region" (Liu, Changcheng), most recently reworked by 311e350 "UCS/RCACHE: Change inv_q type to interval tree (#11248)" (nbellalou) File: src/ucs/memory/rcache.inl:121-132 (and caller src/ucp/core/ucp_mm.c:441; assert at src/ucs/memory/rcache.c:396) Suggested fix: Make the UCP release path refcount-safe: in Related: PR #12180 (#12180); area touched by #11248 (interval-tree invalidation) and #11149 (rcache locking for gdrcopy) — no existing issue found for this assertion
|
|
minor: why register only 8 bytes ( |
|
🤖 CI Triage Agent — TL;DR: The ASAN gtest run was killed by the 900 s gtest watchdog while Full analysisSummary: Root cause: A hang, not slowness. Timeline from the job log:
So at
Secondary note: the agent also logged Implicated commit: File: Suggested fix:
Related: PR #12180 (#12180); related earlier UAR-type fix for reference: #11310 "UCT/IB/MLX5: Fix DEVX for not WC-supported UAR" (commit
|
|
🤖 Starting review — findings will be posted here when done. |
|
🤖 Review complete — no issues found. |
|
🤖 CI Triage Agent — TL;DR: The gtest binary aborted in Full analysisSummary: Root cause: Two symptoms, one mechanism in the UCT TCP PUT protocol:
The failing variant uses only Implicated commit: unknown (not PR #12180's IB/mlx5 UAR change; latest relevant touch of the RX path is File: Suggested fix:
Related: PR #12180 (branch under test, |
Separate ordered WQE publication from serialized doorbell submission. Use a lock and a monotonic producer index so delayed ring calls cannot regress the doorbell or block deferred publication during MMIO. Keep the device QP size at 128 bytes.
|
🤖 Starting review — findings will be posted here when done. |
Keep GPU sharing by default and permit CTA-confined experiments through a compile-time contract. Apply the selected scope consistently to reservations, rollback, ready publication, doorbell locking and PI updates. Retain GPU fences around MMIO and document validation limits and coordinated rebuild requirements.
1be6002 to
dcae7ee
Compare
|
|
||
| if (dedicated_uar) { | ||
| status = uct_rc_gdaki_channel_uar_init(iface, channel); | ||
| #if 0 |
There was a problem hiding this comment.
blocker — leftover #if 0 block. Please drop the #if 0 alternative and keep only:
| #if 0 | |
| status = uct_rc_gdaki_channel_uar_init(iface, channel); |
Dead code should not be merged.
| if (!skip_db) { | ||
| doca_gpu_dev_verbs_lock< | ||
| UCT_RC_GDAKI_RESOURCE_SHARING_MODE>(&qp->sq_lock); | ||
| const uint64_t old_pi = doca_gpu_dev_verbs_atomic_max< |
There was a problem hiding this comment.
blocker — flush bypasses the new doorbell lock. uct_rc_mlx5_gda_ep_flush(UCT_DEVICE_FLAG_PUSH) still calls uct_rc_mlx5_gda_push_db(), which rings the doorbell outside sq_lock and never updates sq_wqe_pi. After such a push, a deferred producer can take the lock, see old_pi < wqe_next for a smaller wqe_next, and write a lower value to DBREC — moving the producer index backwards, which is exactly what the new monotonic PI is meant to prevent. Please route the flush push through the same lock/atomic_max path.
| auto dbrec_ptr = &ep->qps[cid].qp_dbrec[MLX5_SND_DBR]; | ||
|
|
||
| while (READ_ONCE(qp->sq_ready_index) != wqe_base) { | ||
| const bool skip_db = !(flags & UCT_DEVICE_FLAG_NODELAY); |
There was a problem hiding this comment.
Dropped the periodic doorbell: skip_db lost the !((wqe_base ^ wqe_next) & 128) term, so a non-NODELAY post now never rings a doorbell. Why was this removed? Without it, a kernel that posts more deferred WQEs than the SQ depth before any flush or NODELAY op spins forever in UCT_RC_GDA_RESV_WQE_NO_RESOURCE, since no CQE can arrive to advance uct_rc_mlx5_gda_max_alloc_wqe_base().
| @@ -0,0 +1,67 @@ | |||
| # GDAKI alignment with NCCL GIN | |||
There was a problem hiding this comment.
Developer scratch notes: this reads as working notes rather than project documentation — it references a branch SHA (2ba29c3c9), a local align.diff, and "a temporary host harness", and docs/ otherwise only holds the style guides, doxygen, and sphinx sources, so nothing picks this file up. Please drop it, and move the part that users actually need (the UCT_RC_GDAKI_RESOURCE_SHARING_MODE compile-time contract) next to the macro in gdaki.cuh or into src/uct/ib/AGENTS.md.
|
PR-level scope: this PR mixes the host-side Residual coverage gap: the device-side changes (doorbell serialization, Residual coverage gap: |
|
🤖 Starting review — findings will be posted here when done. |
| &channel->uar.dedicated.qp_uar, | ||
| uct_ib_mlx5_iface_md(&iface->super.super.super), | ||
| qp_attr.mmio_mode); | ||
| #endif |
There was a problem hiding this comment.
pls remove the leftover #if 0 block.
| #endif | |
| status = uct_rc_gdaki_channel_uar_init(iface, channel); |
Dead code committed inside the new dedicated-UAR path. Impact: confusing (it suggests two competing implementations of the same step) and it will be flagged in any later cleanup pass.
| uar->super.mode = UCT_IB_MLX5_MMIO_MODE_DB; | ||
| uar->ctx = md->super.dev.ibv_context; | ||
| return UCS_OK; | ||
| } |
There was a problem hiding this comment.
uct_rc_gdaki_channel_uar_init() duplicates uct_ib_mlx5_devx_uar_init() and silently changes the UAR type: it is a copy with the alloc type hardcoded to UCT_IB_MLX5_UAR_ALLOC_TYPE_NC, while the shared path keeps using WC when UCT_IB_MLX5_MD_FLAG_UAR_USE_WC is set (and uct_gdaki_md_check_uar() already proves a WC UAR can be registered with CUDA). Why not add the alloc type as a parameter to uct_ib_mlx5_devx_uar_init() and reuse it here? As written, dedicated QPs get a different doorbell mapping than the shared path with no explanation, and it can fail on devices without NC_DEDICATED support; it also conflicts with the root AGENTS.md rule against duplicating implementation patterns. Pls add a comment if NC is required for the GPU-mapped doorbell.
| auto dbrec_ptr = &ep->qps[cid].qp_dbrec[MLX5_SND_DBR]; | ||
|
|
||
| while (READ_ONCE(qp->sq_ready_index) != wqe_base) { | ||
| const bool skip_db = !(flags & UCT_DEVICE_FLAG_NODELAY); |
There was a problem hiding this comment.
The doorbell is now never rung without NODELAY: skip_db loses the !((wqe_base ^ wqe_next) & 128) term, so a producer that never passes UCT_DEVICE_FLAG_NODELAY depends entirely on uct_device_ep_flush(..., UCT_DEVICE_FLAG_PUSH); uct_rc_mlx5_gda_ep_progress() is empty and check_completion() only reads the CQE. Impact: ucp_device_put(..., flags=0) followed by ucp_device_progress_req() alone can no longer complete, where before it progressed every 128 WQEs. Is the user now required to always push, even when only polling ucp_device_progress_req?
|
🤖 CI Triage Agent — TL;DR: Full analysisSummary: Azure job "gpu on worker 2" failed with Root cause: Log timestamps show the last test line at
Implicated commit: [REDACTED:Hex High Entropy String] "UCT/IB/MLX5: remove ring per 128 put" (Zihao Zhao), on PR #12180 branch File: src/uct/ib/mlx5/gdaki/gdaki.cuh:226-265 ( Suggested fix:
Related: PR #12180 ([WIP][DNM] UCT/IB/MLX5: Use dedicated UARs per QP) — #12180
|
UCP/DEVICE: Add UCP_DEVICE_FLAG_NO_DB flag
sq_wqe_num is a power of two, so the crossing test works with it; it is also the largest batching interval that cannot starve completions: when the reservation limit is hit, the last boundary crossing has already rung at least one WQE for the NIC to complete.
|
🤖 Starting review — findings will be posted here when done. |
| typedef enum { | ||
| UCT_DEVICE_FLAG_NODELAY = UCS_BIT(0) /**< Complete before return. */ | ||
| UCT_DEVICE_FLAG_NODELAY = UCS_BIT(0), /**< Complete before return. */ | ||
| UCT_DEVICE_FLAG_NO_DB = UCS_BIT(1), /**< Post without ringing the |
There was a problem hiding this comment.
blocker: UCS_BIT(1) is already taken by UCT_DEVICE_FLAG_PUSH on the target branch (and uct_rc_mlx5_gda_ep_flush() tests it), so after rebase NO_DB and PUSH would be the same bit of the same enum. Pls rebase and pick a free bit here and in UCP_DEVICE_FLAG_NO_DB.
Evidence: the diff pre-image of this enum contains only UCT_DEVICE_FLAG_NODELAY, while the base branch has UCT_DEVICE_FLAG_NODELAY = UCS_BIT(0), UCT_DEVICE_FLAG_PUSH = UCS_BIT(1) (uct_device_types.h:68-69) plus UCP_DEVICE_FLAG_PUSH (ucp_device_impl.h:40-41), and gdaki.cuh:408 uses UCT_DEVICE_FLAG_PUSH.
| } | ||
|
|
||
| if (dedicated_uar) { | ||
| status = uct_rc_gdaki_channel_uar_init(iface, channel); |
There was a problem hiding this comment.
pls remove the leftover #if 0 block.
| status = uct_rc_gdaki_channel_uar_init(iface, channel); | |
| status = uct_rc_gdaki_channel_uar_init(iface, channel); |
| ucs_derived_of(iface->super.super.super.super.md, | ||
| uct_ib_mlx5_md_t); | ||
| ucs_status_t status; | ||
| status = uct_ib_mlx5_devx_alloc_uar( |
There was a problem hiding this comment.
why force UCT_IB_MLX5_UAR_ALLOC_TYPE_NC here, while the shared path goes through uct_ib_mlx5_devx_uar_init() and uses WC when UCT_IB_MLX5_MD_FLAG_UAR_USE_WC is set? pls add a comment if NC is required for the CUDA mapping.
| while (!ref.compare_exchange_strong(wqe_base, wqe_next, | ||
| cuda::std::memory_order_relaxed)) { | ||
| wqe_base = wqe_base_orig; | ||
| const uint64_t qp_depth = uct_rc_mlx5_load_const(&ep->sq_wqe_num); |
There was a problem hiding this comment.
why change the doorbell batching threshold from the fixed 128 to the full SQ depth? with sq_wqe_num (1024 by default) this bit flips only once per queue wrap, so an op without NODELAY may be deferred until the SQ is almost full or an explicit PUSH/flush arrives.
| doca_gpu_dev_verbs_fence_acquire<uct_rc_gdaki_sync_scope>(); | ||
|
|
||
| if (!skip_db) { | ||
| doca_gpu_dev_verbs_lock< |
There was a problem hiding this comment.
uct_rc_mlx5_gda_ep_flush() -> uct_rc_mlx5_gda_push_db() still rings the doorbell without sq_lock and without the sq_wqe_pi max, so a PUSH racing with this block can write a dbr value lower than the one already published here. should flush use the same lock/pi?
|
Residual coverage gaps: Residual coverage gap: the device-side rework (doorbell serialization, I could not verify the new DOCA GPUNetIO symbols ( |
What?
Use dedicated uar for each gda qp.
Why?
Improves performance for heavy loads .
How?
Add new configuration for uar alloc mode.
Alloc and register dedicated uar for each qp when
UAR_ALLOC_MODE=shared.(µs)
env