Skip to content

[TRTLLM-14022][feat] BREAKING: DON'T REVIEW Remove legacy TensorRT Python backend#16213

Draft
Wanli-Jiang wants to merge 1 commit into
NVIDIA:mainfrom
Wanli-Jiang:user/williamj/deprecated-trt-backend-python-removal-t2
Draft

[TRTLLM-14022][feat] BREAKING: DON'T REVIEW Remove legacy TensorRT Python backend#16213
Wanli-Jiang wants to merge 1 commit into
NVIDIA:mainfrom
Wanli-Jiang:user/williamj/deprecated-trt-backend-python-removal-t2

Conversation

@Wanli-Jiang

@Wanli-Jiang Wanli-Jiang commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Duplicated PR #15918 to enable post-merge CI tests.

Summary by CodeRabbit

  • Refactor
    • Simplified the package to focus on PyTorch and AutoDeploy workflows.
    • Removed TensorRT-specific backend options, CLI commands, and several legacy exports.
    • Updated benchmark, serve, and eval defaults to align with the PyTorch configuration.
    • Streamlined model and layer availability across the public API.

Description

Test Coverage

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.

Remove the TensorRT execution backend from the Python package so that
`import tensorrt_llm` and the PyTorch backend run without the `tensorrt`
package installed. The `tensorrt` pip dependency itself is dropped in the
follow-up C++/packaging step; `requirements.txt` is unchanged here.

- Delete the TensorRT graph/build/runtime machinery: builder, network,
  functional graph ops, layers/, plugin/, the legacy models/ implementations,
  the runtime/ session and ModelRunner* classes, _tensorrt_engine, TRT quant
  layers and tools, and the trtllm-build/refit/prune CLIs.
- Keep import paths stable: partly-TensorRT modules (functional.py,
  models/modeling_utils.py, _common.py, runtime/, bench/build) are gutted in
  place so the TensorRT-free symbols used by the PyTorch backend stay put;
  no `_torch/` import churn.
- Drop the TensorRT public API surface (Builder/BuildConfig/TrtLlmArgs/...);
  `LLM(backend="tensorrt")` now raises and `trtllm-serve --backend` accepts
  pytorch/_autodeploy only (api_stability serve-CLI reference updated).
- Remove or de-TRT the tests that exercised the deleted code (disaggregated
  trt-backend tests, TRT bench/openai e2e params, mixed llmapi unittest
  suites) and delist them from test-db/qa/waives; shared test harnesses keep
  their signatures for the PyTorch twins.
- Port test_gather_generation_logits_cuda_graph to the PyTorch accuracy
  suite; repoint examples/apps to the PyTorch LLM; regenerate
  ruff-legacy-baseline.json.

Signed-off-by: Wanli Jiang <35160485+Wanli-Jiang@users.noreply.github.com>
@Wanli-Jiang Wanli-Jiang added the api-breaking Accepted LLM API contract change that is backwards-incompatible label Jul 10, 2026
@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot help

@github-actions

Copy link
Copy Markdown

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 [--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) --high-priority]

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. Supports wildcard * for pattern matching (e.g., "*PerfSanity*" matches all stages containing PerfSanity). Examples: "A10-PyTorch-1, xxx", "PerfSanity". 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. Supports wildcard * for pattern matching. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx", --extra-stage "Post-Merge".

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

--high-priority (OPTIONAL) : Run the pipeline with high priority. This option is restricted to authorized users only and will route the job to a high-priority queue.

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.

@Wanli-Jiang

Copy link
Copy Markdown
Collaborator Author

/bot run --post-merge --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58575 [ run ] triggered by Bot. Commit: a7e54c5 Link to invocation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-breaking Accepted LLM API contract change that is backwards-incompatible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants