Skip to content

[None][perf] Port remaining DeepSeek V4 optimizations to main#16028

Merged
longlee0622 merged 5 commits into
NVIDIA:mainfrom
lfr-0531:user/fanrongl/port-dsv4-remaining-optimizations-20260707
Jul 9, 2026
Merged

[None][perf] Port remaining DeepSeek V4 optimizations to main#16028
longlee0622 merged 5 commits into
NVIDIA:mainfrom
lfr-0531:user/fanrongl/port-dsv4-remaining-optimizations-20260707

Conversation

@lfr-0531

@lfr-0531 lfr-0531 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added faster DeepSeek V4 sliding block table computation, including support for scratch-based workflows.
    • Added optional base64 handling for prompt token IDs in disaggregated chat serving.
    • Added smarter workload sizing for sparse attention paths to better handle long requests.
  • Bug Fixes

    • Improved handling of invalid or out-of-range block mappings by returning safe fallback values.
    • Added stricter input validation for custom block table operations and token ID transport.

Description

Port the four remaining optimizations from feat/deepseek_v4 onto the latest GitHub main:

  • Adapt DSA indexer prefill chunk size for long sequences.
  • Bound transient indexer MQA logits memory with query tiling.
  • Add opt-in context-side base64 int32 transport for disaggregated prompt_token_ids.
  • Add the DeepSeek V4 block-table CUDA custom op and use it from the cache manager.

The cherry-picks were reconciled with current-main interfaces, including the current conversation protocol fields and KV cache manager v2 import path. The changes remain opt-in where applicable and add no new dependency.

Source commits: acbcb93, d6d1b48, dfb0609, and b7a8a8f.

Test Coverage

  • PASS: full C++/CUDA build and wheel generation with scripts/build_wheel.py --benchmarks --use_ccache --cuda_architectures "90-real;100-real"; the generated wheel was installed successfully.
  • PASS: verified the installed 1.3.0rc21 package contains both DSA changes and that its built libth_common.so registers both DeepSeek V4 block-table operators.
  • PASS: both block-table operators match the PyTorch reference for max_blocks=17 and max_blocks=256 on an idle B300 GPU (four cases total).
  • PASS: python -m py_compile for all modified Python modules.
  • PASS: changed-files pre-commit suite after rebasing onto the latest main.
  • Environment note: direct pytest collection of tests/unittest/_torch/custom_ops/test_deepseek_v4_block_table.py is blocked before test execution by the local FlashInfer/CUTLASS Python mismatch (cutlass.cute.nvgpu.OperandMajorMode is unavailable). The equivalent operator/reference cases above pass by loading the installed custom-op library directly; CI will run the committed pytest coverage in its pinned environment.

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)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • 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

To see a list of available CI bot commands, please comment /bot help.

@lfr-0531
lfr-0531 requested review from a team as code owners July 7, 2026 03:21
@lfr-0531
lfr-0531 requested review from hyukn, lancelly and liji-nv July 7, 2026 03:22
@lfr-0531
lfr-0531 force-pushed the user/fanrongl/port-dsv4-remaining-optimizations-20260707 branch from ac761c4 to 151fbd5 Compare July 7, 2026 03:24
@lfr-0531

lfr-0531 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #57919 [ run ] triggered by Bot. Commit: 151fbd5 Link to invocation

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds new CUDA kernels and Torch custom ops for DeepSeek V4 sliding block table computation (with and without scratch buffers), integrates them into the cache manager replacing compiled Python helpers, adds tests/microbenchmarks, introduces DSA indexer query-tiling and chunk-size heuristics, and adds base64-encoded prompt-token-id relay support across disaggregated serving components.

Changes

DeepSeek V4 Sliding Block Table Kernels and Integration

Layer / File(s) Summary
CUDA kernel implementation
cpp/tensorrt_llm/kernels/deepseekV4BlockTable.cu, cpp/tensorrt_llm/kernels/deepseekV4BlockTable.h
Device helpers compute base page indices, apply scaling/offsets, and fill invalid rows (with int4 vectorization); tiled and scratch-aware kernel variants and host dispatch functions are added and declared.
Torch custom op wrapper
cpp/tensorrt_llm/thop/deepseekV4BlockTableOp.cpp, cpp/tensorrt_llm/thop/CMakeLists.txt
New translation unit validates tensors, dispatches to the invoke functions, registers deepseek_v4_compute_sliding_block_tables[_with_scratch] ops, and is added to the build.
Cache manager wiring
tensorrt_llm/_torch/attention_backend/sparse/deepseek_v4/cache_manager.py
Removes local @maybe_compile helpers and calls the new torch.ops.trtllm ops from compute_sliding_block_tables.
Tests and microbenchmark
tests/unittest/_torch/custom_ops/test_deepseek_v4_block_table.py, tests/microbenchmarks/dsv4_block_table_perf.py
Adds reference-implementation-based correctness tests and a CUDA microbenchmark comparing custom ops against Torch reference implementations.

Estimated code review effort: 4 (Complex) | ~60 minutes

DSA Indexer Logits Tiling and Chunk Size Heuristic

Layer / File(s) Summary
MQA logits tiling and chunk heuristic
tensorrt_llm/_torch/attention_backend/sparse/dsa.py
Adds _INDEXER_MQA_LOGITS_ELEM_BUDGET to cap per-call logits allocation via query tiling in sparse_attn_indexer, and select_indexer_chunk_size with _INDEXER_CHUNK_SIZE_HEURISTIC thresholds used in prepare_for_chunked_prefill.

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

Disaggregated Serving Base64 Prompt Token ID Relay

Layer / File(s) Summary
Config flag and protocol schema
tensorrt_llm/llmapi/disagg_utils.py, tensorrt_llm/serve/openai_protocol.py
Adds gen_tokids_ctxbytes config flag and return_prompt_token_ids_b64/prompt_token_ids_b64 fields to DisaggregatedParams, ChatCompletionResponse, and ChatCompletionRequest.
Disagg service and server relay logic
tensorrt_llm/serve/openai_disagg_service.py, tensorrt_llm/serve/openai_server.py
Wires the flag into context requests, conditionally relays base64 vs int-array token ids between context and generation requests, and adds base64 encode/decode logic in openai_chat.

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

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant OpenAIServer as openai_server
  participant DisaggService as OpenAIDisaggregatedService
  participant ContextWorker

  Client->>OpenAIServer: chat completion request
  OpenAIServer->>DisaggService: forward request
  DisaggService->>ContextWorker: _get_ctx_request(return_prompt_token_ids_b64)
  ContextWorker-->>DisaggService: response with prompt_token_ids_b64
  DisaggService->>DisaggService: _get_gen_request relays base64 or int-array ids
  DisaggService-->>OpenAIServer: generation request/response
  OpenAIServer->>OpenAIServer: decode/encode base64 prompt_token_ids
  OpenAIServer-->>Client: chat completion response
Loading

Possibly related PRs

  • NVIDIA/TensorRT-LLM#15633: Refactors DeepSeek-V4 cache-manager sliding-window table computation to align with the same compiled sliding block table kernel paths introduced/wired here.

Suggested reviewers: yizhang-nv, xinhe-nv, jieli-matrix, mingyangHao, pengbowang-nv

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, specific, and accurately summarizes the main change: porting remaining DeepSeek V4 optimizations to main.
Description check ✅ Passed The description follows the template with Description, Test Coverage, PR Checklist, and a completed confirmation checkbox.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@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

🧹 Nitpick comments (6)
tensorrt_llm/_torch/attention_backend/sparse/dsa.py (1)

470-479: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefix this helper if it is not part of the module API.

select_indexer_chunk_size appears to be an internal helper. Rename it to _select_indexer_chunk_size unless tests or callers intentionally import it. As per coding guidelines, “Variables and functions not part of a class’s or module’s public interface should be prefixed with an underscore.”

