Skip to content

[None][fix] Filter empty aux buffers from NIXL transfers - #16993

Open
chuangz0 wants to merge 6 commits into
NVIDIA:mainfrom
chuangz0:fix/aux-buffer-transfer-filter
Open

[None][fix] Filter empty aux buffers from NIXL transfers#16993
chuangz0 wants to merge 6 commits into
NVIDIA:mainfrom
chuangz0:fix/aux-buffer-transfer-filter

Conversation

@chuangz0

@chuangz0 chuangz0 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Description

This builds on #16948 and keeps empty auxiliary buffers out of both NIXL memory registration and transfer requests.

When speculative decoding is disabled, the draft-token auxiliary tensor has zero elements and may expose a null data pointer. #16948 filters that tensor during registration, but the generation-first auxiliary transfer path still constructed a descriptor for it. NIXL requires every transfer descriptor to be covered by registered local and remote memory, so the remaining (address=0, size=0) descriptor could still make transfer request creation fail.

The change:

  • filters zero-sized auxiliary buffers from both registration and transfer descriptors;
  • rejects null pointers paired with non-zero sizes as malformed metadata;
  • verifies that destination auxiliary buffers exist and are large enough;
  • builds and caches the static auxiliary transfer layout when a peer registers;
  • refreshes the cached layout when that peer re-registers and removes it on unregister;
  • keeps the per-task hot path limited to source and destination slot-offset calculations;
  • adds coverage using real AuxBuffer instances with max_draft_len=0, mismatched peer layouts, and cache lifecycle checks.

User impact

Python-runtime disaggregated serving with NIXL/LIBFABRIC no longer submits an unregistered empty draft-token descriptor during generation-first auxiliary transfers. Incompatible speculative-decoding layouts fail during peer registration with a clear error instead of reaching the transfer backend.

Static layout validation is not repeated for each request. A local microbenchmark of the per-task pointer calculation measured approximately 1.05 microseconds per call, compared with approximately 9.6 microseconds when validation and filtering were performed on every task.

Validation

  • pre-commit run --files tensorrt_llm/_torch/disaggregation/native/auxiliary.py tensorrt_llm/_torch/disaggregation/native/peer.py tensorrt_llm/_torch/disaggregation/native/transfer.py tests/unittest/disaggregated/test_aux_buffer_registration.py tests/unittest/disaggregated/test_peer.py
  • PYTHONPATH=$PWD TRTLLM_TEST_PREFETCH_SESSION=0 TRTLLM_TEST_REUSE_SESSION=0 pytest -q tests/unittest/disaggregated/test_aux_buffer_registration.py tests/unittest/disaggregated/region/test_aux.py tests/unittest/disaggregated/test_rank_info.py tests/unittest/disaggregated/test_peer.py tests/unittest/disaggregated/test_pool_matching.py
    • 79 passed
  • focused per-task pointer-calculation microbenchmark
    • approximately 1.05 microseconds per call

Dev Engineer Review

  • Added a frozen, peer-scoped AuxTransferLayout and helper functions in tensorrt_llm/_torch/disaggregation/native/auxiliary.py:
    • get_non_empty_aux_indices() validates pointer/size descriptor shape matching, rejects negative sizes, rejects “null pointer with non-zero size”, and returns indices where size > 0.
    • build_aux_transfer_layout() constructs a validated layout for non-empty aux entries:
      • Verifies source/destination descriptor shapes match.
      • Ensures every non-empty source index has a non-empty destination buffer.
      • Enforces destination item sizes are not smaller than source item sizes for selected indices.
      • Restricts the layout to validated non-empty source indices and makes returned numpy arrays read-only.
  • Hardened AUX registration and transfer metadata generation:
    • In transfer.py, AUX DRAM descriptor registration for aux pointers is skipped when all aux entries are “real empty”.
    • _build_aux_write_meta now prefers a validated/cached AuxTransferLayout to compute AUX write metadata (source/destination ptrs and sizes) for non-empty indices, instead of using all slots.
  • Implemented peer lifecycle caching in tensorrt_llm/_torch/disaggregation/native/peer.py:
    • Caches AuxTransferLayout per peer key.
    • Clears cached entries on register() and removes them on unregister().
    • Provides get_aux_transfer_layout() and cache_aux_transfer_layout() APIs for transfer construction to reuse layouts.

