Skip to content

Conversation

@bo-nv
Copy link
Collaborator

@bo-nv bo-nv commented Sep 18, 2025

Summary by CodeRabbit

  • New Features
    • Introduced a separate pre-transfer sync notification, allowing sync messages to be sent before initiating a transfer for clearer sequencing and control.
  • Refactor
    • Transfer requests no longer embed sync messages; transfers are now created without a sync payload. Integrations should update call flows to send sync notifications prior to transfer.
  • Tests
    • Updated unit tests to reflect the new sync workflow while maintaining validation of transfer status, notified sync messages, and memory verification.

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@bo-nv bo-nv requested a review from Shixiaowei02 September 18, 2025 02:11
@bo-nv bo-nv self-assigned this Sep 18, 2025
@bo-nv bo-nv requested a review from a team as a code owner September 18, 2025 02:11
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 18, 2025

📝 Walkthrough

Walkthrough

Tests were updated to send sync messages via BaseTransferAgent::notifySyncMessage before creating TransferRequest. TransferRequest no longer carries a syncMessage parameter. Public API changes include a new notifySyncMessage method and a reduced-arity TransferRequest constructor.

Changes

Cohort / File(s) Summary
Unit tests: sync message flow
cpp/tests/unit_tests/executor/transferAgentTest.cpp
Updated SyncMessage test to call notifySyncMessage twice before transfer; constructs TransferRequest with 4-arg ctor (without syncMessage); keeps existing validation (status wait, NotifiedSyncMessages check, memory verification).
Executor public API
tensorrt_llm/executor/transferAgent.h
TransferRequest constructor signature changed: removed syncMessage parameter. Added BaseTransferAgent::notifySyncMessage(const std::string&, const std::string&) public API.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Test as Test/Caller
  participant Src as SourceAgent
  participant Dst as TargetAgent

  Note over Test,SRC: New sync delivery flow
  Test->>Src: notifySyncMessage(remote=Dst, syncMessage)
  Src-->>Dst: Deliver syncMessage
  Dst-->>Src: Ack (implicit/handled)

  Note over Test,SRC: Transfer without embedded sync
  Test->>Src: TransferRequest(op, srcDesc, dstDesc, agent)  // 4-arg ctor
  Src->>Dst: Initiate transfer
  Dst-->>Src: Transfer status/result
  Src-->>Test: Completion/status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description contains only the repository template and placeholder scaffold with no concrete Description, Test Coverage, or explanation of the revert, so reviewers cannot understand the intent or validate test coverage. Required template sections are present but empty, making the description largely incomplete and non-actionable. Therefore the PR description fails to meet the repository's template requirements. Replace the placeholder template with a concise summary of what changed and why (explicitly reference PR #6250 if this is a revert), list the tests that cover the change and any CI instructions, and fill the Description and Test Coverage sections per the repository template so reviewers can evaluate the change.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "[None][chore] revert pr6250" follows the repo template but is ambiguous relative to the changes in the diff: the patch shows API changes (TransferRequest constructor change and added notifySyncMessage) rather than an explicit description of a revert. Without confirmation that this PR actually reverts PR #6250, the title does not clearly summarize the primary change for reviewers. Clarify whether this PR is intended to revert PR #6250; if so, update the title to state the revert plus a brief note of what was reverted, otherwise change the title to concisely describe the primary code change (for example: "[None][chore] Restore notifySyncMessage usage and update TransferRequest signature").
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bo-nv
Copy link
Collaborator Author

bo-nv commented Sep 18, 2025

/bot run

@bo-nv bo-nv requested review from chuangz0 and chzblych September 18, 2025 02:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cpp/tests/unit_tests/executor/transferAgentTest.cpp (1)

299-304: Wrong agent/descriptor in checkRemoteDescs; can spin forever

Here agent0 checks agent1 for a descriptor that belongs to agent0. For the subsequent write from agent1→agent0, agent1 must verify agent0’s descriptors.

Apply this fix:

-    bool checked2 = false;
-    do
-    {
-        checked2 = nixlAgent0->checkRemoteDescs(agent1, regMem1.getDescs());
-    } while (!checked2);
+    bool checked2 = false;
+    do
+    {
+        // agent1 must see agent0's descriptors before agent1 submits the write
+        checked2 = nixlAgent1->checkRemoteDescs(agent0, regMem1.getDescs());
+    } while (!checked2);
🧹 Nitpick comments (2)
cpp/tests/unit_tests/executor/transferAgentTest.cpp (2)

263-266: Avoid hot spin while polling for notifications

These tight loops can peg a core if notifications are delayed. Add a tiny sleep/yield or a bounded timeout.

Apply a pattern like this (replicate for the other loops):