🤖 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/attention_backend/sparse/dsa.py` around lines 470 - 479,
The helper select_indexer_chunk_size in dsa.py looks internal and should not be
part of the module API unless it is intentionally imported elsewhere. Rename it
to _select_indexer_chunk_size, and update any local references or tests that
call it so the sparse attention backend keeps the helper clearly private.

Source: Coding guidelines

cpp/tensorrt_llm/kernels/deepseekV4BlockTable.cu (1)

238-309: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor duplication: inline scale/offset math duplicates applyScaleAndOffset.

Lines 300-307 of computeSlidingBlockTablesWithScratchRowsKernel reimplement the same base == kBadPageIndex ? kBadPageIndex : base * scale + layerOffset ternary already factored into applyScaleAndOffset (line 66-69). Reusing the helper here would remove the risk of the two implementations silently diverging in the future.

♻️ Proposed refactor
-        int32_t const base = blockOffsets[blockOffsetsOffset + blockId];
-        output[outputOffset + blockId] = base == kBadPageIndex ? kBadPageIndex : base * scale + layerOffset;
+        int32_t const base = blockOffsets[blockOffsetsOffset + blockId];
+        output[outputOffset + blockId] = applyScaleAndOffset(base, scale, layerOffset);
🤖 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 `@cpp/tensorrt_llm/kernels/deepseekV4BlockTable.cu` around lines 238 - 309, The
end of computeSlidingBlockTablesWithScratchRowsKernel reimplements the same
scale/offset and bad-page handling already centralized in applyScaleAndOffset.
Replace the inline base-to-output mapping in the non-scratch path with a call to
applyScaleAndOffset so the kernel uses the shared helper consistently and avoids
duplicated logic drifting apart.
tensorrt_llm/_torch/attention_backend/sparse/deepseek_v4/cache_manager.py (1)

554-558: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

self._device_block_positions appears to be dead code now.

This staging tensor was almost certainly consumed by the removed @maybe_compile-decorated Python helpers (per the line-range change details, those were removed around line 168) that computed sliding block tables. The new CUDA kernels compute block positions internally via threadIdx/loop index rather than taking an explicit block_positions tensor (confirmed by the op signatures in deepseekV4BlockTableOp.cpp and by the microbenchmark's _custom_sliding_block_tables_with_scratch, which explicitly dels block_positions before calling the op). Scanning the rest of this file, self._device_block_positions is never read again after this allocation. Recommend removing it to avoid confusing future readers and the small unnecessary allocation.

🤖 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/attention_backend/sparse/deepseek_v4/cache_manager.py`
around lines 554 - 558, Remove the unused staging tensor allocation in the cache
manager setup: `self._device_block_positions` is no longer referenced anywhere
in `CacheManager` after the removed Python helpers, and the CUDA block-table ops
now compute positions internally. Delete the `torch.arange(...)` assignment in
the initialization path and make sure no remaining methods in `cache_manager.py`
still depend on `self._device_block_positions`.
cpp/tensorrt_llm/kernels/deepseekV4BlockTable.h (1)

29-39: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing Doxygen documentation on public function prototypes.

Neither invokeDeepseekV4ComputeSlidingBlockTables nor invokeDeepseekV4ComputeSlidingBlockTablesWithScratch has any //! documentation describing parameters (e.g. tensor layouts/shapes for blockOffsets, poolIds, semantics of scratchBegs/scratchEnds/scratchSlots). As per coding guidelines, **/*.{h,hpp,hxx} files should "Follow Doxygen rules for documenting class interfaces and function prototypes; use //! for C++ style comments and //!< for member comments."

📝 Example doc-comment addition
+//! Computes per-layer sliding-window block tables (no scratch remapping).
+//! blockOffsets: [numPools, copyIdxCapacity, 2, maxBlocksPerSeq] int32 device tensor.
+//! output: [numLayers, numAttnTypes, numTables, maxBlocksPerSeq] int32 device tensor.
 void invokeDeepseekV4ComputeSlidingBlockTables(int32_t const* blockOffsets, int32_t const* copyIdx,
     int64_t const* poolIds, bool const* validPool, int32_t const* scales, int32_t const* layerOffsets, int32_t* output,
     int32_t numPools, int32_t copyIdxCapacity, int32_t numLayers, int32_t numAttnTypes, int32_t numTables,
     int32_t maxBlocksPerSeq, cudaStream_t stream);
🤖 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 `@cpp/tensorrt_llm/kernels/deepseekV4BlockTable.h` around lines 29 - 39, Add
Doxygen-style `//!` comments for the public prototypes
`invokeDeepseekV4ComputeSlidingBlockTables` and
`invokeDeepseekV4ComputeSlidingBlockTablesWithScratch` in
`deepseekV4BlockTable.h`, documenting each parameter’s meaning, expected
tensor/layout shapes, and any scratch-related semantics. Keep the comments
directly above the declarations and make sure they follow the project’s Doxygen
rules for C++ function prototypes.

Source: Coding guidelines

cpp/tensorrt_llm/thop/deepseekV4BlockTableOp.cpp (1)

60-99: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

No validation that scales are strictly positive before they're used as a divisor.

Both scratch CUDA kernels (computeSlidingBlockTablesWithScratchKernel and computeSlidingBlockTablesWithScratchRowsKernel in deepseekV4BlockTable.cu) compute totalOffset / scale and totalOffset % scale without any zero-check. checkCommonInputs validates dtype/shape/contiguity for scales but never checks its values. Today scales always originates from converter.scale in cache_manager.py and is presumably always ≥ 1, but since this is a public Torch op boundary, a cheap value check would prevent undefined behavior/crash if that invariant is ever violated by a future caller.

🛡️ Proposed guard
     checkInt32Tensor(scales, "scales");
     checkInt32Tensor(layerOffsets, "layer_offsets");
     checkInt32Tensor(output, "output");
+    TORCH_CHECK(scales.min().item<int32_t>() > 0, "scales must be strictly positive");
🤖 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 `@cpp/tensorrt_llm/thop/deepseekV4BlockTableOp.cpp` around lines 60 - 99,
`checkCommonInputs` currently validates `scales`’s dtype and shape but not its
value range, while the CUDA kernels it feeds divide and mod by `scale`. Add an
explicit value check in `checkCommonInputs` to reject non-positive `scales` (at
minimum zero, ideally strictly positive) before the kernels run, using the
existing `scales` validation block alongside `checkInt32Tensor` and
`checkLayerAttnShape`. Make sure the error message clearly names `scales` and
the positivity requirement so callers of the `deepseekV4BlockTable` op get an
early, safe failure instead of undefined behavior.
tests/unittest/_torch/custom_ops/test_deepseek_v4_block_table.py (1)

151-219: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Good baseline coverage, but scratch-capacity edge cases are untested.

Both parametrizations always set scratch_capacity = copy_idx.shape[0] (i.e., scratch capacity == num_tables), and num_contexts = scratch_capacity - 1. This exercises the "scratch fully covers all tables, almost-all-contexts-active" case but not:

  • scratch_capacity < num_tables (tables where tableId >= scratchCapacity should fall back to the base page index — the canUseScratch = tableId < scratchCapacity branch in both scratch kernels).
  • num_contexts == scratch_capacity (boundary where all context slots are active) or num_contexts == 0.
  • scratch_capacity == 0 (should degrade to plain base-page behavior).

Consider adding a parametrized case (e.g. in test_deepseek_v4_block_table.py) covering scratch_capacity in [0, num_tables // 2, num_tables] and num_contexts in [0, scratch_capacity] to close this gap. Current coverage is otherwise sufficient for the two kernel-selection paths (element-linear vs. row-based, exercised via max_blocks in [17, 256]).

🤖 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/_torch/custom_ops/test_deepseek_v4_block_table.py` around
lines 151 - 219, Add coverage for scratch-capacity boundary cases in the
DeepSeek V4 block-table tests: the current
`test_deepseek_v4_compute_sliding_block_tables_with_scratch_matches_reference`
only exercises `scratch_capacity == num_tables` and `num_contexts ==
scratch_capacity - 1`. Extend this test (or add a parametrized variant) to cover
`scratch_capacity < copy_idx.shape[0]`, `scratch_capacity == 0`, and
`num_contexts` at both `0` and `scratch_capacity`, so the `canUseScratch =
tableId < scratchCapacity` path and the zero/fully-active context cases are
validated against `_reference_sliding_block_tables_with_scratch` and
`torch.ops.trtllm.deepseek_v4_compute_sliding_block_tables_with_scratch`.

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.

Inline comments:
In `@tensorrt_llm/_torch/attention_backend/sparse/dsa.py`:
- Around line 58-59: The module-level initialization of
_INDEXER_MQA_LOGITS_ELEM_BUDGET in dsa.py can crash on import if
TLLM_INDEXER_MQA_LOGITS_ELEM_BUDGET is malformed. Move the parsing into a safe
path in the same initialization block, validate the environment value, and fall
back to the default budget when parsing fails; optionally emit a warning instead
of raising so the sparse attention backend can still load.

---

Nitpick comments:
In `@cpp/tensorrt_llm/kernels/deepseekV4BlockTable.cu`:
- Around line 238-309: The end of computeSlidingBlockTablesWithScratchRowsKernel
reimplements the same scale/offset and bad-page handling already centralized in
applyScaleAndOffset. Replace the inline base-to-output mapping in the
non-scratch path with a call to applyScaleAndOffset so the kernel uses the
shared helper consistently and avoids duplicated logic drifting apart.

In `@cpp/tensorrt_llm/kernels/deepseekV4BlockTable.h`:
- Around line 29-39: Add Doxygen-style `//!` comments for the public prototypes
`invokeDeepseekV4ComputeSlidingBlockTables` and
`invokeDeepseekV4ComputeSlidingBlockTablesWithScratch` in
`deepseekV4BlockTable.h`, documenting each parameter’s meaning, expected
tensor/layout shapes, and any scratch-related semantics. Keep the comments
directly above the declarations and make sure they follow the project’s Doxygen
rules for C++ function prototypes.

In `@cpp/tensorrt_llm/thop/deepseekV4BlockTableOp.cpp`:
- Around line 60-99: `checkCommonInputs` currently validates `scales`’s dtype
and shape but not its value range, while the CUDA kernels it feeds divide and
mod by `scale`. Add an explicit value check in `checkCommonInputs` to reject
non-positive `scales` (at minimum zero, ideally strictly positive) before the
kernels run, using the existing `scales` validation block alongside
`checkInt32Tensor` and `checkLayerAttnShape`. Make sure the error message
clearly names `scales` and the positivity requirement so callers of the
`deepseekV4BlockTable` op get an early, safe failure instead of undefined
behavior.

In `@tensorrt_llm/_torch/attention_backend/sparse/deepseek_v4/cache_manager.py`:
- Around line 554-558: Remove the unused staging tensor allocation in the cache
manager setup: `self._device_block_positions` is no longer referenced anywhere
in `CacheManager` after the removed Python helpers, and the CUDA block-table ops
now compute positions internally. Delete the `torch.arange(...)` assignment in
the initialization path and make sure no remaining methods in `cache_manager.py`
still depend on `self._device_block_positions`.

In `@tensorrt_llm/_torch/attention_backend/sparse/dsa.py`:
- Around line 470-479: The helper select_indexer_chunk_size in dsa.py looks
internal and should not be part of the module API unless it is intentionally
imported elsewhere. Rename it to _select_indexer_chunk_size, and update any
local references or tests that call it so the sparse attention backend keeps the
helper clearly private.

In `@tests/unittest/_torch/custom_ops/test_deepseek_v4_block_table.py`:
- Around line 151-219: Add coverage for scratch-capacity boundary cases in the
DeepSeek V4 block-table tests: the current
`test_deepseek_v4_compute_sliding_block_tables_with_scratch_matches_reference`
only exercises `scratch_capacity == num_tables` and `num_contexts ==
scratch_capacity - 1`. Extend this test (or add a parametrized variant) to cover
`scratch_capacity < copy_idx.shape[0]`, `scratch_capacity == 0`, and
`num_contexts` at both `0` and `scratch_capacity`, so the `canUseScratch =
tableId < scratchCapacity` path and the zero/fully-active context cases are
validated against `_reference_sliding_block_tables_with_scratch` and
`torch.ops.trtllm.deepseek_v4_compute_sliding_block_tables_with_scratch`.
🪄 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: 45bd3805-00cf-4b0d-bbba-19f44b2f83b9

📥 Commits

Reviewing files that changed from the base of the PR and between 4f1c3cd and ac761c4.

📒 Files selected for processing (12)
  • cpp/tensorrt_llm/kernels/deepseekV4BlockTable.cu
  • cpp/tensorrt_llm/kernels/deepseekV4BlockTable.h
  • cpp/tensorrt_llm/thop/CMakeLists.txt
  • cpp/tensorrt_llm/thop/deepseekV4BlockTableOp.cpp
  • tensorrt_llm/_torch/attention_backend/sparse/deepseek_v4/cache_manager.py
  • tensorrt_llm/_torch/attention_backend/sparse/dsa.py
  • tensorrt_llm/llmapi/disagg_utils.py
  • tensorrt_llm/serve/openai_disagg_service.py
  • tensorrt_llm/serve/openai_protocol.py
  • tensorrt_llm/serve/openai_server.py
  • tests/microbenchmarks/dsv4_block_table_perf.py
  • tests/unittest/_torch/custom_ops/test_deepseek_v4_block_table.py

Comment thread tensorrt_llm/_torch/attention_backend/sparse/dsa.py
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #57919 [ run ] completed with state SUCCESS. Commit: 151fbd5
/LLM/main/L0_MergeRequest_PR pipeline #46611 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

@longlee0622

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58000 [ run ] triggered by Bot. Commit: 151fbd5 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58000 [ run ] completed with state SUCCESS. Commit: 151fbd5
/LLM/main/L0_MergeRequest_PR pipeline #46670 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

lfr-0531 and others added 4 commits July 7, 2026 15:29
…ces (NVIDIA#15459)

Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Co-authored-by: Fanrong Li <lfr-0531@users.noreply.github.com>
Signed-off-by: Fanrong Li <23290157+lfr-0531@users.noreply.github.com>
…NVIDIA#15569)

Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com>
Co-authored-by: Fanrong Li <23290157+lfr-0531@users.noreply.github.com>
Signed-off-by: Fanrong Li <23290157+lfr-0531@users.noreply.github.com>
…t_token_ids (NVIDIA#15698)

Signed-off-by: Lance Liao <108499334+lancelly@users.noreply.github.com>
Co-authored-by: Fanrong Li <23290157+lfr-0531@users.noreply.github.com>
Signed-off-by: Liao Lanyu <108499334+lancelly@users.noreply.github.com>
Signed-off-by: Fanrong Li <23290157+lfr-0531@users.noreply.github.com>
Signed-off-by: Jin Li <59594262+liji-nv@users.noreply.github.com>
@lfr-0531
lfr-0531 force-pushed the user/fanrongl/port-dsv4-remaining-optimizations-20260707 branch from 151fbd5 to a534c93 Compare July 7, 2026 15:34
@lfr-0531
lfr-0531 requested a review from a team as a code owner July 7, 2026 15:34
@lfr-0531
lfr-0531 requested a review from suyoggupta July 7, 2026 15:34
@lfr-0531 lfr-0531 added the api-compatible Accepted LLM API contract change that is backwards-compatible label Jul 7, 2026
@lfr-0531

lfr-0531 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58027 [ run ] triggered by Bot. Commit: a534c93 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

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

@lfr-0531

lfr-0531 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58161 [ run ] triggered by Bot. Commit: bf24481 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58161 [ run ] completed with state ABORTED. Commit: bf24481
/LLM/main/L0_MergeRequest_PR pipeline #46817 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

@longlee0622

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58332 [ run ] triggered by Bot. Commit: bf24481 Link to invocation

@brb-nv brb-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor comments.

Comment thread tensorrt_llm/_torch/attention_backend/sparse/dsa.py
Comment thread tensorrt_llm/_torch/attention_backend/sparse/dsa.py
Comment thread cpp/tensorrt_llm/kernels/deepseekV4BlockTable.cu
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58332 [ run ] completed with state SUCCESS. Commit: bf24481
/LLM/main/L0_MergeRequest_PR pipeline #46961 completed with status: 'SUCCESS'

CI Report

Link to invocation

@longlee0622
longlee0622 enabled auto-merge (squash) July 9, 2026 03:15

@JunyiXu-nv JunyiXu-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM for llm_api part.

@juney-nvidia juney-nvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved from API perspective

@longlee0622
longlee0622 merged commit 4899f00 into NVIDIA:main Jul 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-compatible Accepted LLM API contract change that is backwards-compatible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants