Skip to content

[None][fix] Runtime fixes and small kernel changes from serving Qwen3.8-Flash-Next-FP8 - #21930

Merged
Wanli-Jiang merged 14 commits into
NVIDIA:mainfrom
Wanli-Jiang:user/williamj/q38f-runtime-fixes
Nov 13, 2026
Merged

Wanli-Jiang merged 14 commits into
NVIDIA:mainfrom
Wanli-Jiang:user/williamj/q38f-runtime-fixes

Conversation

@Wanli-Jiang

@Wanli-Jiang Wanli-Jiang commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Scope: The diff changes 20 files, with 493 lines added and 52 removed. It bundles seven independent changes across C++, CUDA/Triton, Python, and tests. Review and rollback should treat each change separately.
  • MNNVL one-shot all-reduce (mnnvlAllreduceKernels.cu/.h, allreduceOp.cpp, cpp_custom_ops.py): triggerCompletionAtEnd defaults to true, which keeps the existing behavior. The C++ schema default and the Python fake-op default both use True. When the flag is false, PDL completion triggers right after grid-dependency synchronization. The supplied review material did not include the full all-reduce implementation. Whether every all-reduce path honors the flag is not verified.
  • QSA kernels (qsa/kernels.py): Six row-count kernels exclude num_rows from specialization. The two index-scoring kernels also exclude row-metadata view alignment. The sparse GQA split-K and merge kernels exclude num_rows. Confirm that these kernels remain correct for unaligned metadata views on all paths.
  • Causal conv update (causal_conv1d_triton.py): batch and conv_state_indices_ptr alignment are excluded from specialization. The supplied patch excerpts did not cover all of the broader convolution claims. Verify those claims against the full change.
  • Speculative accept (fused_accept.py): Both launch sites use fixed 64-row or 64-context tiles, and the kernels loop over blocks. _step0_epilogue_kernel also drops specialization on pos_row_stride. Small batches may lose efficiency. Measure this on representative batch sizes.
  • trtllm-gen dummy routing (trtllm_gen_custom_ops.py): The shape-change check is removed. Dummy top-k tensors regenerate for each profiled bucket when dummies are needed. This adds setup cost during AutoTuner profiling.
  • Logging (result.py, rpc_client.py, openai_server.py, gpu_worker.py): exc_info=True is replaced with a formatted traceback in the message. In gpu_worker.py, sleep and wakeup now use logger.error with the formatted traceback. The author reports fixing two logger.exception calls there. Confirm that log parsers accept the new format.
  • Completion scheduling (openai_server.py): _get_scheduling_params now serves both chat and completion requests. It reads agent_hierarchy with getattr and defaults to None. This changes /v1/completions behavior. Completion requests that carry the signed hint return 400 on workers without internal_request_auth_key, according to the author. Confirm this rejection is intended.
  • Repository-wide logger guard (test_logger.py): The new test parses tensorrt_llm sources with AST. It flags logger.exception() and exc_info= on the listed logger methods. It skips files that do not mention both exc_info and logger, and files that assign logger from logging.getLogger. Other logger naming patterns are not covered.
  • CI state: Run #84101 was disabled because the pipeline was frozen for an urgent hotfix. Run #84284 was aborted. Run #84328 completed successfully. Its main pipeline was marked unstable, and multi-GPU tests required the ci: full pre-merge approved label. The author later requested another run. The author attributes three main-branch failures to existing issues: test_unit_test_directories_mirror_source, test_every_test_is_in_a_test_list, and test_no_new_object_new_sites. This attribution is not verified here.

QA Engineer Review

Test files changed:

  • tests/unittest/_torch/attention/sparse/qsa/test_qsa_sparse.py (modified): Generation-token-mapping test now covers decode and generation through a shared parameterized test. New CUDA tests check compile counts across row counts and unaligned metadata offsets, and output equivalence against aligned results. K/V store, split-K sparse GQA, and merge kernels keep compile counts across row counts.
  • tests/unittest/_torch/misc/test_autotuner.py (modified): Adds test_trtllm_gen_moe_dummy_topk_is_redrawn_at_every_bucket. It checks top-k ID and weight shapes per bucket. For buckets above 8 rows, it checks more than 8 distinct routing rows.
  • tests/unittest/_torch/modules/mamba/test_gdn_kernel_optimizations.py (modified): Adds test_conv1d_update_compiles_once_across_request_counts_and_slot_offsets. It checks output, state, and intermediate-window equivalence for unaligned versus aligned slot vectors. It asserts the compiled-kernel cache size is unchanged after the first run.
  • tests/unittest/_torch/multi_gpu/test_mnnvl_allreduce.py (modified): Adds run_early_pdl_release_single_rank and a two-GPU BF16 test (sequence length 32, hidden size 2560). It checks bitwise equality between trigger_completion_at_end values for all-reduce followed by residual RMSNorm. The helper restores TLLM_TEST_MNNVL on failure.
  • tests/unittest/_torch/speculative/test_fused_accept.py (modified): Adds a 130-context case to the step-0 epilogue test. Adds a test for varied context and generation splits, including 1-D and 3-row MRoPE positions. It checks stable Triton device-cache counts and skips when JITFunction.device_caches is unavailable.
  • tests/unittest/disaggregated/test_disagg_internal_auth.py (modified): Runs the affinity wire-roundtrip test for chat and completion requests. Adds a completion-handler test that checks scheduling parameters reach generate_async.
  • tests/unittest/utils/test_logger.py (modified): Adds a repository-wide guard against exc_info and logger.exception() in tensorrt_llm.

