Skip to content

Conversation

@ixlmar
Copy link
Collaborator

@ixlmar ixlmar commented Oct 22, 2025

Description

  • This implements batched sampling using the FlashInfer sampling functions (TRTLLM-7723).

  • FlashInfer is used if possible, unless _disable_flash_infer_sampling=True. The latter is to remain the default at least until there is better test coverage.

  • When using FlashInfer, requests with different parameter values (e.g. top-p requests with different thresholds) can be batched together, which is expected to reduce latency for mixed batches (TRTLLM-8375). Also, temperature and SoftMax are applied only once (TRTLLM-8376).

Test Coverage

Coverage for the default functionality is unchanged (because _disable_flash_infer_sampling=True is the default). Test coverage will be improved in a separate PR.

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)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • 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

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

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

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

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

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

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

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-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.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

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

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

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

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

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

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

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.

Summary by CodeRabbit

  • New Features

    • Added configuration option to disable Flash Inference sampling when desired.
  • Refactor

    • Enhanced sampling infrastructure with improved type safety for sampling strategies.
    • Integrated Flash Inference support for optimized batched sampling operations.
    • Made checkpoint directory parameter explicitly optional in executor creation.

@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 22, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22176 [ run ] triggered by Bot. Commit: f2af5a0

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22176 [ run ] completed with state FAILURE. Commit: f2af5a0
/LLM/main/L0_MergeRequest_PR pipeline #16723 completed with status: 'FAILURE'

@ixlmar ixlmar force-pushed the feat/flashinfer-sampling branch from f2af5a0 to 530e64b Compare October 23, 2025 06:17
@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 23, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22257 [ run ] triggered by Bot. Commit: 530e64b

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22257 [ run ] completed with state SUCCESS. Commit: 530e64b
/LLM/main/L0_MergeRequest_PR pipeline #16778 completed with status: 'FAILURE'

@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 23, 2025

/bot run --disable-fail-fast

1 similar comment
@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 23, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22294 [ run ] triggered by Bot. Commit: 530e64b

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22294 [ run ] completed with state SUCCESS. Commit: 530e64b
/LLM/main/L0_MergeRequest_PR pipeline #16807 completed with status: 'FAILURE'

@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 29, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22907 [ run ] triggered by Bot. Commit: 6994f9c

@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 29, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22914 [ run ] triggered by Bot. Commit: 6994f9c

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22907 [ run ] completed with state ABORTED. Commit: 6994f9c
LLM/main/L0_MergeRequest_PR #17277 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #22914 [ run ] completed with state ABORTED. Commit: 6994f9c
/LLM/main/L0_MergeRequest_PR pipeline #17283 completed with status: 'FAILURE'

@ixlmar ixlmar force-pushed the feat/flashinfer-sampling branch from 6994f9c to 6ec395d Compare October 30, 2025 08:13
@ixlmar
Copy link
Collaborator Author

ixlmar commented Oct 30, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23019 [ run ] triggered by Bot. Commit: 6ec395d

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23019 [ run ] completed with state SUCCESS. Commit: 6ec395d
/LLM/main/L0_MergeRequest_PR pipeline #17355 completed with status: 'FAILURE'

@ixlmar ixlmar force-pushed the feat/flashinfer-sampling branch from 6ec395d to bb06fbf Compare November 3, 2025 13:56
@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 3, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23396 [ run ] triggered by Bot. Commit: bb06fbf

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 4, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23495 [ run ] triggered by Bot. Commit: bb06fbf

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 7, 2025

Note: The FlashInfer path currently fails two unit tests (see CI pipeline in #8980). Those failures are to be addressed later.

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 7, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23849 [ run ] triggered by Bot. Commit: 9d94273

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23829 [ run ] completed with state ABORTED. Commit: 9d94273
LLM/main/L0_MergeRequest_PR #17940 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23849 [ run ] completed with state SUCCESS. Commit: 9d94273
/LLM/main/L0_MergeRequest_PR pipeline #17954 completed with status: 'FAILURE'

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 7, 2025

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23870 [ run ] triggered by Bot. Commit: 9d94273

@tensorrt-cicd
Copy link
Collaborator

PR_Github #23870 [ run ] completed with state SUCCESS. Commit: 9d94273
/LLM/main/L0_MergeRequest_PR pipeline #17970 completed with status: 'FAILURE'

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 10, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24010 [ run ] triggered by Bot. Commit: 9d94273

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24010 [ run ] completed with state SUCCESS. Commit: 9d94273
/LLM/main/L0_MergeRequest_PR pipeline #18087 completed with status: 'FAILURE'

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 10, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24025 [ run ] triggered by Bot. Commit: 9d94273

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24025 [ run ] completed with state SUCCESS. Commit: 9d94273
/LLM/main/L0_MergeRequest_PR pipeline #18100 completed with status: 'FAILURE'

@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 11, 2025

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24136 [ run ] triggered by Bot. Commit: 9d94273

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24136 [ run ] completed with state SUCCESS. Commit: 9d94273
/LLM/main/L0_MergeRequest_PR pipeline #18197 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

@ixlmar ixlmar requested review from nv-guomingz and removed request for syuoni November 11, 2025 10:43
@ixlmar
Copy link
Collaborator Author

ixlmar commented Nov 11, 2025

/bot reuse-pipeline

Copy link
Collaborator

@nv-guomingz nv-guomingz left a comment

Choose a reason for hiding this comment

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

LGTM

@nv-guomingz nv-guomingz enabled auto-merge (squash) November 11, 2025 11:00
@ixlmar ixlmar mentioned this pull request Nov 11, 2025
1 task
@tensorrt-cicd
Copy link
Collaborator

PR_Github #24174 [ reuse-pipeline ] triggered by Bot. Commit: b954702

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24174 [ reuse-pipeline ] completed with state SUCCESS. Commit: b954702
Reusing PR_Github #24136 for commit b954702

@nv-guomingz nv-guomingz merged commit 979b3ae into NVIDIA:main Nov 11, 2025
5 checks passed
@ixlmar ixlmar deleted the feat/flashinfer-sampling branch November 11, 2025 11:21
suyoggupta pushed a commit to nv-auto-deploy/TensorRT-LLM that referenced this pull request Nov 12, 2025
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.

4 participants