Skip to content

[TRTLLM-1316] refactor: Remove unnecessary pipeline parallelism logic from postProcessRequest - #5489

Merged
Funatiq merged 5 commits into
NVIDIA:mainfrom
Funatiq:dev/remove_pp_logits
Jul 2, 2025
Merged

Funatiq merged 5 commits into
NVIDIA:mainfrom
Funatiq:dev/remove_pp_logits

Conversation

@Funatiq

@Funatiq Funatiq commented Jun 25, 2025 •

Copy link
Copy Markdown
Collaborator

Description

  • Enable logits validation for multi-gpu executor tests.
  • Slightly increase timeout to accommodate for longer generation time.
  • Remove unnecessary pipeline parallelism logic from postProcessRequest. Logits don't need to be sent to first pipeline rank because responses are generated on last rank.

Test Coverage

GitHub Bot Help

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

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

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

See details below for each supported subcommand.

Details

run [--disable-fail-fast --skip-test --stage-list "A10-1, xxx" --gpu-type "A30, H100_PCIe" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-[Post-Merge]-1, xxx"]

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

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

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

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

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

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

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

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests. Will also run L0 pre-merge pipeline.

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

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

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

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

reuse-pipeline

reuse-pipeline

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

@Funatiq

Funatiq commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #9894 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #9894 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #7302 (Partly Tested) completed with status: 'FAILURE'

@Funatiq
Funatiq force-pushed the dev/remove_pp_logits branch from 18a2880 to c17903a Compare June 26, 2025 14:50
@Funatiq

Funatiq commented Jun 26, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10047 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10047 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #7415 (Partly Tested) completed with status: 'FAILURE'

@Funatiq

Funatiq commented Jun 26, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10058 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10058 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #7425 (Partly Tested) completed with status: 'FAILURE'

@Funatiq

Funatiq commented Jun 26, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10064 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10064 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #7429 (Partly Tested) completed with status: 'FAILURE'

@Funatiq

Funatiq commented Jun 27, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10129 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10129 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #7476 (Partly Tested) completed with status: 'FAILURE'

@Funatiq

Funatiq commented Jun 27, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10132 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10132 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #7479 (Partly Tested) completed with status: 'FAILURE'

@Funatiq

Funatiq commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10280 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10280 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #7598 (Partly Tested) completed with status: 'FAILURE'

@Funatiq
Funatiq force-pushed the dev/remove_pp_logits branch from 3827848 to 9739e87 Compare June 30, 2025 07:19
@Funatiq

Funatiq commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10298 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10298 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #7615 (Partly Tested) completed with status: 'FAILURE'

@Funatiq
Funatiq force-pushed the dev/remove_pp_logits branch from 9739e87 to 4bbb931 Compare June 30, 2025 12:58
@Funatiq

Funatiq commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_H100-4_GPUs-CPP-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10364 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10364 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #7662 (Partly Tested) completed with status: 'FAILURE'

@Funatiq

Funatiq commented Jul 1, 2025

Copy link
Copy Markdown
Collaborator Author

/bot run

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

Pull Request Overview

This PR removes obsolete pipeline-parallel communication for logits in postProcessRequest, introduces tolerance parameters for logits comparisons, and updates test utilities and scripts to handle logits outputs and measure execution time.

  • Remove pipeline-parallel send/recv of context and generation logits
  • Add atol/rtol parameters to validateContextLogits/validateGenerationLogits and propagate in tests
  • Enhance Python build/generation scripts to support new logits flags and print durations

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

File Description
cpp/tensorrt_llm/batch_manager/trtGptModelInflightBatching.cpp Remove unnecessary pipeline-parallel logits communication in postProcessRequest
cpp/tests/utils/common.h / common.cpp Add PathUtil methods for new logits files; extend validation methods with tolerance params
cpp/tests/executor/executorTest.cpp Pass tolerance values based on modelParallelism, update runTest signatures
cpp/tests/resources/scripts/*.py Update generation/build scripts: import time, build dynamic CLI args for logits outputs
Comments suppressed due to low confidence (2)

cpp/tests/executor/executorTest.cpp:2023

  • [nitpick] Consider renaming modelParallelism to something like totalParallelism or combinedParallelism to clarify that it represents the product of tensor and pipeline parallel sizes.
                        float const logitsAtol = modelParallelism > 1 ? 1e-1 : 1e-2;

cpp/tests/utils/common.h:104

  • Add a brief doc comment for this new PathUtil method to explain that it returns the file path for packed‐paged context logits (TP=4, PP=1).
    static std::string FP16_PLUGIN_PACKED_PAGED_CONTEXT_LOGITS_TP4_PP1_FILE();

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10501 [ run ] triggered by Bot

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #10501 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #7775 completed with status: 'SUCCESS'

@Funatiq
Funatiq requested a review from achartier July 1, 2025 15:10

@achartier achartier 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

@Funatiq
Funatiq merged commit 4cd8543 into NVIDIA:main Jul 2, 2025
@Funatiq
Funatiq deleted the dev/remove_pp_logits branch July 2, 2025 08:13
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 9, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 10, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 10, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 10, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 10, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 11, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 11, 2025
dominicshanshan pushed a commit to dominicshanshan/TensorRT-LLM that referenced this pull request Jul 11, 2025
yuxianq added a commit to yuxianq/TensorRT-LLM that referenced this pull request Sep 23, 2026
Pin the temporary FlashInfer dev branch at 07962bd09ea5200ca141ef19a10f2d8c0a43f932 and regenerate the vendor compatibility patch and snapshot digests. Use store_softmax_stats in MLA context planning, synchronized with FlashInfer PR NVIDIA#5489.

Validated 253 host tests and 51 B200 attention-backend tests, including Kimi K3 cached/chunked context with BF16/FP8 KV cache and CUDA graph replay. The vendored tree matches the tested source exactly.

Signed-off-by: Yuxian Qiu <[email protected]>
yuxianq added a commit to yuxianq/TensorRT-LLM that referenced this pull request Oct 9, 2026
Pin the temporary FlashInfer dev branch at 07962bd09ea5200ca141ef19a10f2d8c0a43f932 and regenerate the vendor compatibility patch and snapshot digests. Use store_softmax_stats in MLA context planning, synchronized with FlashInfer PR NVIDIA#5489.

Validated 253 host tests and 51 B200 attention-backend tests, including Kimi K3 cached/chunked context with BF16/FP8 KV cache and CUDA graph replay. The vendored tree matches the tested source exactly.

Signed-off-by: Yuxian Qiu <[email protected]>
yuxianq added a commit to yuxianq/TensorRT-LLM that referenced this pull request Oct 13, 2026
Pin the temporary FlashInfer dev branch at 07962bd09ea5200ca141ef19a10f2d8c0a43f932 and regenerate the vendor compatibility patch and snapshot digests. Use store_softmax_stats in MLA context planning, synchronized with FlashInfer PR NVIDIA#5489.

Validated 253 host tests and 51 B200 attention-backend tests, including Kimi K3 cached/chunked context with BF16/FP8 KV cache and CUDA graph replay. The vendored tree matches the tested source exactly.

Signed-off-by: Yuxian Qiu <[email protected]>
yuxianq added a commit to yuxianq/TensorRT-LLM that referenced this pull request Oct 26, 2026
Pin the temporary FlashInfer dev branch at 07962bd09ea5200ca141ef19a10f2d8c0a43f932 and regenerate the vendor compatibility patch and snapshot digests. Use store_softmax_stats in MLA context planning, synchronized with FlashInfer PR NVIDIA#5489.

Validated 253 host tests and 51 B200 attention-backend tests, including Kimi K3 cached/chunked context with BF16/FP8 KV cache and CUDA graph replay. The vendored tree matches the tested source exactly.

Signed-off-by: Yuxian Qiu <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 20, 2026
…4.1 decode follow-up

Pin the vendored PrimTS to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup 0f82908379: the PrimTS dev branch
(yuxianq/flashinfer trtllm-prims-ts-dev-20261107 31fe2dbd6b) with the FlashInfer
main changes it lacks (NVIDIA#9087, NVIDIA#6988, NVIDIA#9315, NVIDIA#9375, NVIDIA#9224, NVIDIA#5489, NVIDIA#8549), the
FP8+NVFP4 decode commits of flashinfer-ai/flashinfer#9701 (PDL after the
prologue, TMA-gathered FP8 tiles, early Q release) and one commit that runs
the decode loops NVIDIA#9315 and NVIDIA#9375 added on the dev branch's tree-walking task
API. It replaces trtllm-prims-ts-nvfp4-ws d36da5b4bc.

The new pin has none of d36da5b4bc's in-kernel split finishers, run-ahead inputs
or producer query/selection hooks, so the CSA2 paths built on them go:
- PackedSparseMLA plans no longer run ahead of their preceding launch
  (inputs_final, main_ready) or merge split-KV partials in the kernel
  (cluster_split_finish, fused_split_finish); split plans take the reducer
  launch again.
- The packed producer no longer stages a BF16 Q with its GPT-J RoPE (query_rope)
  or prefetches raw selections. Small PrimTS decode steps write the unit-scale
  E4M3 Q with gptj_rope_e4m3_small_m for INT32 positions as for INT64 ones.
  Raw selections stay.
Since every admitted generation step takes the direct decode, the run-ahead and
query-RoPE paths served only PrimTS steps of 17 rows up to the fused FP8 Q
projection's size.

Adaptations to the new kernels:
- The persisted MLA decode kernels take a kv_bounds argument (FlashInfer NVIDIA#5489);
  the packed, gather and NVFP4 launches pass None.
- MXFP8OutputQuant declares stages_ws_sw128_rows, which the WS TMA output path
  now requires of an output quantizer; its store already stages SW128 WS rows.

The compatibility patch is regenerated for the new pin. _hardware.py's new SM107
helper imports flashinfer.cute_dsl absolutely; the parallel-reduction rename is
upstream, and the dev branch's _resolve_domain already traces the 1CTA MLA task
domain with constant-folded checks. The flashinfer-python 0.7.2 shims of the QToken-KvBlock metadata ABI
are dropped: 0.7.3 ships upstream's metadata module (the locator, current-block
and fixed-query arguments and the query-major entry points), which the shims
called with too few arguments.

Tests: test_prims_ts_runahead_matches_ordered and
test_prims_ts_plans_ignore_main_ready_without_runahead go with the run-ahead path
(the former also from l0_gb300_ds_v4_1.yml); the shared-kernel case keeps a
raw-selection plan.

Signed-off-by: linquanh <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 24, 2026
…4.1 decode follow-up

Pin the vendored PrimTS to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup-r2 d63ab76b73: the PrimTS dev branch
(yuxianq/flashinfer trtllm-prims-ts-dev-20261107 69527ce04) with the FlashInfer
main changes it lacks (NVIDIA#9087, NVIDIA#6988, NVIDIA#9315, NVIDIA#9375, NVIDIA#9224), the FP8+NVFP4 decode
commits of flashinfer-ai/flashinfer#9701 (PDL after the prologue, TMA-gathered
FP8 tiles, early Q release) and one commit that runs the decode loops NVIDIA#9315 and
NVIDIA#9375 added on the dev branch's tree-walking task API. The dev branch already
carries NVIDIA#8549, and NVIDIA#5489 in its reviewed form. It replaces
trtllm-prims-ts-nvfp4-ws d36da5b4bc.

The new pin has none of d36da5b4bc's in-kernel split finishers, run-ahead inputs
or producer query/selection hooks, so the CSA2 paths built on them go:
- PackedSparseMLA plans no longer run ahead of their preceding launch
  (inputs_final, main_ready) or merge split-KV partials in the kernel
  (cluster_split_finish, fused_split_finish); split plans take the reducer
  launch again.
- The packed producer no longer stages a BF16 Q with its GPT-J RoPE (query_rope)
  or prefetches raw selections. Small PrimTS decode steps write the unit-scale
  E4M3 Q with gptj_rope_e4m3_small_m for INT32 positions as for INT64 ones.
  Raw selections stay.
Since every admitted generation step takes the direct decode, the run-ahead and
query-RoPE paths served only PrimTS steps of 17 rows up to the fused FP8 Q
projection's size.

Adaptations to the new kernels:
- The persisted MLA decode kernels take a context-parallel rank (FlashInfer
  NVIDIA#5489); the packed, gather and NVFP4 launches pass rank 0, and the packed
  compile declares it as an Int32.
- MXFP8OutputQuant declares stages_ws_sw128_rows, which the WS TMA output path
  now requires of an output quantizer; its store already stages SW128 WS rows.

The compatibility patch is regenerated for the new pin. _hardware.py's new SM107
helper imports flashinfer.cute_dsl absolutely; the parallel-reduction rename is
upstream, and the dev branch's _resolve_domain already traces the 1CTA MLA task
domain with constant-folded checks. The flashinfer-python 0.7.2 shims of the QToken-KvBlock metadata ABI
are dropped: 0.7.3 ships upstream's metadata module (the locator, current-block
and fixed-query arguments and the query-major entry points), which the shims
called with too few arguments. The patch carries main's prepared sparse-MLA
launch again, passing context-parallel rank 0; the d80b3221 sync had dropped it.

Tests: test_prims_ts_runahead_matches_ordered and
test_prims_ts_plans_ignore_main_ready_without_runahead go with the run-ahead path
(the former also from l0_gb300_ds_v4_1.yml); the shared-kernel case keeps a
raw-selection plan.

Signed-off-by: linquanh <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 24, 2026
…4.1 decode follow-up

Pin the vendored PrimTS to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup-r2 d63ab76b73: the PrimTS dev branch
(yuxianq/flashinfer trtllm-prims-ts-dev-20261107 69527ce04) with the FlashInfer
main changes it lacks (NVIDIA#9087, NVIDIA#6988, NVIDIA#9315, NVIDIA#9375, NVIDIA#9224), the FP8+NVFP4 decode
commits of flashinfer-ai/flashinfer#9701 (PDL after the prologue, TMA-gathered
FP8 tiles, early Q release) and one commit that runs the decode loops NVIDIA#9315 and
NVIDIA#9375 added on the dev branch's tree-walking task API. The dev branch already
carries NVIDIA#8549, and NVIDIA#5489 in its reviewed form. It replaces
trtllm-prims-ts-nvfp4-ws d36da5b4bc.

The new pin has none of d36da5b4bc's in-kernel split finishers, run-ahead inputs
or producer query/selection hooks, so the CSA2 paths built on them go:
- PackedSparseMLA plans no longer run ahead of their preceding launch
  (inputs_final, main_ready) or merge split-KV partials in the kernel
  (cluster_split_finish, fused_split_finish); split plans take the reducer
  launch again.
- The packed producer no longer stages a BF16 Q with its GPT-J RoPE (query_rope)
  or prefetches raw selections. Small PrimTS decode steps write the unit-scale
  E4M3 Q with gptj_rope_e4m3_small_m for INT32 positions as for INT64 ones.
  Raw selections stay.
Since every admitted generation step takes the direct decode, the run-ahead and
query-RoPE paths served only PrimTS steps of 17 rows up to the fused FP8 Q
projection's size.

Adaptations to the new kernels:
- The persisted MLA decode kernels take a context-parallel rank (FlashInfer
  NVIDIA#5489); the packed, gather and NVFP4 launches pass rank 0, and the packed
  compile declares it as an Int32.
- MXFP8OutputQuant declares stages_ws_sw128_rows, which the WS TMA output path
  now requires of an output quantizer; its store already stages SW128 WS rows.

The compatibility patch is regenerated for the new pin. _hardware.py's new SM107
helper imports flashinfer.cute_dsl absolutely; the parallel-reduction rename is
upstream, and the dev branch's _resolve_domain already traces the 1CTA MLA task
domain with constant-folded checks. The flashinfer-python 0.7.2 shims of the QToken-KvBlock metadata ABI
are dropped: 0.7.3 ships upstream's metadata module (the locator, current-block
and fixed-query arguments and the query-major entry points), which the shims
called with too few arguments. The patch carries main's prepared sparse-MLA
launch again, passing context-parallel rank 0; the d80b3221 sync had dropped it.

Tests: test_prims_ts_runahead_matches_ordered and
test_prims_ts_plans_ignore_main_ready_without_runahead go with the run-ahead path
(the former also from l0_gb300_ds_v4_1.yml); the shared-kernel case keeps a
raw-selection plan.

Signed-off-by: linquanh <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 25, 2026
…4.1 decode follow-up

Pin the vendored PrimTS to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup-r2 d63ab76b73: the PrimTS dev branch
(yuxianq/flashinfer trtllm-prims-ts-dev-20261107 69527ce04) with the FlashInfer
main changes it lacks (NVIDIA#9087, NVIDIA#6988, NVIDIA#9315, NVIDIA#9375, NVIDIA#9224), the FP8+NVFP4 decode
commits of flashinfer-ai/flashinfer#9701 (PDL after the prologue, TMA-gathered
FP8 tiles, early Q release) and one commit that runs the decode loops NVIDIA#9315 and
NVIDIA#9375 added on the dev branch's tree-walking task API. The dev branch already
carries NVIDIA#8549, and NVIDIA#5489 in its reviewed form. It replaces
trtllm-prims-ts-nvfp4-ws d36da5b4bc.

The new pin has none of d36da5b4bc's in-kernel split finishers, run-ahead inputs
or producer query/selection hooks, so the CSA2 paths built on them go:
- PackedSparseMLA plans no longer run ahead of their preceding launch
  (inputs_final, main_ready) or merge split-KV partials in the kernel
  (cluster_split_finish, fused_split_finish); split plans take the reducer
  launch again.
- The packed producer no longer stages a BF16 Q with its GPT-J RoPE (query_rope)
  or prefetches raw selections. Small PrimTS decode steps write the unit-scale
  E4M3 Q with gptj_rope_e4m3_small_m for INT32 positions as for INT64 ones.
  Raw selections stay.
Since every admitted generation step takes the direct decode, the run-ahead and
query-RoPE paths served only PrimTS steps of 17 rows up to the fused FP8 Q
projection's size.

Adaptations to the new kernels:
- The persisted MLA decode kernels take a context-parallel rank (FlashInfer
  NVIDIA#5489); the packed, gather and NVFP4 launches pass rank 0, and the packed
  compile declares it as an Int32.
- MXFP8OutputQuant declares stages_ws_sw128_rows, which the WS TMA output path
  now requires of an output quantizer; its store already stages SW128 WS rows.

The compatibility patch is regenerated for the new pin. _hardware.py's new SM107
helper imports flashinfer.cute_dsl absolutely; the parallel-reduction rename is
upstream, and the dev branch's _resolve_domain already traces the 1CTA MLA task
domain with constant-folded checks. The flashinfer-python 0.7.2 shims of the QToken-KvBlock metadata ABI
are dropped: 0.7.3 ships upstream's metadata module (the locator, current-block
and fixed-query arguments and the query-major entry points), which the shims
called with too few arguments. The patch carries main's prepared sparse-MLA
launch again, passing context-parallel rank 0; the d80b3221 sync had dropped it.

Tests: test_prims_ts_runahead_matches_ordered and
test_prims_ts_plans_ignore_main_ready_without_runahead go with the run-ahead path
(the former also from l0_gb300_ds_v4_1.yml); the shared-kernel case keeps a
raw-selection plan.

Signed-off-by: linquanh <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 26, 2026
…4.1 decode follow-up

Pin the vendored PrimTS to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup-r2 d63ab76b73: the PrimTS dev branch
(yuxianq/flashinfer trtllm-prims-ts-dev-20261107 69527ce04) with the FlashInfer
main changes it lacks (NVIDIA#9087, NVIDIA#6988, NVIDIA#9315, NVIDIA#9375, NVIDIA#9224), the FP8+NVFP4 decode
commits of flashinfer-ai/flashinfer#9701 (PDL after the prologue, TMA-gathered
FP8 tiles, early Q release) and one commit that runs the decode loops NVIDIA#9315 and
NVIDIA#9375 added on the dev branch's tree-walking task API. The dev branch already
carries NVIDIA#8549, and NVIDIA#5489 in its reviewed form. It replaces
trtllm-prims-ts-nvfp4-ws d36da5b4bc.

The new pin has none of d36da5b4bc's in-kernel split finishers, run-ahead inputs
or producer query/selection hooks, so the CSA2 paths built on them go:
- PackedSparseMLA plans no longer run ahead of their preceding launch
  (inputs_final, main_ready) or merge split-KV partials in the kernel
  (cluster_split_finish, fused_split_finish); split plans take the reducer
  launch again.
- The packed producer no longer stages a BF16 Q with its GPT-J RoPE (query_rope)
  or prefetches raw selections. Small PrimTS decode steps write the unit-scale
  E4M3 Q with gptj_rope_e4m3_small_m for INT32 positions as for INT64 ones.
  Raw selections stay.
Since every admitted generation step takes the direct decode, the run-ahead and
query-RoPE paths served only PrimTS steps of 17 rows up to the fused FP8 Q
projection's size.

Adaptations to the new kernels:
- The persisted MLA decode kernels take a context-parallel rank (FlashInfer
  NVIDIA#5489); the packed, gather and NVFP4 launches pass rank 0, and the packed
  compile declares it as an Int32.
- MXFP8OutputQuant declares stages_ws_sw128_rows, which the WS TMA output path
  now requires of an output quantizer; its store already stages SW128 WS rows.

The compatibility patch is regenerated for the new pin. _hardware.py's new SM107
helper imports flashinfer.cute_dsl absolutely; the parallel-reduction rename is
upstream, and the dev branch's _resolve_domain already traces the 1CTA MLA task
domain with constant-folded checks. The flashinfer-python 0.7.2 shims of the QToken-KvBlock metadata ABI
are dropped: 0.7.3 ships upstream's metadata module (the locator, current-block
and fixed-query arguments and the query-major entry points), which the shims
called with too few arguments. The patch carries main's prepared sparse-MLA
launch again, passing context-parallel rank 0; the d80b3221 sync had dropped it.

Tests: test_prims_ts_runahead_matches_ordered and
test_prims_ts_plans_ignore_main_ready_without_runahead go with the run-ahead path
(the former also from l0_gb300_ds_v4_1.yml); the shared-kernel case keeps a
raw-selection plan.

Signed-off-by: linquanh <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 26, 2026
…llow-up on the dev tip

Pin tensorrt_llm/_torch/attention/backends/prims_ts to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup-r3 at d8c40b52f9. That branch is the PrimTS dev
branch main pins (yuxianq/flashinfer trtllm-prims-ts-dev-20261107 at d81912f0b, NVIDIA#22274)
plus:
- the FlashInfer main PrimTS changes the dev branch lacks, in order:
  flashinfer-ai/flashinfer#6988, NVIDIA#9315, NVIDIA#9375 and NVIDIA#9224 (NVIDIA#9087, NVIDIA#9222, NVIDIA#5489 and NVIDIA#8549 are
  already on it). Where they meet the dev branch's CUTLASS DSL 4.9 task-API changes
  (runtime_domain_end, consumer_work_stage, _resolve_domain, ContextTask), the conflict
  resolutions keep the upstream logic in the dev branch's form;
- the DeepSeek-V4.1 sparse MLA decode commits of flashinfer-ai/flashinfer#9701: the
  FP8+NVFP4 one-CTA Keep-AB decode, PDL after the prologue, FP8 tiles TMA-gathered into
  the retained K/V tile, the TMA-staged Q slot released after the last QK, and their tests;
- one commit that puts the loops and stage reads NVIDIA#9315 and NVIDIA#9375 added in that same form; on
  the CuTe DSL 4.7/4.8 task API it changes nothing.

The compatibility patch is main's, regenerated for the new pin, plus one adaptation:
_hardware.py's SM107 check imports flashinfer.cute_dsl.availability absolutely, since its
relative import would leave the vendored package. The vendored tree differs from main's
only in the 29 files the follow-up commits change, and main's PrimTS users run on it
unchanged.

Signed-off-by: linquanh <[email protected]>
kris1025 added a commit to kris1025/TensorRT-LLM that referenced this pull request Nov 26, 2026
…llow-up on the dev tip

Pin tensorrt_llm/_torch/attention/backends/prims_ts to kris1025/flashinfer
linquanh/trtllm-prims-ts-dev-ds41-followup-r3 at d8c40b52f9. That branch is the PrimTS dev
branch main pins (yuxianq/flashinfer trtllm-prims-ts-dev-20261107 at d81912f0b, NVIDIA#22274)
plus:
- the FlashInfer main PrimTS changes the dev branch lacks, in order:
  flashinfer-ai/flashinfer#6988, NVIDIA#9315, NVIDIA#9375 and NVIDIA#9224 (NVIDIA#9087, NVIDIA#9222, NVIDIA#5489 and NVIDIA#8549 are
  already on it). Where they meet the dev branch's CUTLASS DSL 4.9 task-API changes
  (runtime_domain_end, consumer_work_stage, _resolve_domain, ContextTask), the conflict
  resolutions keep the upstream logic in the dev branch's form;
- the DeepSeek-V4.1 sparse MLA decode commits of flashinfer-ai/flashinfer#9701: the
  FP8+NVFP4 one-CTA Keep-AB decode, PDL after the prologue, FP8 tiles TMA-gathered into
  the retained K/V tile, the TMA-staged Q slot released after the last QK, and their tests;
- one commit that puts the loops and stage reads NVIDIA#9315 and NVIDIA#9375 added in that same form; on
  the CuTe DSL 4.7/4.8 task API it changes nothing.

The compatibility patch is main's, regenerated for the new pin, plus one adaptation:
_hardware.py's SM107 check imports flashinfer.cute_dsl.availability absolutely, since its
relative import would leave the vendored package. The vendored tree differs from main's
only in the 29 files the follow-up commits change, and main's PrimTS users run on it
unchanged.

Signed-off-by: linquanh <[email protected]>
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.

5 participants