-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[None][chore] Add readme for perf test #6443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughA new README was added to document the TensorRT-LLM performance testing workflow. The handling of the Changes
Sequence Diagram(s)No sequence diagram generated as the changes are limited to documentation, parameter reordering, and internal refactoring without affecting control flow or feature logic. Estimated code review effort🎯 2 (Simple) | ⏱️ ~6 minutes Possibly related PRs
Suggested labels
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
tests/integration/defs/perf/test_perf.py (1)
373-373
: Consider adding validation for the parameter range.While the implementation is correct, consider adding validation in the
validate()
method to ensurekv_cache_free_gpu_mem_fraction
is within the valid range (0.0 to 1.0), similar to howgpu_weights_percent
is validated at lines 734-735.Add this validation in the
validate()
method around line 735:if self.gpu_weights_percent != -1: assert 0 <= self.gpu_weights_percent <= 1, f"Invalid gpu_weights_percent: {self.gpu_weights_percent}!" + assert 0.0 <= self.kv_cache_free_gpu_mem_fraction <= 1.0, f"Invalid kv_cache_free_gpu_mem_fraction: {self.kv_cache_free_gpu_mem_fraction}!"
Also applies to: 418-419
tests/integration/test_lists/qa/trt_llm_release_perf_test.yml (1)
486-490
: Duplication between Maverick & Scout blocks – consider YAML anchor to reduce maintenanceThe five
llama_v4_scout_17b_16e_*
cases are byte-for-byte identical to the Maverick set above apart from the model name. A YAML anchor/alias (or a small Jinja include) would remove the duplication and avoid skew when the next parameter is tweaked.Example:
maverick_cases: &kv_frac_fp8_17b - perf/test_perf.py::test_perf[llama_v4_maverick_17b_128e_instruct_fp8-…] ... tests: <<: *kv_frac_fp8_17b # Maverick - *kv_frac_fp8_17b # Scout – replace model name programmaticallyNot blocking, but worthwhile for a file that is already > 580 lines long.
tests/integration/defs/perf/README_release_test.md (3)
131-137
: Wrap bare URLs to satisfy markdown-lint & improve readability
markdownlint
flags the two raw URLs – enclose them in angle brackets or link syntax:-Compare regression of each release manually on http://dlswqa-nas.nvidia.com:18688/trtperf +Compare regression of each release manually on <http://dlswqa-nas.nvidia.com:18688/trtperf>Apply the same treatment to the URL in §4.3.
40-44
: Fix placeholder in LoRA example to avoid copy-paste errors
f"--rand-task-id 0 {nloras-1}"
will raiseNameError
if pasted verbatim –nloras
is undefined and the space before the brace produces an unexpected literal0
. Suggest:- f"--rand-task-id 0 {nloras-1}", + f"--rand-task-id 0,{n_loras-1}",or replace with
<N_LORAS>
placeholder to indicate a variable value.
55-66
: Minor: ensureep_size
default check usesis not None
The sample shows
if self._config.ep_size != None:
.
PEP 8 recommendsis not None
:-if self._config.ep_size != None: +if self._config.ep_size is not None:Tiny point, but worth aligning with project style to avoid future flake8 nags.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
tests/integration/defs/perf/README_release_test.md
(1 hunks)tests/integration/defs/perf/test_perf.py
(4 hunks)tests/integration/test_lists/qa/trt_llm_release_perf_test.yml
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)
**/*.py
: The code developed for TensorRT-LLM should conform to Python 3.8+.
Indent Python code with 4 spaces. Do not use tabs.
Always maintain the namespace when importing in Python, even if only one class or function from a module is used.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile = ...).
Python global variables should use upper snake_case and prefix G (e.g., G_MY_GLOBAL = ...).
Python constants should use upper snake_case (e.g., MY_CONSTANT = ...).
Avoid shadowing variables declared in an outer scope in Python.
Initialize all externally visible members of a class in the constructor in Python.
For interfaces that may be used outside a file, prefer docstrings over comments in Python.
Comments in Python should be reserved for code within a function, or interfaces that are local to a file.
Use Google style docstrings for classes and functions in Python, which can be parsed by Sphinx.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the docstring for the class.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.
Files:
tests/integration/defs/perf/test_perf.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}
📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)
All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.
Files:
tests/integration/defs/perf/test_perf.py
🧠 Learnings (3)
📓 Common learnings
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: amitz-nv
PR: NVIDIA/TensorRT-LLM#5616
File: tensorrt_llm/executor/worker.py:375-384
Timestamp: 2025-07-17T09:01:27.402Z
Learning: In tensorrt_llm/executor/worker.py, the LoRA adapter cache optimization logic that checks `is_adapter_in_cpu_cache()` and conditionally passes None for weights/config has a known race condition issue that cannot be solved with simple error handling or verification checks. This is a known limitation that requires a more comprehensive solution.
tests/integration/test_lists/qa/trt_llm_release_perf_test.yml (2)
Learnt from: moraxu
PR: #6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: yiqingy0
PR: #5198
File: jenkins/mergeWaiveList.py:0-0
Timestamp: 2025-07-22T08:33:49.109Z
Learning: In the TensorRT-LLM waive list merging system, removed lines are always located at the end of the merge waive lists, which is why the mergeWaiveList.py script uses reverse traversal - it's an optimization for this specific domain constraint.
tests/integration/defs/perf/README_release_test.md (2)
Learnt from: moraxu
PR: #6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: CR
PR: NVIDIA/TensorRT-LLM#0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2025-07-29T08:25:52.868Z
Learning: Applies to **/*.py : The code developed for TensorRT-LLM should conform to Python 3.8+.
🪛 markdownlint-cli2 (0.17.2)
tests/integration/defs/perf/README_release_test.md
131-131: Bare URL used
(MD034, no-bare-urls)
136-136: Bare URL used
(MD034, no-bare-urls)
🔇 Additional comments (7)
tests/integration/defs/perf/test_perf.py (5)
373-373
: LGTM: Constructor parameter addition is correct.The new
kv_cache_free_gpu_mem_fraction
parameter follows proper naming conventions and has a reasonable default value of 0.9 (90% GPU memory allocation for KV cache).
418-419
: LGTM: Instance variable assignment is correct.The parameter is properly assigned to the instance variable with an appropriate comment explaining its purpose.
477-479
: LGTM: Serialization logic is well-implemented.The conditional serialization only includes the parameter when it differs from the default value, keeping the string representation concise. The label format "kv_frac:" is consistent with other parameter labels in the codebase.
590-592
: LGTM: Deserialization logic correctly matches serialization.The parsing logic properly extracts the
kv_frac
value, converts it to float, and removes the processed label from the list. This matches the serialization format exactly.
1013-1013
: LGTM: Parameter integration in benchmark command is correct.The
kv_cache_free_gpu_mem_fraction
parameter is properly integrated into the trtllm-bench build command, demonstrating that it's not just stored but actively used in the benchmarking process.tests/integration/test_lists/qa/trt_llm_release_perf_test.yml (1)
476-483
: Confirm parser compatibility & avoid accidental regressions onkv_frac
placementThe
kv_frac:0.6
token has been moved beforeinput_output_len
in every new test-id.
That matches the recently-addedkv_cache_free_gpu_mem_fraction
logic inPerfTestConfig.to_string()
, but only the latest parser variant can interpret this order.
Please double-check that all CI agents (and any dev boxes that still run the old converter) have been updated; a stale parser will silently ignore
kv_frac
and default to 0.9.For readability, consider back-quoting the entire test-id to avoid the bare colon inside YAML strings, e.g.:
- "perf/test_perf.py::test_perf[llama_v4_maverick_17b_128e_instruct_fp8-…-kv_frac:0.6-input_output_len:2000,500-…]"
This prevents future YAML linters from complaining if additional colons are introduced.
tests/integration/defs/perf/README_release_test.md (1)
141-160
: Redundant double-install instructionsThe README repeats
pip install -r requirements*.txt
in §5.1 and §6.1. Consolidate to one canonical location (or reference the earlier section) to keep the doc short.
9992f1b
to
1761b6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/integration/defs/perf/README_release_test.md (1)
140-160
: Deduplicate identical pip-install instructionsSections 5.1 (Dependency Installation) and 6.1 (Install Dependencies) contain the same two
pip install
commands, which adds noise to the README.Consider keeping a single “Install dependencies” subsection and reference it from later steps, e.g.:
-### 6.1 Install Dependencies -```bash -pip install -r requirements-dev.txt -pip install -r requirements.txt -``` +<!-- Dependencies are installed in section 5.1 -->
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
tests/integration/defs/perf/README_release_test.md
(1 hunks)tests/integration/defs/perf/test_perf.py
(4 hunks)tests/integration/test_lists/qa/trt_llm_release_perf_test.yml
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- tests/integration/defs/perf/test_perf.py
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/integration/test_lists/qa/trt_llm_release_perf_test.yml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: amitz-nv
PR: NVIDIA/TensorRT-LLM#5616
File: tensorrt_llm/executor/worker.py:375-384
Timestamp: 2025-07-17T09:01:27.402Z
Learning: In tensorrt_llm/executor/worker.py, the LoRA adapter cache optimization logic that checks `is_adapter_in_cpu_cache()` and conditionally passes None for weights/config has a known race condition issue that cannot be solved with simple error handling or verification checks. This is a known limitation that requires a more comprehensive solution.
tests/integration/defs/perf/README_release_test.md (2)
Learnt from: moraxu
PR: #6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: CR
PR: NVIDIA/TensorRT-LLM#0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2025-07-30T06:11:42.350Z
Learning: Applies to **/*.py : The code developed for TensorRT-LLM should conform to Python 3.8+.
🪛 markdownlint-cli2 (0.17.2)
tests/integration/defs/perf/README_release_test.md
131-131: Bare URL used
(MD034, no-bare-urls)
136-136: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
42b0d7b
to
de54a02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
tests/integration/defs/perf/README_release_test.md (1)
130-136
: Remove internal bare URLs & comply with MD034The two bare URLs expose an internal NVIDIA host that is unreachable for external contributors and violates markdownlint MD034. Replace them with descriptive placeholders or Markdown link syntax.
-Compare regression of each release manually on http://dlswqa-nas.nvidia.com:18688/trtperf +Compare release-to-release regression manually on <internal TRT-Perf dashboard> -View performance data and compare between different runs on http://dlswqa-nas.nvidia.com:18688/trtperf +View performance data and compare runs on <internal TRT-Perf dashboard>
🧹 Nitpick comments (2)
tests/integration/defs/perf/README_release_test.md (2)
85-88
: Preferis not None
for sentinel checksAlthough this is illustrative code, showing best practices avoids copy-paste of anti-patterns:
-if self._config.ep_size != None: - benchmark_cmd += [f"--ep={self._config.ep_size}"] +if self._config.ep_size is not None: + benchmark_cmd += [f"--ep={self._config.ep_size}"]
142-144
: Path likely wrong for external clones
pip install -r ./TensorRT-LLM/requirements.txt
assumes the repo is cloned into a sibling folder, which differs from standard instructions elsewhere (requirements.txt
resides at repo root). Clarify the path or drop the leading directory to prevent confusion.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
tests/integration/defs/perf/README_release_test.md
(1 hunks)tests/integration/defs/perf/test_perf.py
(4 hunks)tests/integration/test_lists/qa/trt_llm_release_perf_test.yml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- tests/integration/test_lists/qa/trt_llm_release_perf_test.yml
- tests/integration/defs/perf/test_perf.py
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: moraxu
PR: NVIDIA/TensorRT-LLM#6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: CR
PR: NVIDIA/TensorRT-LLM#0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2025-07-31T04:50:23.272Z
Learning: Applies to **/*.py : The code developed for TensorRT-LLM should conform to Python 3.8+.
tests/integration/defs/perf/README_release_test.md (2)
Learnt from: moraxu
PR: #6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Learnt from: CR
PR: NVIDIA/TensorRT-LLM#0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2025-07-31T04:50:23.272Z
Learning: Applies to **/*.py : The code developed for TensorRT-LLM should conform to Python 3.8+.
🪛 markdownlint-cli2 (0.17.2)
tests/integration/defs/perf/README_release_test.md
131-131: Bare URL used
(MD034, no-bare-urls)
136-136: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
de54a02
to
e4a16c3
Compare
Signed-off-by: ruodil <[email protected]>
/bot run |
PR_Github #13965 [ run ] triggered by Bot |
PR_Github #13965 [ run ] completed with state |
/bot run |
PR_Github #14073 [ run ] triggered by Bot |
PR_Github #14073 [ run ] completed with state |
/bot skip --comment "only update README.md" |
PR_Github #14083 [ skip ] triggered by Bot |
/bot skip --comment "only update README.md" |
PR_Github #14088 [ skip ] triggered by Bot |
PR_Github #14083 [ skip ] completed with state |
PR_Github #14088 [ skip ] completed with state |
Signed-off-by: ruodil <[email protected]> Signed-off-by: Lanyu Liao <[email protected]>
Signed-off-by: ruodil <[email protected]>
Summary by CodeRabbit
Documentation
Refactor
Style
Description
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.
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 thestage-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.