QA Engineer Review

Test-list files modified

  • tests/integration/test_lists/test-db/l0_a10.yml
    • Added to pre_merge PyTorch unit tests: unittest/_torch/sampler/test_penalties.py
    • Added to pre_merge disaggregated unit tests: unittest/disaggregated/test_aux_buffer_registration.py
  • tests/integration/test_lists/test-db/l0_h100.yml
    • Added: unittest/_torch/speculative/test_sa_hybrid_state_promotion.py (pre_merge PyTorch speculative)
    • Added: unittest/disaggregated/test_aux_buffer_registration.py (pre_merge disaggregated)

Test code added/updated (files outside test lists)

  • tests/unittest/disaggregated/test_aux_buffer_registration.py
    • Added:
      • test_null_pointer_with_non_zero_size_is_rejected
      • test_zero_size_aux_buffer_is_skipped
      • test_real_empty_draft_buffer_is_skipped_during_registration
      • test_all_buffers_registered_when_none_are_empty
      • test_nothing_registered_when_every_buffer_is_empty
      • test_real_empty_draft_buffer_is_skipped_during_transfer
      • test_non_empty_source_requires_non_empty_destination
      • test_aux_layout_mismatch_is_checked_lazily_during_transfer
      • test_destination_aux_buffer_must_be_large_enough
    • Covered in test-db: yes (via l0_a10.yml and l0_h100.yml)
  • tests/unittest/disaggregated/test_peer.py
    • Updated/added coverage for peer auxiliary layout caching/invalidation (including re-registration behavior and context-first/asymmetric layout handling).
    • Covered in test-db / qa by the modified test lists in this PR: no indication.

Verdict: needs follow-up (new/updated test_peer.py cases are not confirmed by the test-db entries changed in this PR.)

@chuangz0
chuangz0 requested a review from qiaoxj07 July 29, 2026 05:57
@chuangz0
chuangz0 marked this pull request as ready for review July 29, 2026 05:57
@chuangz0
chuangz0 requested review from a team as code owners July 29, 2026 05:57
@chuangz0
chuangz0 force-pushed the fix/aux-buffer-transfer-filter branch from cd791e5 to ca61c38 Compare July 29, 2026 05:58
@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds validated auxiliary transfer layouts, peer-scoped layout caching, filtering of empty auxiliary buffers during registration and transfer metadata construction, and tests covering validation, caching, registration, and integration execution.

Changes

Auxiliary transfer handling

Layer / File(s) Summary
Auxiliary layout validation and construction
tensorrt_llm/_torch/disaggregation/native/auxiliary.py, tests/unittest/disaggregated/test_aux_buffer_registration.py
Adds immutable layouts, validates auxiliary pointer and size descriptors, checks source/destination compatibility, and tests empty, invalid, and undersized buffers.
Peer layout caching
tensorrt_llm/_torch/disaggregation/native/peer.py, tests/unittest/disaggregated/test_peer.py
Stores, retrieves, caches, and invalidates auxiliary transfer layouts during peer registration lifecycle changes.
Filtered registration and transfer metadata
tensorrt_llm/_torch/disaggregation/native/transfer.py, tests/unittest/disaggregated/test_aux_buffer_registration.py, tests/integration/test_lists/test-db/l0_a10.yml, tests/integration/test_lists/test-db/l0_h100.yml
Uses layouts for auxiliary write metadata, skips empty buffers during registration, and adds the tests to A10 and H100 test lists.

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

Sequence Diagram(s)

sequenceDiagram
  participant TransferWorker
  participant PeerRegistrar
  participant build_aux_transfer_layout
  TransferWorker->>PeerRegistrar: request cached auxiliary transfer layout
  TransferWorker->>build_aux_transfer_layout: build layout when cache is empty
  build_aux_transfer_layout-->>TransferWorker: return validated non-empty pointers and sizes
  TransferWorker->>TransferWorker: build write metadata and register non-empty buffers
Loading

Suggested reviewers: brnguyen2, schetlur-nv, reasonsolo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.24% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR’s main change and follows the repository’s required [None][fix] format.
Description check ✅ Passed The description explains the problem, solution, impact, and validation clearly, with only the template’s Test Coverage section not explicitly named.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62439 [ run ] triggered by Bot. Commit: ca61c38 Link to invocation

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
tensorrt_llm/_torch/disaggregation/native/auxiliary.py (1)