Test-list files changed:

  • tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml: Adds test_mnnvl_oneshot_early_pdl_release for 4-GPU GB200, Ubuntu, aarch64, PyTorch backend. No CI result for this entry is available.

Author-reported local results (GB300, native code rebuilt, -k "not distributed_strategy", not CI-verified): 21 fused-accept tests, 103 GDN kernel optimization tests, 258 QSA tests, 202 MNNVL all-reduce tests, and 84 AutoTuner tests passed.

Coverage gaps:

  • test_autotuner_distributed_strategy hangs in its MPI pool on the author's machine, on this PR's base and on main. Its result is not established.
  • No CI result covers the new GB200 list entry.
  • The three main-branch failures are not verified as pre-existing.

Coverage verdict: needs follow-up. The added tests cover the changed behavior. The hanging AutoTuner test, the missing CI evidence for the GB200 list entry, and the unverified main-branch failures remain open.

Per-File QA Perspective

  • cpp/tensorrt_llm/kernels/communicationKernels/mnnvlAllreduceKernels.cu: Verify early PDL completion timing with triggerCompletionAtEnd=false. Verify default behavior is unchanged.
  • cpp/tensorrt_llm/kernels/communicationKernels/mnnvlAllreduceKernels.h: New field defaults to true. Covered by the all-reduce tests.
  • cpp/tensorrt_llm/thop/allreduceOp.cpp: Verify the new argument reaches the kernel. Verify two-shot path behavior with the argument.
  • tensorrt_llm/_torch/attention/backends/sparse/qsa/kernels.py: Verify QSA outputs with unaligned metadata and varied row counts.
  • tensorrt_llm/_torch/custom_ops/cpp_custom_ops.py: Verify fake-op output shape and dtype are unchanged with the new default argument.
  • tensorrt_llm/_torch/custom_ops/trtllm_gen_custom_ops.py: Verify MoE AutoTuner profiling across buckets. Check profiling time.
  • tensorrt_llm/_torch/modules/mamba/causal_conv1d_triton.py: Verify causal conv update outputs across request counts and slot offsets.
  • tensorrt_llm/_torch/speculative/fused_accept.py: Verify strict accept and step-0 epilogue outputs. Check small-batch performance with the fixed 64-row tiles.
  • tensorrt_llm/executor/result.py: Verify perplexity debug logs include a readable traceback on ValueError and TypeError.
  • tensorrt_llm/executor/rpc/rpc_client.py: Verify per-response error logs include the traceback. Verify retry and critical-error behavior is unchanged.
  • tensorrt_llm/executor/ray/gpu_worker.py: Verify sleep and wakeup error logs include the traceback. Verify transition cleanup and re-raising are unchanged.
  • tensorrt_llm/serve/openai_server.py: Verify /v1/completions scheduling with the agent_hierarchy hint. Verify requests without internal_request_auth_key behave as intended. Verify iteration-stats error logs include the traceback.
  • tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml: Verify the new early PDL test runs on the GB200 4-GPU pool.
  • tests/unittest/_torch/attention/sparse/qsa/test_qsa_sparse.py: Covers QSA compile stability and output equivalence. Not listed in a test-db list in this diff.
  • tests/unittest/_torch/misc/test_autotuner.py: Covers per-bucket dummy routing. Not listed in a test-db list in this diff. The distributed strategy test hangs.
  • tests/unittest/_torch/modules/mamba/test_gdn_kernel_optimizations.py: Covers conv update compile stability. Not listed in a test-db list in this diff.
  • tests/unittest/_torch/multi_gpu/test_mnnvl_allreduce.py: Covers bitwise equality for early PDL release. Runs on GB200 through the new list entry.
  • tests/unittest/_torch/speculative/test_fused_accept.py: Covers device-cache stability. Skips when device_caches is unavailable.
  • tests/unittest/disaggregated/test_disagg_internal_auth.py: Covers affinity for chat and completion requests.
  • tests/unittest/utils/test_logger.py: Guards against new exc_info uses in the package. Scope is limited to the listed logger methods.

Description

Seven independent changes found while serving Qwen3.8-Flash-Next-FP8 with the modeling_v2 target (disaggregated and aggregated, GB300). Each is one commit with its own tests and can be reviewed, or split out, on its own; none depends on another or on the model. Six are fixes (a crash in error handling, a dropped request hint, Triton kernels in speculative decoding, causal_conv1d and QSA that recompiled inside served steps, AutoTuner tactics that depended on the first tuned call); one is a small opt-in performance change (an early PDL release in the MNNVL one-shot all-reduce).

Stop passing exc_info to the TensorRT-LLM logger

The TensorRT-LLM Logger methods take only positional message parts
(Logger.error(*msg)), so a call with exc_info=True raises TypeError
inside the except block that was meant to log the error. In the serve
iteration-stats collector this ended the collector loop on the first
stats RPC timeout: a disaggregated context-server log shows an RPC
timeout in fetch_stats_wait_async followed by "TypeError: Logger.error()
got an unexpected keyword argument 'exc_info'", and no iteration stats
after it.

Format the traceback into the message instead, at the four call sites
on main: the serve stats collector, the two perplexity handlers in
executor/result.py and the RPC client response reader. The Ray GPU
worker's sleep and wakeup handlers had the same problem with
logger.exception(), which the Logger does not have (AttributeError in
the except block); they log the formatted traceback with logger.error
now. The new test checks that no tensorrt_llm module passes exc_info to
the Logger or calls exception() on it (modules that bind logger to a
stdlib logging.getLogger logger at top level are skipped).

serve: carry the sub-agent parent hint on /v1/completions

The disaggregated router signs the sub-agent parent id
(conversation_params.subagent_affinity_id) into the request headers for
both chat and completions requests, but only the /v1/chat/completions
handler turned it into SchedulingParams. /v1/completions dropped it, so
a context or generation worker serving completions never saw the parent
id. A completions replay of a sub-agent trace showed no effect from
parent-based cache handling until the hint was carried.

Build SchedulingParams in the completions handler too and pass it to
generate_async. _get_scheduling_params now accepts a CompletionRequest
(it has no agent_hierarchy field, so that stays None).

Only requests that carry an authenticated parent header change. For
those, the ADP router's conversation affinity on /v1/completions now
uses the parent id, as it already does on chat. A context or generation
worker without internal_request_auth_key now answers such a completion
request with 400, as chat already does; before, it served the request
and ignored the hint.

The wire round-trip test of the parent hint now covers completion
requests as well as chat ones, on context and generation workers, and a
handler test posts a signed completion request to an OpenAIServer and
checks the scheduling_params it passes to generate_async.

speculative: compile the fused accept and step-0 kernels once across batch splits

fused_accept._strict_accept_kernel and _step0_epilogue_kernel let Triton
specialize the per-step request counts (== 1, divisible by 16), and the
accept kernel's row tile (16, 32 or 64) followed the batch. Each new
batch split therefore compiled and loaded a new variant inside served
requests, which voided two benchmark screens that audit compilation in
their timed window. The accept kernel runs on every step under forced
acceptance.

Mark the counts do_not_specialize and fix the accept tile at 64 rows
(the kernel loops over row blocks, rows are independent), as #21424 did
for spec_tail_kernels. The step-0 kernel's context tile is fixed at 64
rows too: it sums the context lengths over row blocks instead of sizing
one tile to next_power_of_2(num_contexts), and its MRoPE position stride
(the token count) is not specialized either. Outputs are unchanged.

Tests: the accept and step-0 kernels keep one compiled variant across
batch splits of up to 130 context requests, with 1-D and MRoPE
positions, and the step-0 comparison
with the stock path includes 130 contexts. The existing fused-vs-unfused
tests cover the results.

Without this change, a 3600 s AgentX measurement of a one-model MTP-Eagle deployment on main (Qwen3.8-Flash-Next-FP8, tep4, MTP3, concurrency 1) compiled a new _step0_epilogue_kernel variant inside its timed window.

causal_conv1d Triton: no per-batch or per-offset specialization of the update kernel

_causal_conv1d_update_kernel let Triton specialize batch (== 1,
divisible by 16) and the 16-byte alignment of conv_state_indices. Both
change from step to step: batch is the request count, and on a mixed
step the GDN and Mamba2 mixers pass the decode half of the slot vector,
which starts num_prefills entries in. A new request count or prefill
count therefore compiled a new variant inside served requests.

Mark batch do_not_specialize and conv_state_indices
do_not_specialize_on_alignment. The arithmetic is unchanged, so the
outputs are bitwise unchanged. This applies to every Mamba / GDN model
that uses this kernel (Qwen3-Next, Qwen3.5, Nemotron-H).

A latency benchmark of a GDN model compiled new
_causal_conv1d_update_kernel variants inside its timed window; one
differed from a cached variant only in the batch == 1 specialization.

The new test runs the update kernel over request counts 1 to 5 and
slot-vector offsets of 1 to 3 entries, checks that no new variant is
compiled, and compares each launch with the same launch on an aligned
copy of the slot vector.

Without this change, a 3600 s AgentX measurement on main (Qwen3.8-Flash-Next-FP8, tep4, concurrency 1) compiled a new _causal_conv1d_update_kernel variant inside its timed window.

QSA Triton: no per-batch or per-offset specialization of the metadata kernels

Several stock QSA Triton kernels let Triton specialize on a per-step row
count (== 1, divisible by 16) or on the 16-byte alignment of row-metadata
pointers. The counts follow the batch, and some callers pass the row
metadata as views that start at a request, rank or chunk boundary: the
chunked index-score loop in module.py, and callers that split a step's
rows (generation rows after the context rows, or one share per
attention-TP rank). Each first-seen combination compiled and loaded a new
kernel variant inside a served step.

  • do_not_specialize the row count of the block-table unscale, decode
    token mapping, query-tile paged index scores, paged K/V store, split-K
    sparse GQA and split-K merge kernels;
  • do_not_specialize_on_alignment the row-metadata pointers of the
    block-index expansion and paged index scores (row-wise and query tile)
    kernels.

The integer arithmetic is unchanged, so outputs are the same. Kernels
whose callers always pass metadata that starts at row 0 keep their
alignment specialization.

Tests: the decode and generation token mapping keep one compiled kernel
across batch sizes; block-index expansion, paged index scores and
block-table unscale keep one per launch class across row counts and
metadata view offsets, with the results of aligned copies.

trtllm-gen MoE AutoTuner: draw dummy routing for every profiled bucket

With precomputed top-k (attention DP), the trtllm-gen MoE runners tune
on dummy routing from prepare_dummy_topk_and_hook. The AutoTuner builds
each bucket's inputs from the tuned call's tensors: float tensors are
redrawn at the bucket's shape, but an int [num_tokens, top_k] tensor is
filled by repeating the tuned call's own rows. Its shape therefore
already matches the bucket when the pre-hook sees it, and the pre-hook
only redrew the dummy top-k when the row count differed. A bucket larger
than the first tuned call was then profiled with that call's few routing
rows repeated, every row on the same few experts, where the widest token
tile wins. The chosen tactics depended on which call happened to be
tuned first.

Redraw the dummy top-k in the pre-hook for every profiled bucket,
whatever its shape.

Seen on an FP8 block-scale MoE (512 experts, 256-expert local window,
top-10): when the first tuned call was an 8192-row warm-up, every
decode bucket chose token tile 8. When it was a small call, the buckets
chose the widest tiles: [32, 8] for 32 to 216 rows, [64, 2] for 288 to
480 rows and [128, 0] for 528 and 576 rows. Measured with real routing,
[64, 2] is 6% to 26% slower than (32, 8) at 288 to 480 rows, and
[128, 0] takes 385 us vs 195 to 201 us at 528 and 576 rows, about
+9 ms per step at batch 176 and 192. The same hook serves every
trtllm-gen MoE runner (FP8 block scale, NVFP4, MXFP4, W4A8), so tactics
can change for those models: they no longer depend on the order of the
first tuned call.

Test: every profiled bucket larger than the tuned call gets more
distinct dummy routing rows than the tuned call had. It fails on the
unfixed source, where each such bucket repeats the tuned call's 8 rows.
With the fix, the same model's decode tactics were [8, 8] up to 480 rows and
[16, 8] at 528 and 576 rows whatever the tuning order, and a
batch-192 decode step was 9% faster than with the order-dependent
tactics.

MNNVL one-shot all-reduce: optional early PDL release

Add trigger_completion_at_end (default True, the current behavior) to
trtllm::mnnvl_fusion_allreduce, the same argument the IPC all-reduce op
already takes. With False, the one-shot kernel calls
cudaTriggerProgrammaticLaunchCompletion right after its own grid
dependency wait instead of after the Lamport reduction. A dependent reads
the output only after its own griddepcontrol.wait, which waits for the
whole all-reduce grid, so values are unchanged; only the dependent's
prologue (for example a weight prefetch before its wait) overlaps the
exchange. The two-shot path ignores the argument.

A caller passes it per call, so no process environment variable is
needed. No caller passes False yet: MNNVLAllReduce keeps the default,
because stock models set AllReduceParams.trigger_completion_at_end=False
for the IPC kernel, and forwarding it would change their MNNVL path.

Evidence (Qwen3.8 FP8, GB300, tep4 MTP-2, batch 1, 98k context; every
decode block's TP sum runs on the one-shot kernel; same-node step
microbenchmark, p10 over 3 requests): 3.218 ms/step with the early
release, 3.287 ms with only it turned off (about -2.1 %). The existing
test_mnnvl_allreduce.py suite passed (201) with the early release forced
on for every one-shot call by a process switch, the form this argument
replaces.

test_mnnvl_oneshot_early_pdl_release runs a one-shot sum and then a
one-shot residual RMSNorm of it, a PDL dependent reading its output, and
checks every output bit for bit against the default trigger.

Test Coverage

  • tests/unittest/utils/test_logger.py: a source scan that no logger.<level>(..., exc_info=...) or logger.exception(...) call on the TensorRT-LLM logger is left in tensorrt_llm.
  • tests/unittest/disaggregated/test_disagg_internal_auth.py::test_worker_affinity_survives_wire_roundtrip: chat and completion requests carrying the signed parent hint keep it through the wire format, and context and generation workers recover the parent id.
  • tests/unittest/disaggregated/test_disagg_internal_auth.py::test_completion_handler_passes_affinity_to_generate: a signed context-only /v1/completions request reaches generate_async with the parent id in scheduling_params.
  • tests/unittest/_torch/speculative/test_fused_accept.py::test_accept_kernels_compile_once_across_batch_splits: one compiled accept / step-0 kernel across batch splits (up to 130 context requests); the existing fused-vs-unfused tests cover the results.
  • tests/unittest/_torch/modules/mamba/test_gdn_kernel_optimizations.py::test_conv1d_update_compiles_once_across_request_counts_and_slot_offsets: one compiled update kernel across request counts and slot-vector offsets, with the results of an aligned copy.
  • tests/unittest/_torch/attention/sparse/qsa/test_qsa_sparse.py: decode and generation token mapping keep one compiled kernel across batch sizes; block-index expansion, paged index scores and block-table unscale keep one per launch class across row counts and metadata view offsets, with the results of aligned copies; the K/V store and split-K sparse GQA and merge keep one per launch class across row counts.
  • tests/unittest/_torch/misc/test_autotuner.py::test_trtllm_gen_moe_dummy_topk_is_redrawn_at_every_bucket: every bucket larger than the tuned call gets more distinct dummy routing rows than the tuned call had; fails before the change, passes after.
  • tests/unittest/_torch/multi_gpu/test_mnnvl_allreduce.py::test_mnnvl_oneshot_early_pdl_release: with trigger_completion_at_end=False, a one-shot sum and the residual RMSNorm that reads it as a PDL dependent match the default bit for bit.
  • At a0fc279 on GB300 (4 GPUs), native code rebuilt: test_fused_accept.py 22 passed; test_logger.py and test_disagg_internal_auth.py 105 passed; test_mnnvl_allreduce.py -k early_pdl 1 passed.
  • At a8e4925 on GB300 (4 GPUs): test_qsa_sparse.py 105 passed and test_fused_accept.py 22 passed; the new K/V store / split-K and MRoPE compile checks fail on a0fc279's kernels.
  • On GB300 (4 GPUs), native code rebuilt, with these seven commits on main a6c28b4:
    • tests/unittest/utils/test_logger.py and tests/unittest/disaggregated/test_disagg_internal_auth.py: 104 passed.
    • tests/unittest/_torch/speculative/test_fused_accept.py: 21 passed.
    • tests/unittest/_torch/modules/mamba/test_gdn_kernel_optimizations.py: 103 passed.
    • tests/unittest/_torch/attention/sparse/qsa: 258 passed.
    • tests/unittest/_torch/multi_gpu/test_mnnvl_allreduce.py: 202 passed.
    • tests/unittest/_torch/misc/test_autotuner.py -k "not distributed_strategy": 84 passed. test_autotuner_distributed_strategy hangs in its MPI pool on that machine, at main a6c28b4 as well.

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.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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

No actionable comments were generated in the recent review.

Walkthrough

The changes add configurable MNNVL one-shot completion timing, adjust Triton specialization and AutoTuner dummy routing, extend completion-request scheduling, and format tracebacks in selected error logs. Tests cover these changes and related output, request handling, and kernel-cache behavior.

Changes

MNNVL completion timing

