Skip to content

[None][test] Guard C++ KV bounce stream independence - #21235

Merged
ruodil merged 5 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/test-module-kv-bounce
Nov 23, 2026
Merged

ruodil merged 5 commits into
NVIDIA:mainfrom
ruodil:user/ruodil/test-module-kv-bounce

Conversation

@ruodil

@ruodil ruodil commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Guard disaggregated C++ KV bounce gather/scatter and terminal transfer completion while unrelated legacy-default-stream work remains pending. The regression uses real NIXL transport and checks aligned and unaligned payloads byte for byte through an independent nonblocking readback stream.

All allocations, transfer setup and warmup occur before a bounded legacy-stream gate. The test requires successful transfer settlement and verifies unrelated legacy work remains pending after settlement and readback. RAII releases the gate before transport teardown, including on assertion failures; watchdog release fails the test.

Migrates the original stream-independence coverage to the C++ agent bounce implementation selected by kv_cache_bounce_size_mb after removal of the Python bounce transport. No production code changes.

Validation

  • Local selected-file precommit checks passed, including clang-format, cmake-format, codespell and repository test-list validation; whitespace checks passed.
  • Existing premerge selector cpp/test_unit_tests.py::test_unit_tests[executor_bounce-90] runs this target in H100_PCIe-CPP-1.
  • Independent source review found no actionable findings. The prior L0 #68494 failure report reports both builds succeeded and the H100 executor_bounce wrapper passed; the pipeline failed in the unrelated MBART tokenizer protobuf mismatch. Aggregate wrapper success does not prove both new C++ cases ran without skips; that original per-case evidence is not available in this audit.
  • Both new H100 cases have now been verified individually without skips in the raw L0 #69109 CTest log; see the current status below. No local GPU runtime pass is claimed.

Current CI status (2026-11-12)

Current head: 7e5357e09a2a, merging upstream main at 762a8dc2a2e2. The previous-head L0 #69429 failure is now attributed: six idle-cancellation fixture cases and their suite wrapper fail on each CPU architecture because stale SimpleNamespace fixtures lack guided_failures. This merge includes upstream #21994 (0c6ac5f6060c), which uses BatchState/SampleStateTorch and initializes the guided-decoder field. The failure is an upstream test-fixture defect, not an unproven infrastructure issue. Both PR-specific files are byte-for-byte unchanged. Selected-file pre-commit, whitespace and independent merge review passed. No PR-specific waiver or dependency pin was added. Raw H100 CTest stdout from L0 #69109 proves both new RoundTripSettlesWhileUnrelatedLegacyWorkIsPending cases /32 and /19 passed without skips in 1.55 s and 1.53 s at parent head 5cd905425dc5. These PR test files are unchanged by this merge. The later #69429 H100 stage was skipped and is not additional execution evidence. Both new H100 cases have the required non-skipped runtime evidence. The previously requested new-head CI has now completed successfully; Code Owner review remains required.

PR Checklist

  • Reviewed applicable repository checklist requirements; commit includes DCO sign-off.

Verified merge status (2026-11-17)

Unchanged head 7e5357e09a2a passed L0 #69994 and has a successful blossom-ci result. GitHub reports no merge conflict or unresolved threads; the existing Code Owner review requests remain the merge gate. No additional CI retry is needed for this passing head.

Dev Engineer Review

  • The change touches only test code. No production source changes are in the diff.
  • bounceTransportTest now links directly to CUDA::cuda_driver. Confirm that the CMake target needs this direct link and does not depend on a transitive dependency.
  • The LegacyDefaultGate holds the legacy CUDA stream with a device-side wait. A failure path that skips release would block the stream. Check that RAII release runs before transport teardown on every exit path.
  • The 120-second watchdog releases the gate if the test hangs. Confirm that watchdog release fails the test, so a timeout does not pass silently.
  • The test treats unavailable NIXL backends as failures. This makes the test stricter on machines without NIXL. Confirm that the CI environment that runs this target provides NIXL.
  • The test migrates coverage from the removed Python bounce transport to the C++ agent bounce path, selected by kv_cache_bounce_size_mb. Confirm that no Python-side bounce coverage is still needed.

QA Engineer Review

Test files changed:

  • cpp/tests/unit_tests/executor/bounce/bounceTransportTest.cpp (added, +170 lines)
  • cpp/tests/unit_tests/executor/bounce/CMakeLists.txt (modified, +1 line)

Test functions and IDs:

  • New parameterized test RoundTripSettlesWhileUnrelatedLegacyWorkIsPending, with cases /32 and /19 (descriptor sizes in bytes).
  • The H100 CTest log for the test target test_unit_tests[executor_bounce-90] reports both cases as passed without skips. That log refers to test-source head 5cd905425dc5.
  • No test-db or qa list changes appear in the diff. Membership of the new cases in tests/integration/test_lists/test-db/ is not established from the changed files.

Behavior covered:

  • Gather and scatter of the KV bounce path, for aligned and unaligned payloads.
  • Byte-exact readback through an independent nonblocking stream.
  • Terminal transfer completion while unrelated work stays pending on the legacy default stream.
  • Failure when the watchdog fires or when NIXL backends are unavailable.

Coverage verdict: needs follow-up. Passing H100 evidence exists for the test-source head. CI status corrected on 2026-11-20: complete CI for unchanged current head 7e5357e09a2a passed L0 #69994 and its required blossom-ci check. The earlier per-case H100 evidence remains as described above; this status update does not add a new per-case runtime claim. No local GPU runtime pass is claimed.

Per-file QA perspective:

  • bounceTransportTest.cpp: Covers the C++ bounce round trip with legacy-stream ordering. Confirm the two cases pass on the current head.
  • CMakeLists.txt: Adds the CUDA::cuda_driver link to the bounce test target. Confirm that the target still builds in CUDA-enabled configurations.

Merge current main and exercise real C++ gather, NIXL transfer, scatter and terminal settlement while unrelated legacy-default-stream work remains pending. Remove the obsolete Python transport test and its CI entries; the C++ target runs in the existing H100 executor_bounce group.

Signed-off-by: Ruodi Lu <[email protected]>
@ruodil ruodil changed the title [None][test] Guard Python KV bounce stream independence [None][test] Guard C++ KV bounce stream independence Nov 6, 2026
@ruodil

ruodil commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Migrated the obsolete Python bounce test to the current C++ NIXL bounce transport after the Python implementation was removed. The two cases check aligned/unaligned gather, scatter, terminal settlement and independent readback while unrelated legacy-default-stream work remains pending. Existing H100 executor_bounce-90 coverage runs these cases in H100_PCIe-CPP-1. Local static checks and independent source review passed; CUDA build and GPU runtime verification remain pending, so this stays Draft.

@ruodil

ruodil commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82934 [ run ] triggered by Bot. Commit: 6ad34a5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #82934 [ run ] completed with state SUCCESS. Commit: 6ad34a5
/LLM/main/L0_MergeRequest_PR pipeline #68494 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@ruodil

ruodil commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Current head: 9d84242ad134, merging upstream main at 2d5b1fb68fee. The merge includes the already-approved upstream MBART dependency waiver from #21771 (NVBug 7054722). The underlying SentencePiece version cap #21790 is still open. This PR does not add or edit a waiver or dependency pin. A fresh standard L0 run is requested below; current-head L0 success is pending.

Both bounce/CMake PR files are unchanged by the merge. The preceding pipeline reported the H100 wrapper passed but failed on the same external MBART dependency issue as #19122. Draft is retained pending confirmed per-case GPU results.

@ruodil

ruodil commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #83318 [ run ] triggered by Bot. Commit: 9d84242 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #83318 [ run ] completed with state FAILURE. Commit: 9d84242
/LLM/main/L0_MergeRequest_PR pipeline #68858 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@ruodil

ruodil commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to 5cd905425dc5 with upstream main 6fc7f47a322d, including #21876, which fixes the Qwen3.5-VL collection error that blocked L0 #68858. Both PR files are unchanged by the merge; selected-file pre-commit, whitespace and the corrected loader import checks pass. Requesting a fresh standard L0 run on this head. Draft stays in place pending non-skipped H100 results for the two added C++ cases.

@ruodil

ruodil commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #83595 [ run ] triggered by Bot. Commit: 5cd9054 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #83595 [ run ] completed with state SUCCESS. Commit: 5cd9054
/LLM/main/L0_MergeRequest_PR pipeline #69109 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@ruodil

ruodil commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

CI follow-up: current-head L0 #69109 failed outside this PR's changed files. The failure analysis identifies B200 test_graph_captured_while_the_window_fills[trtllm-4] in VisualGen as the root failure, with remaining aborted stages attributed to fail-fast. It explicitly records H100 test_unit_tests[executor_bounce-90] as PASSED. This is an unrelated test failure, not a confirmed infrastructure failure; no waiver or unrelated source change is added. Requesting one standard rerun to establish whether it reproduces and complete current-head CI. Draft remains pending complete validation and review.

@ruodil

ruodil commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #83939 [ run ] triggered by Bot. Commit: 5cd9054 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #83939 [ run ] completed with state SUCCESS. Commit: 5cd9054
/LLM/main/L0_MergeRequest_PR pipeline #69429 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@ruodil

ruodil commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to 7e5357e09a2a with upstream #21994, fixing the deterministic SimpleNamespace.guided_failures fixture failures in L0 #69429. Both PR files are unchanged by the main merge. The raw H100 CTest output from #69109 now proves both new cases /32 and /19 passed without skips at the same original PR head 5cd905425dc5 (1.55 s / 1.53 s). The latest #69429 H100 stage was skipped, so it is not new runtime evidence. Local selected-file checks and independent merge review passed. Requesting one current-head standard CI run; Draft remains while full CI and review are outstanding.

@ruodil

ruodil commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@ruodil
ruodil marked this pull request as ready for review November 12, 2026 01:22
@ruodil
ruodil requested a review from a team as a code owner November 12, 2026 01:22
@ruodil

ruodil commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator Author

Both new H100 bounce cases now have verified non-skipped execution at the unchanged PR test sources (raw #69109 CTest log linked above). This satisfies the original Draft runtime-evidence condition, so I have marked the PR ready for Code Owner review while the new-head standard CI run proceeds. No required review or CI check is bypassed.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The bounce transport test adds a legacy-stream gate and checks that parameterized transfers complete with byte-exact payloads while unrelated work remains pending. The test links against CUDA::cuda_driver.

Changes

Bounce transport test

Layer / File(s) Summary
Gated transfer and payload checks
cpp/tests/unit_tests/executor/bounce/bounceTransportTest.cpp, cpp/tests/unit_tests/executor/bounce/CMakeLists.txt
The test adds a LegacyDefaultGate with a 120-second watchdog, warms up the sender and receiver, then checks transfers for 32-byte and 19-byte descriptors. It verifies byte-exact payloads while the gate remains pending. Missing CUDA devices skip the test; unavailable NIXL agents fail it. The test target links against CUDA::cuda_driver.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 7e535

This PR adds regression coverage for C++ bounce transfers while unrelated legacy-stream work is pending, with no production code changes. No actionable merge-blocking risk remains beyond the pending standard CI run.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title follows the repository template: a [None] ticket tag, a [test] type, and a concise summary. It names the main change, a regression test that guards C++ KV bounce stream independence. The cha…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template in structure. It has a Description section that explains the regression test, a Validation section that records local pre-commit checks and CI evidence,…
Full details: Title check

Explanation

The title follows the repository template: a [None] ticket tag, a [test] type, and a concise summary. It names the main change, a regression test that guards C++ KV bounce stream independence. The changeset adds that test and links the test target to CUDA::cuda_driver, which matches the title.

Full details: Description check

Explanation

The description follows the repository template in structure. It has a Description section that explains the regression test, a Validation section that records local pre-commit checks and CI evidence, and a checklist entry marked complete. It gives the test coverage in substance, though the template's Test Coverage heading is not used as a separate section. The description also includes a long CI status history that is not needed for the template. The core required information is present: what the change does, why it exists, and how it was validated.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 762a8dc and 7e5357e.

Files selected for processing: 2

  • cpp/tests/unit_tests/executor/bounce/CMakeLists.txt
  • cpp/tests/unit_tests/executor/bounce/bounceTransportTest.cpp

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84301 [ run ] triggered by Bot. Commit: 7e5357e Link to invocation

@ruodil

ruodil commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

CI follow-up (2026-11-13): the pending check is bot #84301 waiting on L0 #69710 at 7e5357e09a2a. Both x86 and SBSA test stages finished SUCCESS by 2026-11-12 06:16 UTC, but the orchestrator never finalized; its last log records Cannot contact ... java.lang.InterruptedException at 09:11 UTC and it remains building more than 23 hours after start. This is a stalled CI orchestrator, not a new test failure. Requesting one standard /bot run to restart through the normal bot path, which handles this PR's previous jobs. Source and required Code Owner review are unchanged; aggregate stage success is not a final CI pass.

@ruodil

ruodil commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84606 [ run ] triggered by Bot. Commit: 7e5357e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84301 [ run ] completed with state ABORTED. Commit: 7e5357e

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84606 [ run ] completed with state SUCCESS. Commit: 7e5357e
/LLM/main/L0_MergeRequest_PR pipeline #69994 completed with status: 'SUCCESS'

CI Report

Link to invocation

@ruodil
ruodil enabled auto-merge (squash) November 23, 2026 03:27
@ruodil
ruodil merged commit 30f437e into NVIDIA:main Nov 23, 2026
8 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.

3 participants