-    for (std::size_t i = 0; i < MAX_QUERY_TIMES && notif.size() == 0; i++)
-    {
-        notif = nixlAgent1->getNotifiedSyncMessages();
-    }
+    for (std::size_t i = 0; i < MAX_QUERY_TIMES && notif.empty(); ++i)
+    {
+        notif = nixlAgent1->getNotifiedSyncMessages();
+        std::this_thread::sleep_for(std::chrono::milliseconds(1));
+    }

Remember to include headers:

+#include <chrono>
+#include <thread>

Also applies to: 277-280, 291-294, 310-313, 330-333


231-231: Constant naming/style

Prefer repository style for constants: kMaxQueryTimes (or kMAX_QUERY_TIMES if you enforce full upper snake with k‑prefix).

-    constexpr std::size_t MAX_QUERY_TIMES = std::numeric_limits<size_t>::max();
+    constexpr std::size_t kMaxQueryTimes = std::numeric_limits<std::size_t>::max();
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f3e3ae and 8bc06a6.

📒 Files selected for processing (1)
  • cpp/tests/unit_tests/executor/transferAgentTest.cpp (2 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh}: Namespace closing braces must include a trailing comment with the namespace name (e.g., '} // namespace foo').
Prefer const or constexpr variables over #define for constants.
Declare variables that are not modified after initialization as const.
Avoid magic literals in code; except for 0, nullptr, true, false. Use named constants for comparisons and logic.
Use Allman brace style for formatting.
Place the semicolon of an empty for/while loop on a new line.
Bodies of switch/while/do-while/for must be compound statements (brace-delimited), and if/else must always be followed by brace-delimited statements.
Type names (e.g., classes) must be CamelCase starting with an uppercase letter (e.g., FooBar).
Local variables, methods, and namespaces use lowerCamelCase (e.g., localFooBar).
Non-magic-number global variables that are non-static and not in an anonymous namespace must be lowerCamelCase prefixed with 'g' (e.g., gDontUseGlobalFoos).
Non-magic-number globals that are static or in an anonymous namespace use lowerCamelCase prefixed with 's' (e.g., sMutableStaticGlobal).
Locally visible static variables use lowerCamelCase with 's' prefix (e.g., static std::once_flag sFlag).
Private/protected member variables use 'm' prefix with CamelCase (e.g., mNbFooValues). Public members may omit, but 'm' is encouraged for clarity.
Constants (enums, global constants, static constants, and function-scope magic/literal constants) use uppercase SNAKE_CASE with 'k' prefix (e.g., kDIGIT_NUM).
Function-scope constants that are not magic numbers or literals are named like non-constant variables (e.g., bool const pass = a && b).
If macros are necessary, name them in UPPER_SNAKE_CASE (e.g., FOO_VERSION) and prefer constants over #define.
Use LLVM clang-format; wrap lines at a maximum of 120 columns; use '// clang-format off/on' sparingly with justification.
Use smart pointers for heap allocations; prefer unique_ptr for sole ownership, shared_ptr for shared...

Files:

  • cpp/tests/unit_tests/executor/transferAgentTest.cpp
**/*.{cpp,cxx,cc,cu,h,hpp,hh,hxx,cuh}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

C++ filenames should be lowerCamelCase (first letter lowercase) and must be case-insensitive unique within a compilation target.

Files:

  • cpp/tests/unit_tests/executor/transferAgentTest.cpp
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Use only spaces, no tabs; indent with 4 spaces.

Files:

  • cpp/tests/unit_tests/executor/transferAgentTest.cpp
**/*.{h,hpp,hh,hxx,cpp,cxx,cc}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.{h,hpp,hh,hxx,cpp,cxx,cc}: Prefer anonymous namespaces over 'static' for internal linkage of functions.
All templates (class/function/member/static) must be instantiated at least once; non-POD classes should have private data members.

Files:

  • cpp/tests/unit_tests/executor/transferAgentTest.cpp
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

Prepend the NVIDIA Apache-2.0 copyright header with current year to the top of all source files (e.g., .cpp, .h, .cu, .py).

Files:

  • cpp/tests/unit_tests/executor/transferAgentTest.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check
🔇 Additional comments (2)
cpp/tests/unit_tests/executor/transferAgentTest.cpp (2)

258-260: notifySyncMessage + 4‑arg TransferRequest: correct new flow

Sending the sync message out-of-band before submitting the transfer aligns with the new API; constructor arity is used correctly.


306-308: Second notify-before-transfer sequence looks good (post-fix)

Once the remote‑desc check above is corrected, this notify + 4‑arg TransferRequest sequence is consistent with the new contract.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #19084 [ run ] triggered by Bot

@chzblych chzblych marked this pull request as draft September 18, 2025 02:31
@chzblych chzblych self-requested a review September 18, 2025 02:34
@bo-nv bo-nv closed this Sep 18, 2025
@tensorrt-cicd
Copy link
Collaborator

PR_Github #19084 [ run ] completed with state FAILURE
/LLM/release-1.0/L0_MergeRequest_PR pipeline #416 completed with status: 'ABORTED'

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