37-45: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Consider making AuxTransferLayout arrays read-only.

@dataclass(frozen=True) only blocks attribute reassignment; the underlying numpy arrays are still mutable in-place. Since this layout is cached and shared across concurrent transfer calls to the same peer (see peer.py's _aux_transfer_layout_cache and the is-identity test in test_peer.py), an accidental in-place write anywhere downstream would silently corrupt every subsequent transfer using this cached object.

♻️ Suggested hardening
     return AuxTransferLayout(
-        src_base_ptrs=src_meta.ptrs[src_indices],
-        dst_base_ptrs=dst_meta.ptrs[src_indices],
-        src_item_sizes=src_item_sizes[src_indices],
-        dst_item_sizes=dst_item_sizes[src_indices],
+        src_base_ptrs=_readonly(src_meta.ptrs[src_indices]),
+        dst_base_ptrs=_readonly(dst_meta.ptrs[src_indices]),
+        src_item_sizes=_readonly(src_item_sizes[src_indices]),
+        dst_item_sizes=_readonly(dst_item_sizes[src_indices]),
     )

where _readonly sets arr.flags.writeable = False and returns arr.

Also applies to: 98-103

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/disaggregation/native/auxiliary.py` around lines 37 - 45,
Make the NumPy arrays stored by AuxTransferLayout read-only at construction
time, not merely protected from attribute reassignment by frozen dataclass
semantics. Apply the existing _readonly helper to src_base_ptrs, dst_base_ptrs,
src_item_sizes, and dst_item_sizes while preserving the cached object’s identity
and shared-transfer behavior.
tests/unittest/disaggregated/test_aux_buffer_registration.py (1)

1-161: 🧹 Nitpick | 🔵 Trivial

Test coverage summary.

  • Added test functions: test_null_pointer_with_non_zero_size_is_rejected, test_zero_size_aux_buffer_is_skipped, test_real_empty_draft_buffer_is_skipped_during_registration, test_all_buffers_registered_when_none_are_empty, test_nothing_registered_when_every_buffer_is_empty, test_real_empty_draft_buffer_is_skipped_during_transfer, test_non_empty_source_requires_non_empty_destination, test_destination_aux_buffer_must_be_large_enough.
  • Listed in test lists: confirmed present in both tests/integration/test_lists/test-db/l0_a10.yml and tests/integration/test_lists/test-db/l0_h100.yml.
  • Coverage verdict: sufficient — validation errors (null pointer, missing/undersized destination), empty-buffer filtering during both registration and transfer, and the "all empty"/"all non-empty" boundary cases are all exercised, and error messages/indices are asserted precisely against the implementation.
  • Minor gap (not blocking): _build_aux_write_meta tests fix task._slot=0/peer_slot=0, so the per-slot pointer offset (base_ptr + item_size * slot) is never exercised at a non-zero slot.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unittest/disaggregated/test_aux_buffer_registration.py` around lines 1
- 161, Add coverage for non-zero slot pointer offsets in the auxiliary transfer
path. Update `_build_aux_write_meta` or add a focused test using a task/peer
slot greater than zero, then assert `src_ptrs` and `dst_ptrs` include the
expected per-slot offset while preserving existing empty-buffer behavior.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tensorrt_llm/_torch/disaggregation/native/auxiliary.py`:
- Around line 37-45: Make the NumPy arrays stored by AuxTransferLayout read-only
at construction time, not merely protected from attribute reassignment by frozen
dataclass semantics. Apply the existing _readonly helper to src_base_ptrs,
dst_base_ptrs, src_item_sizes, and dst_item_sizes while preserving the cached
object’s identity and shared-transfer behavior.

In `@tests/unittest/disaggregated/test_aux_buffer_registration.py`:
- Around line 1-161: Add coverage for non-zero slot pointer offsets in the
auxiliary transfer path. Update `_build_aux_write_meta` or add a focused test
using a task/peer slot greater than zero, then assert `src_ptrs` and `dst_ptrs`
include the expected per-slot offset while preserving existing empty-buffer
behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 159841ad-2e72-4870-b8bc-73faaba4560e

📥 Commits

Reviewing files that changed from the base of the PR and between 9d508eb and ca61c38.

📒 Files selected for processing (7)
  • tensorrt_llm/_torch/disaggregation/native/auxiliary.py
  • tensorrt_llm/_torch/disaggregation/native/peer.py
  • tensorrt_llm/_torch/disaggregation/native/transfer.py
  • tests/integration/test_lists/test-db/l0_a10.yml
  • tests/integration/test_lists/test-db/l0_h100.yml
  • tests/unittest/disaggregated/test_aux_buffer_registration.py
  • tests/unittest/disaggregated/test_peer.py

Comment thread tensorrt_llm/_torch/disaggregation/native/peer.py Outdated
Comment thread tensorrt_llm/_torch/disaggregation/native/peer.py Outdated
Comment thread tensorrt_llm/_torch/disaggregation/native/peer.py Outdated
Comment thread tests/unittest/disaggregated/test_aux_buffer_registration.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/_torch/disaggregation/native/peer.py`:
- Around line 76-78: The peer registration, unregistration, and auxiliary-layout
cache lifecycle are not synchronized, allowing stale layouts or layouts for
unregistered peers to be published. Update the relevant register/unregister
methods and cache_aux_transfer_layout to share one lock or enforce a peer
identity/generation check across layout construction and publication, ensuring
only layouts for the currently registered peer are cached and transfers cannot
combine mismatched RankInfo and pointers. Add a concurrent peer-replacement test
covering these paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f2286e4c-a298-4ed0-8f26-e7654575bad2

📥 Commits

Reviewing files that changed from the base of the PR and between ca61c38 and dc99aaa.

📒 Files selected for processing (5)
  • tensorrt_llm/_torch/disaggregation/native/auxiliary.py
  • tensorrt_llm/_torch/disaggregation/native/peer.py
  • tensorrt_llm/_torch/disaggregation/native/transfer.py
  • tests/unittest/disaggregated/test_aux_buffer_registration.py
  • tests/unittest/disaggregated/test_peer.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • tests/unittest/disaggregated/test_peer.py
  • tests/unittest/disaggregated/test_aux_buffer_registration.py
  • tensorrt_llm/_torch/disaggregation/native/transfer.py
  • tensorrt_llm/_torch/disaggregation/native/auxiliary.py

Comment thread tensorrt_llm/_torch/disaggregation/native/peer.py
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62439 [ run ] completed with state FAILURE. Commit: ca61c38
/LLM/main/L0_MergeRequest_PR pipeline #50594 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

@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62478 [ run ] triggered by Bot. Commit: dc99aaa Link to invocation

@BowenFu

BowenFu commented Jul 29, 2026

Copy link
Copy Markdown

The empty-buffer filtering itself checks out — with a non-empty aux buffer the descriptor list is byte-identical to before (same order, dtype, shape), and registration emits the same aux_buffer_ptr_{i} names.

The layout cache is the problem. _build_aux_write_meta does read → build → cache as three unsynchronized steps on the dispatch path, while PeerRegistrar.register() pops the cache from the ZMQ listener thread:

  1. dispatch: get_aux_transfer_layout(peer)None
  2. dispatch: build_aux_transfer_layout(src_meta, peer_ri.aux_meta) using the old peer_ri
  3. listener: register() stores the new RankInfo and pops the cache key
  4. dispatch: cache_aux_transfer_layout(...) re-inserts the stale layout

The stale destination base pointers then persist for every later transfer to that peer, since nothing invalidates again until the next register/unregister. That is the same class of failure this PR is fixing — writes aimed at memory the peer no longer has registered. The GIL doesn't help; it's a multi-step sequence, not a single dict op.

Before the change this couldn't happen: _build_aux_write_meta re-derived peer_aux_meta from get_peer_rank_info() on every task, so a re-registration was picked up by the next task. The cache buys ~8.5µs/task and gives that up.

Simplest fix is to stamp the layout with the peer RankInfo identity it was built from and re-validate on read, or build it inside register() (which the description already says you do — the code builds it lazily on first transfer instead, as your own test_aux_layout_mismatch_is_checked_lazily_during_transfer name reflects; worth reconciling the description).

Two smaller things, not blocking:

  • _register_aux_buffer filters on aux_meta.size, build_aux_transfer_layout filters on item_sizes. They agree today, but they're two predicates for "is this buffer empty" — if they ever diverge you get back exactly the unregistered-descriptor bug. Worth using one.
  • sizes = layout.src_item_sizes hands the cached read-only array itself to WriteMeta rather than a copy, so it's shared across all concurrent tasks to that peer. Fine while it stays immutable, just noting it's aliased.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62478 [ run ] completed with state FAILURE. Commit: dc99aaa
/LLM/main/L0_MergeRequest_PR pipeline #50628 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

@chuangz0
chuangz0 force-pushed the fix/aux-buffer-transfer-filter branch from dc99aaa to dc86150 Compare July 30, 2026 03:47
@chuangz0

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1, GB200-8_GPUs-2_Nodes-PyTorch-2, DGX_B200-PyTorch-6, DGX_H100-PyTorch-4"

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
tensorrt_llm/_torch/disaggregation/native/peer.py (1)

134-142: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the new cache API.

Add Google-style docstrings for the peer-layout getter and cache writer, including the peer-key semantics and absent-layout return value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/disaggregation/native/peer.py` around lines 134 - 142,
Add Google-style docstrings to get_aux_transfer_layout and
cache_aux_transfer_layout describing the peer_name/peer_rank key semantics;
document that get_aux_transfer_layout returns None when no layout is cached, and
describe the layout stored by the writer.

Source: Coding guidelines

tensorrt_llm/_torch/disaggregation/native/auxiliary.py (1)

53-109: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the public layout helpers in Google style.

get_non_empty_aux_indices() and build_aux_transfer_layout() are imported by the transfer path, but their docstrings omit argument, return, and raised-error contracts. Document array shapes/dtypes and validation failures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/_torch/disaggregation/native/auxiliary.py` around lines 53 -
109, Expand the Google-style docstrings for get_non_empty_aux_indices() and
build_aux_transfer_layout() with Args, Returns, and Raises sections. Document
the expected array shapes and relevant dtypes, the returned index/layout values,
and each validation failure raised for mismatched shapes, negative sizes, null
non-empty pointers, layout mismatches, missing destination buffers, or
insufficient destination capacity.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tensorrt_llm/_torch/disaggregation/native/auxiliary.py`:
- Around line 53-109: Expand the Google-style docstrings for
get_non_empty_aux_indices() and build_aux_transfer_layout() with Args, Returns,
and Raises sections. Document the expected array shapes and relevant dtypes, the
returned index/layout values, and each validation failure raised for mismatched
shapes, negative sizes, null non-empty pointers, layout mismatches, missing
destination buffers, or insufficient destination capacity.

In `@tensorrt_llm/_torch/disaggregation/native/peer.py`:
- Around line 134-142: Add Google-style docstrings to get_aux_transfer_layout
and cache_aux_transfer_layout describing the peer_name/peer_rank key semantics;
document that get_aux_transfer_layout returns None when no layout is cached, and
describe the layout stored by the writer.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f01aebe2-0f5e-43cd-ad52-cb641fe32ce2

📥 Commits

Reviewing files that changed from the base of the PR and between dc99aaa and dc86150.

📒 Files selected for processing (7)
  • tensorrt_llm/_torch/disaggregation/native/auxiliary.py
  • tensorrt_llm/_torch/disaggregation/native/peer.py
  • tensorrt_llm/_torch/disaggregation/native/transfer.py
  • tests/integration/test_lists/test-db/l0_a10.yml
  • tests/integration/test_lists/test-db/l0_h100.yml
  • tests/unittest/disaggregated/test_aux_buffer_registration.py
  • tests/unittest/disaggregated/test_peer.py

@chuangz0

chuangz0 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63391 [ run ] triggered by Bot. Commit: 73afdec Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63391 [ run ] completed with state FAILURE. Commit: 73afdec
/LLM/main/L0_MergeRequest_PR pipeline #51369 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

@chuangz0

chuangz0 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63632 [ run ] triggered by Bot. Commit: bb23709 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63632 [ run ] completed with state FAILURE. Commit: bb23709
/LLM/main/L0_MergeRequest_PR pipeline #51586 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

@chuangz0
chuangz0 force-pushed the fix/aux-buffer-transfer-filter branch from bb23709 to 1433776 Compare August 4, 2026 08:52
@chuangz0
chuangz0 requested a review from a team as a code owner August 4, 2026 10:58
@chuangz0
chuangz0 requested a review from allisonlim-nv August 4, 2026 10:58
@chuangz0
chuangz0 force-pushed the fix/aux-buffer-transfer-filter branch from d05055e to 086b529 Compare August 4, 2026 10:58
@chuangz0

chuangz0 commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63742 [ run ] triggered by Bot. Commit: 086b529 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63742 [ run ] completed with state SUCCESS. Commit: 086b529
/LLM/main/L0_MergeRequest_PR pipeline #51693 completed with status: 'FAILURE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ 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

qiaoxj07 and others added 6 commits August 5, 2026 09:07
The draft-token aux buffer is allocated as torch.empty(max_slot_num,
max_draft_len), so with max_draft_len == 0 (the default when speculative
decoding is off) it has numel() == 0 and data_ptr() == 0.

_register_aux_buffer registered all four aux pointers unconditionally,
handing that null address to NIXL. The LIBFABRIC backend rejects it
outright -- libfabric_rail_manager.cpp `if (!buffer)` -> "Invalid buffer
parameter" -- which fails the entire registration and aborts transceiver
setup:

  Assertion failed: status == NIXL_SUCCESS (transferAgent.cpp)
    NixlTransferAgent::registerMemory(MemoryDescs const&)

UCX tolerates the null descriptor, so this only reproduced with
TRTLLM_NIXL_KVCACHE_BACKEND=LIBFABRIC. The C++ transceiver is unaffected
because it registers only the CacheTransBufferManager staging buffers.

Skip zero-pointer/zero-size buffers, and skip the registration entirely
when nothing is left. Empty buffers carry no data, so nothing is lost.

Verified on 2 nodes x 2 GPU over AWS EFA (16 rails): the
NIXL/PYTHON/LIBFABRIC case goes from TRANSFER_ERROR to PASS at
96.7 GB/s per GPU.

Signed-off-by: Xianjie <5410381+qiaoxj07@users.noreply.github.com>
Register the new test file in the l0_h100 and l0_a10 test lists -- without
an entry it is never executed by CI.

Give the null-pointer case a non-zero size so it fails if only zero-sized
buffers are filtered, and assert the surviving descriptors keep their
original indices (aux_buffer_ptr_0/2/3) rather than being renumbered.

Annotate the new functions, matching the convention in the neighbouring
disaggregated unit tests.

Baseline-fails check on 1.3.0rc22: 4/4 pass with the fix, 1/4 without it
(only the no-empty-buffers control passes).

Signed-off-by: Xianjie <5410381+qiaoxj07@users.noreply.github.com>
Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
@chuangz0
chuangz0 force-pushed the fix/aux-buffer-transfer-filter branch from 086b529 to 426c4f6 Compare August 5, 2026 01:07
@chuangz0

chuangz0 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "L40S-PyTorch-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63883 [ run ] triggered by Bot. Commit: 426c4f6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63883 [ run ] completed with state SUCCESS. Commit: 426c4f6
/LLM/main/L0_MergeRequest_PR pipeline #51823 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@chuangz0
chuangz0 requested a review from QiJune August 5, 2026 02:50
@chuangz0

chuangz0 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

/bot --help

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

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.

Details

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) --high-priority]

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. Supports wildcard * for pattern matching (e.g., "*PerfSanity*" matches all stages containing PerfSanity). Examples: "A10-PyTorch-1, xxx", "PerfSanity". The patterns "*", "*Post-Merge*", and "*PerfSanity*", including equivalent escaped or repeated-star forms and their use in comma-separated lists, require the ci: post-merge approved PR label. 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. Requires the ci: full pre-merge approved label on the PR (ask a member of NVIDIA/trt-llm-ci-approvers). 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. Requires the ci: full pre-merge approved label on the PR (ask a member of NVIDIA/trt-llm-ci-approvers).

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline. Requires the ci: post-merge approved PR label applied by an active member of NVIDIA/trt-llm-ci-approvers. The approval label remains in place when new commits are pushed.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Supports wildcard * for pattern matching. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx", --extra-stage "Post-Merge". The patterns "*", "*Post-Merge*", and "*PerfSanity*", including equivalent escaped or repeated-star forms and their use in comma-separated lists, require the ci: post-merge approved PR label.

--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.

--high-priority (OPTIONAL) : Run the pipeline with high priority. This option is restricted to authorized users only and will route the job to a high-priority queue.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants