Skip to content

[https://nvbugs/6465993][fix] use attention cache dtype for disaggregated transfer#16505

Merged
chienchunhung merged 4 commits into
NVIDIA:mainfrom
chienchunhung:codex/nvbug-6465993-unwaive-tests
Jul 25, 2026
Merged

[https://nvbugs/6465993][fix] use attention cache dtype for disaggregated transfer#16505
chienchunhung merged 4 commits into
NVIDIA:mainfrom
chienchunhung:codex/nvbug-6465993-unwaive-tests

Conversation

@chienchunhung

@chienchunhung chienchunhung commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix disaggregated KV-cache transport for hybrid recurrent/attention models and remove the three NVBug 6465993 Nemotron 3 Super waivers.

Root cause

CppMambaHybridCacheManager keeps separate HALF recurrent-state and FP8 attention KV pools. CacheTransBufferManager selected its wire dtype and size through layer-indexed getPrimaryPool(0), which resolved to the recurrent pool while CacheFormatter transferred attention blocks. The resulting HALF transport buffer versus FP8 payload mismatch failed on the first request and surfaced as a timeout. Controls reproduced the failure with session reuse disabled and with the worker monitor bypassed, ruling both out.

Regression history

  • The layer-0 transport-pool assumption predated heterogeneous hybrid cache pools and remained dormant while all pools effectively used the same dtype.
  • #15777 added pytest MPI session reuse before the mixed-pool change; disabling reuse still reproduced the failure, so it did not create the mismatch.
  • #16304 correctly enabled recurrent-state and attention pools to use their actual distinct dtypes, exposing the dormant transport bug. Its CI runs #47492 and #47584 did not dispatch the affected x86 multi-GPU B200 stages, so the regression was not exercised on that PR.
  • #16338's worker-monitor changes landed shortly afterward, but bypassing the monitor did not prevent the timeout.
  • Full CI #48086 on #16444 first exercised all three affected stages and exposed the timeouts. #16495 then added the three NVBug 6465993 waivers, causing later runs to skip them until this PR removed the waivers.

Fix

  • Select payload pools from the actual BlockManager pools, excluding block-scale and indexer pools.
  • Prefer attention-pool dtype and geometry, skip recurrent layers handled by the RNN transfer path, and retain a pure-recurrent fallback.
  • Reject mixed attention-pool dtypes and make the formatter use the transfer manager's selected dtype.
  • Add hybrid-cache regression coverage and remove all three NVBug 6465993 waivers.

Verification

  • Local formatting, conflict, duplicate-waiver, and AST test-list validation passed; iterative TRT-LLM self-review has no remaining findings.
  • All three formerly waived tests passed on fixed commit f0f316bd:
    • test_ctx_dp2_gen_tp4 — passed in DGX_B200-8_GPUs-PyTorch-1 (#48500).
    • test_auto_dtype[mtp_nextn=0-block_reuse=False-use_py_transceiver=False] — passed in DGX_B200-8_GPUs-PyTorch-2 (#48500).
    • test_auto_dtype[mtp_nextn=3-block_reuse=True-use_py_transceiver=False] — passed in DGX_B200-8_GPUs-PyTorch-4 (#48486); it also passed independently on the preceding fixed head in #48476.
  • Full CI #48529 succeeded on f0f316bd.
  • Rebasing preserved the two PR patches without semantic changes; the current head is 94ce31a9. Subsequent full runs did not reach the B200 multi-GPU coverage: #48566 was blocked by the upstream DSpark regression repaired in #16579, while #48717 and #48756 were blocked by unrelated CI/baseline instability before multi-GPU dispatch. No reported failure implicated this PR's code.

Dev Engineer Review

  • KV-cache transport fix (disaggregated hybrid recurrent/attention): Updated CacheTransBufferManager to derive the wire/transfer DataType from actual KV-cache pool metadata (preferring attention-pool dtype when present, enforcing consistent attention-pool dtype, and using indexer-K pool dtype when transferIndexerKCache is enabled).
  • Dtype selection alignment (formatter ⇄ transfer manager): Updated CacheFormatter::unformat to allocate its temporary receive buffer using mCacheTransBufferManager->getDataType() rather than deriving dtype from the source cache’s pool-0.
  • Geometry/sizing correctness: In CacheTransBufferManager::computeTransferBufferSize, corrected non-indexer-K sizing to compute the byte-per-token-per-layer term per layer from that layer’s pool primary dimensions (instead of using a single pool-0-derived value). Indexer-K sizing behavior remains indexer-K dimension-based.
  • Attention-pool aware handling: Added logic to detect whether attention-cache pools exist and use that to gate certain linear-attention window skipping behavior.
  • Error handling / guards: Strengthened construction-time validation so CacheTransBufferManager throws tensorrt_llm::common::TllmException when eligible attention-pool dtypes are mixed.
  • API consistency: Added CacheTransBufferManager::getDataType() accessor to expose the selected transfer dtype for downstream buffer allocations.

QA Engineer Review

  • Test changes (unit tests):
    • Added: TEST_F(KVCacheManagerTest, HybridDisaggUsesAttentionPoolDtype)
      • Verifies hybrid disaggregated behavior where recurrent window dtype (FP16) differs from attention window dtype (FP8), and asserts the transfer wire dtype comes from the attention pool (CacheTransBufferManager::getDataType(), getSendBuffer(...), and consistent buffer index handling via freeBufferIndexForSend).
    • Updated: TEST_F(KVCacheManagerTest, VswaDisaggDtypeMismatchTriggersGuard)
      • Expanded the eligible-pool scan to detect mixed per-window dtypes (excluding block-scale and indexer-K cache pools) and assert constructor-time exception on mismatch.
  • Coverage via tests/integration/test_lists/:
    • Modified: tests/integration/test_lists/waives.txt
      • Kept only accuracy/test_disaggregated_serving.py::TestNemotron3Super120B::test_auto_dtype[mtp_nextn=0-block_reuse=False-use_py_transceiver=True] (nvbugs/6478726)
      • Removed other waived test_auto_dtype variants for TestNemotron3Super120B (including the use_py_transceiver=False and mtp_nextn=3-block_reuse=True-use_py_transceiver=False cases) and removed the separate accuracy/test_disaggregated_serving.py::TestNemotron3Super120B::test_ctx_dp2_gen_tp4 waive entry (all tied to nvbugs/6465993).
  • Verdict: needs follow-up.

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "DGX_B200-8_GPUs-PyTorch-1, DGX_B200-8_GPUs-PyTorch-2, DGX_B200-8_GPUs-PyTorch-4"

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "DGX_B200-8_GPUs-PyTorch-1, DGX_B200-8_GPUs-PyTorch-2, DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59749 [ run ] triggered by Bot. Commit: 8c2dec6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59749 [ run ] completed with state SUCCESS. Commit: 8c2dec6
/LLM/main/L0_MergeRequest_PR pipeline #48175 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59836 [ run ] triggered by Bot. Commit: 307cc47 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59836 [ run ] completed with state FAILURE. Commit: 307cc47
/LLM/main/L0_MergeRequest_PR pipeline #48243 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59852 [ run ] triggered by Bot. Commit: 307cc47 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59852 [ run ] completed with state SUCCESS. Commit: 307cc47
/LLM/main/L0_MergeRequest_PR pipeline #48257 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59892 [ run ] triggered by Bot. Commit: 88956d5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59892 [ run ] completed with state SUCCESS. Commit: 88956d5
/LLM/main/L0_MergeRequest_PR pipeline #48293 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60003 [ run ] triggered by Bot. Commit: ae69749 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60003 [ run ] completed with state FAILURE. Commit: ae69749
/LLM/main/L0_MergeRequest_PR pipeline #48394 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60022 [ run ] triggered by Bot. Commit: 2c060e6 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60022 [ run ] completed with state FAILURE. Commit: 2c060e6
/LLM/main/L0_MergeRequest_PR pipeline #48412 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60066 [ run ] triggered by Bot. Commit: 51ff2ca Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60066 [ run ] completed with state SUCCESS. Commit: 51ff2ca
/LLM/main/L0_MergeRequest_PR pipeline #48454 (Partly Tested) 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

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60081 [ run ] triggered by Bot. Commit: 80ef153 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60081 [ run ] completed with state SUCCESS. Commit: 80ef153
/LLM/main/L0_MergeRequest_PR pipeline #48468 (Partly Tested) 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --disable-reuse-test --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60089 [ run ] triggered by Bot. Commit: 0a00237 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #60089 [ run ] completed with state SUCCESS. Commit: 0a00237
/LLM/main/L0_MergeRequest_PR pipeline #48476 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast --stage-list "DGX_B200-8_GPUs-PyTorch-4"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61111 [ run ] triggered by Bot. Commit: fc9cd30 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61111 [ run ] completed with state SUCCESS. Commit: fc9cd30
/LLM/main/L0_MergeRequest_PR pipeline #49365 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

@xinhe-nv

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@xinhe-nv

Copy link
Copy Markdown
Collaborator

/bot run --only-qa-verify test accuracy/test_disaggregated_serving.py::TestNemotron3Super120B::test_ctx_dp2_gen_tp4

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61143 [ run ] triggered by Bot. Commit: aa0df8c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61143 [ run ] completed with state FAILURE. Commit: aa0df8c
LLM_FUNCTION_AUTO_V2C #315 completed with status: 'UNSTABLE'
QA verify test: accuracy/test_disaggregated_serving.py::TestNemotron3Super120B::test_ctx_dp2_gen_tp4 (NVBug 6465993, branch codex/nvbug-6465993-unwaive-tests, fork chienchunhung, dry_run_close=true)

Link to invocation

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61178 [ run ] triggered by Bot. Commit: cc173b3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61311 [ run ] triggered by Bot. Commit: cc173b3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61394 [ run ] triggered by Bot. Commit: cc173b3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61394 [ run ] completed with state SUCCESS. Commit: cc173b3
/LLM/main/L0_MergeRequest_PR pipeline #49621 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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61597 [ run ] triggered by Bot. Commit: cc173b3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61623 [ run ] triggered by Bot. Commit: cc173b3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

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

@chienchunhung

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61661 [ run ] triggered by Bot. Commit: cc173b3 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #61661 [ run ] completed with state SUCCESS. Commit: cc173b3
/LLM/main/L0_MergeRequest_PR pipeline #49867 completed with status: 'SUCCESS'

CI Report

Link to invocation

@chienchunhung
chienchunhung disabled auto-merge July 25, 2026 05:27
@chienchunhung
chienchunhung merged commit cf44a1c into NVIDIA:main Jul 25, 2026
10 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.

8 participants