Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .claude/skills/exec-local-compile/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ git checkout main && git pull
Run the build command (**incremental by default** — omit `-c`/`--clean` unless explicitly requested or the incremental build fails):

```bash
./scripts/build_wheel.py --trt_root /usr/local/tensorrt --benchmarks --use_ccache -a "<arch>" -f --nvtx
./scripts/build_wheel.py --trt_root /usr/local/tensorrt --use_ccache -a "<arch>" -f --nvtx
```

Replace `<arch>` with the target GPU architecture (see Architecture Reference below). If not specified by the user, auto-detect from `nvidia-smi`.
Expand All @@ -67,7 +67,6 @@ python3 -c "import tensorrt_llm; print(tensorrt_llm.__version__)"
| Flag | Description |
|------|-------------|
| `--trt_root /usr/local/tensorrt` | TensorRT installation path (standard in NVIDIA containers) |
| `--benchmarks` | Build the C++ benchmarks |
| `-a "<arch>"` | Target GPU architecture(s) |
| `--nvtx` | Enable NVTX markers for profiling |
| `--use_ccache` | Use ccache for faster recompilation |
Expand Down
1 change: 0 additions & 1 deletion .claude/skills/exec-slurm-compile/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ A successful build ends with a message like `Successfully built tensorrt_llm` or
| Flag | Description |
|------|-------------|
| `--trt_root /usr/local/tensorrt` | TensorRT installation path (standard in NVIDIA containers) |
| `--benchmarks` | Build the C++ benchmarks |
| `-a "100-real"` | Target architecture — `100` for Blackwell, `90` for Hopper, etc. |
| `--nvtx` | Enable NVTX markers for profiling |
| `--no-venv` | Skip virtual environment creation |
Expand Down
3 changes: 1 addition & 2 deletions .claude/skills/exec-slurm-compile/scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Usage: compile.sh <repo_dir> [build_wheel_args...]
#
# Default build_wheel.py flags:
# --trt_root /usr/local/tensorrt --benchmarks -a "100-real" --nvtx --no-venv
# --trt_root /usr/local/tensorrt -a "100-real" --nvtx --no-venv
# Any extra arguments after repo_dir are forwarded to build_wheel.py,
# overriding the defaults above.

Expand All @@ -37,7 +37,6 @@ else
echo "[compile.sh] Running default build command"
python3 ./scripts/build_wheel.py \
--trt_root /usr/local/tensorrt \
--benchmarks \
-a "100-real" \
--nvtx
fi
4 changes: 0 additions & 4 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
/tests/unittest @NVIDIA/trt-llm-devs

# ===== TensorRT backend (will be deprecated soon) — also on the trt-llm-devs fallback =====
/cpp/include/tensorrt_llm/plugins @NVIDIA/trt-llm-devs
/cpp/tensorrt_llm/plugins @NVIDIA/trt-llm-devs
/tensorrt_llm/builder.py @NVIDIA/trt-llm-devs
/tensorrt_llm/commands/build.py @NVIDIA/trt-llm-devs
/tensorrt_llm/commands/prune.py @NVIDIA/trt-llm-devs
Expand Down Expand Up @@ -105,7 +103,6 @@
/cpp/tensorrt_llm/batch_manager @NVIDIA/trt-llm-runtime-devs
/cpp/tensorrt_llm/common @NVIDIA/trt-llm-runtime-devs
/cpp/tensorrt_llm/executor @NVIDIA/trt-llm-runtime-devs
/cpp/tensorrt_llm/executor_worker @NVIDIA/trt-llm-runtime-devs
/cpp/tensorrt_llm/layers @NVIDIA/trt-llm-runtime-devs
/cpp/tensorrt_llm/nanobind @NVIDIA/trt-llm-runtime-devs
/cpp/tensorrt_llm/runtime @NVIDIA/trt-llm-runtime-devs
Expand Down Expand Up @@ -169,7 +166,6 @@
/examples/llm-api/quickstart_multimodal.py @NVIDIA/trt-llm-models-devs @NVIDIA/trt-llm-doc-owners
/examples/models @NVIDIA/trt-llm-models-devs @NVIDIA/trt-llm-doc-owners
/examples/serve/*multimodal* @NVIDIA/trt-llm-models-devs @NVIDIA/trt-llm-doc-owners
/scripts/build_cpp_examples.py @NVIDIA/trt-llm-models-devs
/scripts/generate_config_database_tests.py @NVIDIA/trt-llm-models-devs @NVIDIA/trt-llm-doc-owners
/scripts/generate_config_table.py @NVIDIA/trt-llm-models-devs @NVIDIA/trt-llm-doc-owners
/tensorrt_llm/_torch/models @NVIDIA/trt-llm-models-devs
Expand Down
100 changes: 16 additions & 84 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ common-files: &common_files |
.devcontainer/make_env.py |
.github/scripts/label_community_user.py |
.github/scripts/pr_checklist_check.py |
benchmarks/cpp/__init__.py |
benchmarks/cpp/prepare_dataset.py |
benchmarks/cpp/utils/__init__.py |
benchmarks/cpp/utils/convert_nemo_dataset.py |
benchmarks/cpp/utils/generate_rand_loras.py |
benchmarks/cpp/utils/prepare_real_data.py |
benchmarks/cpp/utils/prepare_synthetic_data.py |
benchmarks/cpp/utils/utils.py |
benchmarks/__init__.py |
benchmarks/prepare_dataset.py |
benchmarks/utils/__init__.py |
benchmarks/utils/convert_nemo_dataset.py |
benchmarks/utils/generate_rand_loras.py |
benchmarks/utils/prepare_real_data.py |
benchmarks/utils/prepare_synthetic_data.py |
benchmarks/utils/utils.py |
cpp/conanfile.py |
cpp/kernels/fmha_v2/conftest.py |
cpp/kernels/fmha_v2/fmha_test.py |
Expand All @@ -41,38 +41,11 @@ common-files: &common_files |
cpp/tensorrt_llm/deep_ep/strip_nvshmem_helper.py |
cpp/tensorrt_llm/kernels/cutlass_kernels/python/generate_kernels.py |
cpp/tensorrt_llm/kernels/decoderMaskedMultiheadAttention/copy_cu.py |
cpp/tests/resources/scripts/build_chatglm_engines.py |
cpp/tests/resources/scripts/build_eagle_engines.py |
cpp/tests/resources/scripts/build_enc_dec_engines.py |
cpp/tests/resources/scripts/build_engines_utils.py |
cpp/tests/resources/scripts/build_gpt_engines.py |
cpp/tests/resources/scripts/build_gptj_engines.py |
cpp/tests/resources/scripts/build_llama_engines.py |
cpp/tests/resources/scripts/build_mamba_engines.py |
cpp/tests/resources/scripts/build_medusa_engines.py |
cpp/tests/resources/scripts/build_recurrentgemma_engines.py |
cpp/tests/resources/scripts/build_redrafter_engines.py |
cpp/tests/resources/scripts/generate_expected_chatglm_output.py |
cpp/tests/resources/scripts/generate_expected_eagle_output.py |
cpp/tests/resources/scripts/generate_expected_enc_dec_output.py |
cpp/tests/resources/scripts/generate_expected_gpt_output.py |
cpp/tests/resources/scripts/generate_expected_gptj_output.py |
cpp/tests/resources/scripts/generate_expected_llama_output.py |
cpp/tests/resources/scripts/generate_expected_mamba_output.py |
cpp/tests/resources/scripts/generate_expected_medusa_output.py |
cpp/tests/resources/scripts/generate_expected_recurrentgemma_output.py |
cpp/tests/resources/scripts/generate_expected_redrafter_output.py |
cpp/tests/resources/scripts/generate_hf_gpt_output.py |
cpp/tests/resources/scripts/generate_test_lora_weights.py |
cpp/tests/resources/scripts/io_converter.py |
docs/source/conf.py |
docs/source/helper.py |
examples/apps/chat.py |
examples/apps/fastapi_server.py |
examples/bindings/executor/example_advanced.py |
examples/bindings/executor/example_basic.py |
examples/bindings/executor/example_debug.py |
examples/bindings/executor/example_logits_processor.py |
examples/disaggregated/clients/disagg_client.py |
examples/disaggregated/slurm/benchmark/submit.py |
examples/dora/normalize_weights.py |
Expand Down Expand Up @@ -246,7 +219,6 @@ common-files: &common_files |
jenkins/scripts/mergeWaiveList.py |
jenkins/scripts/open_search_db.py |
jenkins/scripts/test_rerun.py |
scripts/build_cpp_examples.py |
scripts/build_wheel.py |
scripts/check_test_list.py |
scripts/dco_check.py |
Expand Down Expand Up @@ -851,11 +823,8 @@ common-files: &common_files |
tests/integration/defs/conftest.py |
tests/integration/defs/cpp/conftest.py |
tests/integration/defs/cpp/cpp_common.py |
tests/integration/defs/cpp/test_e2e.py |
tests/integration/defs/cpp/test_multi_gpu.py |
tests/integration/defs/cpp/test_unit_tests.py |
tests/integration/defs/deterministic/mixtral_deterministic.py |
tests/integration/defs/deterministic/test_mixtral_deterministic.py |
tests/integration/defs/disaggregated/test_auto_scaling.py |
tests/integration/defs/disaggregated/test_disaggregated.py |
tests/integration/defs/disaggregated/test_disaggregated_etcd.py |
Expand Down Expand Up @@ -928,7 +897,6 @@ common-files: &common_files |
tests/integration/defs/test_fmha.py |
tests/integration/defs/test_list_parser.py |
tests/integration/defs/test_list_validation.py |
tests/integration/defs/test_mlpf_results.py |
tests/integration/defs/test_sanity.py |
tests/integration/defs/test_unittests.py |
tests/integration/defs/triton_server/__init__.py |
Expand Down Expand Up @@ -1081,7 +1049,6 @@ common-files: &common_files |
tests/unittest/_torch/thop/serial/test_moe_alltoall.py |
tests/unittest/api_stability/api_stability_core.py |
tests/unittest/api_stability/test_llm_api.py |
tests/unittest/bindings/binding_test_utils.py |
tests/unittest/bindings/test_bindings_moe.py |
tests/unittest/bindings/test_bindings_ut.py |
tests/unittest/bindings/test_executor_bindings.py |
Expand Down Expand Up @@ -1169,7 +1136,6 @@ common-files: &common_files |
tests/unittest/others/test_kv_cache_transceiver.py |
tests/unittest/others/test_kv_cache_update.py |
tests/unittest/others/test_layer.py |
tests/unittest/others/test_leak.py |
tests/unittest/others/test_mapping.py |
tests/unittest/others/test_model_dtype.py |
tests/unittest/others/test_module.py |
Expand Down Expand Up @@ -1350,14 +1316,14 @@ legacy-files: &legacy_files |
.devcontainer/make_env.py |
.github/scripts/label_community_user.py |
.github/scripts/pr_checklist_check.py |
benchmarks/cpp/__init__.py |
benchmarks/cpp/prepare_dataset.py |
benchmarks/cpp/utils/__init__.py |
benchmarks/cpp/utils/convert_nemo_dataset.py |
benchmarks/cpp/utils/generate_rand_loras.py |
benchmarks/cpp/utils/prepare_real_data.py |
benchmarks/cpp/utils/prepare_synthetic_data.py |
benchmarks/cpp/utils/utils.py |
benchmarks/__init__.py |
benchmarks/prepare_dataset.py |
benchmarks/utils/__init__.py |
benchmarks/utils/convert_nemo_dataset.py |
benchmarks/utils/generate_rand_loras.py |
benchmarks/utils/prepare_real_data.py |
benchmarks/utils/prepare_synthetic_data.py |
benchmarks/utils/utils.py |
cpp/conanfile.py |
cpp/kernels/fmha_v2/conftest.py |
cpp/kernels/fmha_v2/fmha_test.py |
Expand All @@ -1382,38 +1348,11 @@ legacy-files: &legacy_files |
cpp/tensorrt_llm/deep_ep/strip_nvshmem_helper.py |
cpp/tensorrt_llm/kernels/cutlass_kernels/python/generate_kernels.py |
cpp/tensorrt_llm/kernels/decoderMaskedMultiheadAttention/copy_cu.py |
cpp/tests/resources/scripts/build_chatglm_engines.py |
cpp/tests/resources/scripts/build_eagle_engines.py |
cpp/tests/resources/scripts/build_enc_dec_engines.py |
cpp/tests/resources/scripts/build_engines_utils.py |
cpp/tests/resources/scripts/build_gpt_engines.py |
cpp/tests/resources/scripts/build_gptj_engines.py |
cpp/tests/resources/scripts/build_llama_engines.py |
cpp/tests/resources/scripts/build_mamba_engines.py |
cpp/tests/resources/scripts/build_medusa_engines.py |
cpp/tests/resources/scripts/build_recurrentgemma_engines.py |
cpp/tests/resources/scripts/build_redrafter_engines.py |
cpp/tests/resources/scripts/generate_expected_chatglm_output.py |
cpp/tests/resources/scripts/generate_expected_eagle_output.py |
cpp/tests/resources/scripts/generate_expected_enc_dec_output.py |
cpp/tests/resources/scripts/generate_expected_gpt_output.py |
cpp/tests/resources/scripts/generate_expected_gptj_output.py |
cpp/tests/resources/scripts/generate_expected_llama_output.py |
cpp/tests/resources/scripts/generate_expected_mamba_output.py |
cpp/tests/resources/scripts/generate_expected_medusa_output.py |
cpp/tests/resources/scripts/generate_expected_recurrentgemma_output.py |
cpp/tests/resources/scripts/generate_expected_redrafter_output.py |
cpp/tests/resources/scripts/generate_hf_gpt_output.py |
cpp/tests/resources/scripts/generate_test_lora_weights.py |
cpp/tests/resources/scripts/io_converter.py |
docs/source/conf.py |
docs/source/helper.py |
examples/apps/chat.py |
examples/apps/fastapi_server.py |
examples/bindings/executor/example_advanced.py |
examples/bindings/executor/example_basic.py |
examples/bindings/executor/example_debug.py |
examples/bindings/executor/example_logits_processor.py |
examples/disaggregated/clients/disagg_client.py |
examples/disaggregated/slurm/benchmark/submit.py |
examples/dora/normalize_weights.py |
Expand Down Expand Up @@ -1587,7 +1526,6 @@ legacy-files: &legacy_files |
jenkins/scripts/mergeWaiveList.py |
jenkins/scripts/open_search_db.py |
jenkins/scripts/test_rerun.py |
scripts/build_cpp_examples.py |
scripts/build_wheel.py |
scripts/check_test_list.py |
scripts/dco_check.py |
Expand Down Expand Up @@ -2192,11 +2130,8 @@ legacy-files: &legacy_files |
tests/integration/defs/conftest.py |
tests/integration/defs/cpp/conftest.py |
tests/integration/defs/cpp/cpp_common.py |
tests/integration/defs/cpp/test_e2e.py |
tests/integration/defs/cpp/test_multi_gpu.py |
tests/integration/defs/cpp/test_unit_tests.py |
tests/integration/defs/deterministic/mixtral_deterministic.py |
tests/integration/defs/deterministic/test_mixtral_deterministic.py |
tests/integration/defs/disaggregated/test_auto_scaling.py |
tests/integration/defs/disaggregated/test_disaggregated.py |
tests/integration/defs/disaggregated/test_disaggregated_etcd.py |
Expand Down Expand Up @@ -2269,7 +2204,6 @@ legacy-files: &legacy_files |
tests/integration/defs/test_fmha.py |
tests/integration/defs/test_list_parser.py |
tests/integration/defs/test_list_validation.py |
tests/integration/defs/test_mlpf_results.py |
tests/integration/defs/test_sanity.py |
tests/integration/defs/test_unittests.py |
tests/integration/defs/triton_server/__init__.py |
Expand Down Expand Up @@ -2422,7 +2356,6 @@ legacy-files: &legacy_files |
tests/unittest/_torch/thop/serial/test_moe_alltoall.py |
tests/unittest/api_stability/api_stability_core.py |
tests/unittest/api_stability/test_llm_api.py |
tests/unittest/bindings/binding_test_utils.py |
tests/unittest/bindings/test_bindings_moe.py |
tests/unittest/bindings/test_bindings_ut.py |
tests/unittest/bindings/test_executor_bindings.py |
Expand Down Expand Up @@ -2510,7 +2443,6 @@ legacy-files: &legacy_files |
tests/unittest/others/test_kv_cache_transceiver.py |
tests/unittest/others/test_kv_cache_update.py |
tests/unittest/others/test_layer.py |
tests/unittest/others/test_leak.py |
tests/unittest/others/test_mapping.py |
tests/unittest/others/test_model_dtype.py |
tests/unittest/others/test_module.py |
Expand Down
40 changes: 32 additions & 8 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
# TensorRT-LLM Benchmarks
# TensorRT-LLM Benchmarking

## Overview
For benchmarking TensorRT-LLM, use
[`trtllm-bench`](../docs/source/developer-guide/perf-benchmarking.md) and
`trtllm-serve`.

There are currently two workflows to benchmark TensorRT-LLM:
* [`trtllm-bench`](../docs/source/developer-guide/perf-benchmarking.md)
- `trtllm-bench` is native to TensorRT-LLM and is a Python benchmarker for reproducing and testing the performance of TensorRT-LLM.
- _NOTE_: This benchmarking suite is a current work in progress and is prone to large changes.
* [C++ benchmarks](./cpp)
- The recommended workflow that uses TensorRT-LLM C++ API and can take advantage of the latest features of TensorRT-LLM.
This directory keeps the dataset preparation tools consumed by `trtllm-bench`:

- `prepare_dataset.py` — generate benchmark datasets from real data or with
synthetic normal/uniform token-length distributions:

```bash
python3 prepare_dataset.py \
--tokenizer <path/to/tokenizer> \
--output preprocessed_dataset.json \
dataset \
--dataset-name <name of the dataset> \
--dataset-split <split of the dataset to use> \
--dataset-input-key <dataset dictionary key for input> \
--dataset-prompt-key <dataset dictionary key for prompt> \
--dataset-output-key <dataset dictionary key for output> \
[--num-requests 100] \
[--max-input-len 1000] \
[--output-len-dist 100,10]
```

Synthetic variants: `python3 prepare_dataset.py ... token-norm-dist ...` and
`... token-unif-dist ...`. Run with `--help` for the full option list.

- `utils/prepare_real_data.py`, `utils/prepare_synthetic_data.py` — the
subcommand implementations.
- `utils/generate_rand_loras.py` — generate random LoRA adapters for
LoRA benchmarking.
- `utils/convert_nemo_dataset.py` — convert NeMo chat datasets.
File renamed without changes.
42 changes: 0 additions & 42 deletions benchmarks/cpp/CMakeLists.txt

This file was deleted.

Loading
Loading