Layer / File(s) Summary
Expose and apply completion timing
cpp/tensorrt_llm/kernels/communicationKernels/mnnvlAllreduceKernels.h, cpp/tensorrt_llm/thop/allreduceOp.cpp, cpp/tensorrt_llm/kernels/communicationKernels/mnnvlAllreduceKernels.cu, tensorrt_llm/_torch/custom_ops/cpp_custom_ops.py
The all-reduce parameters and operator schema add trigger_completion_at_end, defaulting to true. The one-shot kernel uses the value to trigger completion before or after reduction.
Validate early completion
tests/unittest/_torch/multi_gpu/test_mnnvl_allreduce.py, tests/integration/test_lists/test-db/l0_gb200_multi_gpus.yml
A two-GPU test compares early and default completion timing for an all-reduce followed by residual RMSNorm. The test is added to the GB200 pre-merge list.

Triton specialization

Layer / File(s) Summary
Adjust kernel specialization
tensorrt_llm/_torch/attention/backends/sparse/qsa/kernels.py, tensorrt_llm/_torch/modules/mamba/causal_conv1d_triton.py, tensorrt_llm/_torch/speculative/fused_accept.py
The QSA, Mamba, and speculative-decoding kernels exclude selected row counts, request counts, batch values, or metadata alignments from specialization. Strict acceptance and the epilogue use fixed-size tiles.
Check output and cache stability
tests/unittest/_torch/attention/sparse/qsa/test_qsa_sparse.py, tests/unittest/_torch/modules/mamba/test_gdn_kernel_optimizations.py, tests/unittest/_torch/speculative/test_fused_accept.py
Tests compare outputs across shapes and offsets and check that the tested kernel caches do not grow for those variations.

AutoTuner dummy routing

Layer / File(s) Summary
Regenerate and test bucket routing
tensorrt_llm/_torch/custom_ops/trtllm_gen_custom_ops.py, tests/unittest/_torch/misc/test_autotuner.py
The dummy top-k hook no longer checks for a token-count mismatch before recreating dummy tensors when the dummy path is needed. A test checks top-k shapes and routing diversity across profile buckets.

Completion-request scheduling

Layer / File(s) Summary
Pass scheduling parameters to completion generation
tensorrt_llm/serve/openai_server.py
The scheduling helper accepts chat and completion requests. The completion route now builds scheduling parameters and passes them to generation.
Test request types and affinity scheduling
tests/unittest/disaggregated/test_disagg_internal_auth.py
The affinity request round-trip test covers chat and completion requests. An integration test checks that signed affinity reaches completion generation scheduling.

Formatted exception logging

Layer / File(s) Summary
Format tracebacks in error messages
tensorrt_llm/executor/result.py, tensorrt_llm/executor/rpc/rpc_client.py, tensorrt_llm/executor/ray/gpu_worker.py, tensorrt_llm/serve/openai_server.py, tests/unittest/utils/test_logger.py
Selected error logs append formatted traceback text instead of using exc_info=True. A test scans package Python files for specified logger calls that use an exc_info keyword.

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

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant MnnvlFusionAllReduce
  participant OneShotKernel
  participant DependentResidualRMSNorm
  Caller->>MnnvlFusionAllReduce: Pass completion-timing flag
  MnnvlFusionAllReduce->>OneShotKernel: Pass kernel parameters
  OneShotKernel->>OneShotKernel: Synchronize grid dependency
  alt triggerCompletionAtEnd is false
    OneShotKernel->>DependentResidualRMSNorm: Trigger completion before reduction
    OneShotKernel->>OneShotKernel: Run reduction
  else triggerCompletionAtEnd is true
    OneShotKernel->>OneShotKernel: Run reduction
    OneShotKernel->>DependentResidualRMSNorm: Trigger completion after reduction
  end
Loading

Possibly related PRs

Suggested reviewers: juney-nvidia

Merge Risk: Low · up to a8e49

The default behavior is preserved, and the remaining concerns are narrow: a test assertion that is too weak, an opt-in flag that is not forwarded through the high-level path, and a logging check that can miss some files. These are worth follow-up and are not expected to cause serious failures if merged.

Security architecture risk: Low · up to a8e49

Existing authentication checks and default execution behavior are preserved. No introduced security boundary bypass was identified, but deployment compatibility and interrupted-execution recovery were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The newly forwarded external influence is a completion-request scheduling hint on context or generation workers. Its acceptance remains constrained by the existing role and signature checks; this change does not establish a new identity or data-access grant.

Trust Boundaries and Controls

  • observed — Affinity authentication binds the hint to its purpose, destination role, model, child conversation identity, request type, and disaggregated request ID using HMAC-SHA256. The validator rejects a supplied hint without a key or valid signature and ignores headers outside applicable worker roles. This implementation predates the PR and is newly reused by the completion path.

Resilience and Maintainability Implications

  • observed — Both all-reduce timing modes retain entry dependency synchronization and the output-publication and communication-flag update sequence. A new two-GPU test compares an all-reduce followed by a dependent normalization operation in early and default modes. This supports the intended chained-execution contract but does not establish interrupted-rank recovery or correctness for every downstream consumer.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title uses the required bracket format with a [None] ticket and a [fix] type, and it names the broad theme of the PR. However, the changeset spans seven unrelated changes (logger exc_info handling…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is thorough and covers the seven independent changes, with a clear rationale and evidence for each. It does not follow the repository template exactly: the title line is not in the tem…
Full details: Title check

Explanation

The title uses the required bracket format with a [None] ticket and a [fix] type, and it names the broad theme of the PR. However, the changeset spans seven unrelated changes (logger exc_info handling, completions scheduling hint, Triton specialization in speculative decoding, causal_conv1d and QSA, AutoTuner dummy routing, and MNNVL early PDL release). The title refers to real aspects of the change, but 'runtime fixes and small kernel changes' is overly broad and does not name the main point. This makes it partially related rather than fully related, so it passes under the partial-relation criterion.

Full details: Description check

Explanation

The description is thorough and covers the seven independent changes, with a clear rationale and evidence for each. It does not follow the repository template exactly: the title line is not in the template format, and the Description section is organized as per-change subsections rather than a short issue and solution summary. The Test Coverage section is detailed and lists specific tests. The PR checklist is present and ticked. The description is mostly complete, so the check passes.

Finishing Touches

Generate unit tests (beta)

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

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a0fc279 and a8e4925.

Files selected for processing: 4

  • tensorrt_llm/_torch/attention/backends/sparse/qsa/kernels.py
  • tensorrt_llm/_torch/speculative/fused_accept.py
  • tests/unittest/_torch/attention/sparse/qsa/test_qsa_sparse.py
  • tests/unittest/_torch/speculative/test_fused_accept.py

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

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84101 [ run ] triggered by Bot. Commit: ab6f20b Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84101 [ run ] completed with state DISABLED
The CI pipeline is currently frozen to deploy an urgent hotfix. For time-sensitive requests, please contact trt-llm-infra-devs.

Link to invocation

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84328 [ run ] triggered by Bot. Commit: a0fc279 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84284 [ run ] completed with state ABORTED. Commit: 572fde4

Link to invocation

@zongfeijing zongfeijing 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 from the kernel side

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84328 [ run ] completed with state SUCCESS. Commit: a0fc279
/LLM/main/L0_MergeRequest_PR pipeline #69736 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    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

Link to invocation

@farazkh80 farazkh80 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 attention perspective, with a couple questions (non-blocking).

…ore and split-K kernels

_qsa_paged_kv_store_kernel, _qsa_paged_sparse_gqa_splitk_kernel and
_qsa_merge_splitk_kernel let Triton specialize num_rows (== 1, divisible
by 16), which follows the step's row count, so a new row count compiled
a new variant inside served steps. Mark it do_not_specialize, as the
other QSA metadata kernels do.

Signed-off-by: Wanli Jiang <[email protected]>
…stride

With [rows, tokens] MRoPE positions, pos_row_stride is the token count,
so Triton's == 1 / divisible-by-16 specialization of it compiled a new
_step0_epilogue_kernel variant as the token count changed.

Signed-off-by: Wanli Jiang <[email protected]>
@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

1 similar comment
@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84512 [ run ] triggered by Bot. Commit: a8e4925 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84512 [ run ] completed with state SUCCESS. Commit: a8e4925
/LLM/main/L0_MergeRequest_PR pipeline #69902 completed with status: 'UNSTABLE'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #10885: nsc-svg-slurm-1 compute outage with no backup route, 2026-11-13 00:00-07:00 Beijing time. H100_PCIe-PyTorch-Perf-1 was retired from main; skip the legacy stage in older PR revisions.
Affected stages:
DGX_B200-CPP-1
DGX_B200-PyTorch-1
DGX_B200-PyTorch-2
DGX_B200-PyTorch-3
DGX_B200-PyTorch-4
DGX_B200-PyTorch-5
DGX_B200-PyTorch-6
DGX_B200-PyTorch-7
DGX_B200-PyTorch-8
DGX_B200-PyTorch-9

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    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

Link to invocation

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84571 [ run ] triggered by Bot. Commit: a8e4925 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84571 [ run ] completed with state FAILURE. Commit: a8e4925
/LLM/main/L0_MergeRequest_PR pipeline #69960 completed with status: 'UNSTABLE'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #9860: nsc-svg-slurm-1 compute outage with no backup route, 2026-11-13 00:00-07:00 Beijing time. H100_PCIe-PyTorch-Perf-1 was retired from main; skip the legacy stage in older PR revisions.
Affected stages:
DGX_B200-CPP-1
DGX_B200-PyTorch-1
DGX_B200-PyTorch-2
DGX_B200-PyTorch-3
DGX_B200-PyTorch-4
DGX_B200-PyTorch-5
DGX_B200-PyTorch-6
DGX_B200-PyTorch-7
DGX_B200-PyTorch-8
DGX_B200-PyTorch-9

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Either:

  • Wait for the PR to be fully approved — the label is added automatically once approval is complete. Having unresolved open comments is fine, or
  • If needed, ask a member of NVIDIA/trt-llm-ci-approvers to add the label manually.
    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

Link to invocation

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84686 [ run ] triggered by Bot. Commit: a8e4925 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84686 [ run ] completed with state SUCCESS. Commit: a8e4925
/LLM/main/L0_MergeRequest_PR pipeline #70065 completed with status: 'FAILURE'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #10929: nsc-svg-slurm-1 compute outage with no backup route, 2026-11-13 00:00-07:00 Beijing time. H100_PCIe-PyTorch-Perf-1 was retired from main; skip the legacy stage in older PR revisions.
Affected stages:
DGX_B200-CPP-1
DGX_B200-PyTorch-1
DGX_B200-PyTorch-2
DGX_B200-PyTorch-3
DGX_B200-PyTorch-4
DGX_B200-PyTorch-5
DGX_B200-PyTorch-6
DGX_B200-PyTorch-7
DGX_B200-PyTorch-8
DGX_B200-PyTorch-9

Resource maintenance in LLM/main/L0_Test-x86_64-Multi-GPU #3508: nsc-svg-slurm-1 compute outage with no backup route, 2026-11-13 00:00-07:00 Beijing time. H100_PCIe-PyTorch-Perf-1 was retired from main; skip the legacy stage in older PR revisions.
Affected stages:
DGX_B200-2_GPUs-PyTorch-1
DGX_B200-4_GPUs-PyTorch-1
DGX_B200-4_GPUs-PyTorch-2
DGX_B200-4_GPUs-PyTorch-3
DGX_B200-4_GPUs-PyTorch-Ray-1
DGX_B200-8_GPUs-PyTorch-1
DGX_B200-8_GPUs-PyTorch-2
DGX_B200-8_GPUs-PyTorch-3
DGX_B200-8_GPUs-PyTorch-4

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

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

test_minimal_instances[etcd-round_robin] (pipeline #70065) doesn't look related to this PR: the 400 "Invalid internal disaggregated request authentication" comes from _validate_internal_disagg_request (openai_server.py:3110), which runs before the new scheduling-params call and is unchanged here. The http variant passed in the same job, and the rerun hit etcd port 2380 already in use. Rerunning.

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84748 [ run ] triggered by Bot. Commit: a8e4925 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #84748 [ run ] completed with state SUCCESS. Commit: a8e4925
/LLM/main/L0_MergeRequest_PR pipeline #70120 completed with status: 'SUCCESS'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #9904: nsc-svg-slurm-1 compute outage with no backup route, 2026-11-13 00:00-07:00 Beijing time. H100_PCIe-PyTorch-Perf-1 was retired from main; skip the legacy stage in older PR revisions.
Affected stages:
DGX_B200-CPP-1
DGX_B200-PyTorch-1
DGX_B200-PyTorch-2
DGX_B200-PyTorch-3
DGX_B200-PyTorch-4
DGX_B200-PyTorch-5
DGX_B200-PyTorch-6
DGX_B200-PyTorch-7
DGX_B200-PyTorch-8
DGX_B200-PyTorch-9

Resource maintenance in LLM/main/L0_Test-x86_64-Multi-GPU #3513: nsc-svg-slurm-1 compute outage with no backup route, 2026-11-13 00:00-07:00 Beijing time. H100_PCIe-PyTorch-Perf-1 was retired from main; skip the legacy stage in older PR revisions.
Affected stages:
DGX_B200-2_GPUs-PyTorch-1
DGX_B200-4_GPUs-PyTorch-1
DGX_B200-4_GPUs-PyTorch-2
DGX_B200-4_GPUs-PyTorch-3
DGX_B200-4_GPUs-PyTorch-Ray-1
DGX_B200-8_GPUs-PyTorch-1
DGX_B200-8_GPUs-PyTorch-2
DGX_B200-8_GPUs-PyTorch-3
DGX_B200-8_GPUs-PyTorch-4

Link to invocation

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.

9 participants