-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[TRTLLM-9091] [feat] Replace GenAI-Perf with AIPerf #9310
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
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe pull request systematically replaces the genai-perf dependency with aiperf across the codebase. Example scripts using genai-perf are deleted, dependencies are updated in configuration files, and references throughout test and integration code are refactored to use aiperf commands and artifacts. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/integration/defs/stress_test/stress_test.py (1)
51-69: Remove stale aiperf installation stub andnoqadirectiveThe commented‑out
aiperf_install()helper and the commentedimport aiperf # noqa: F401are now misleading (you’ve moved installation into requirements) and Ruff flags the unusednoqadirective (RUF100).Consider fully deleting the dead helper and the commented import, or rewriting the surrounding comments to describe the current installation strategy without using a
noqamarker. This will keep the stress test script aligned with the new dependency model and avoid unnecessary lint noise.Also applies to: 429-433
🧹 Nitpick comments (2)
examples/serve/requirements.txt (1)
1-1: Consider aligning aiperf version here with dev requirementsThis example file pulls in the latest
aiperfwhilerequirements-dev.txtpinsaiperf==0.2.0. That’s fine if you want examples to track latest releases, but it can also introduce behavior drift from your tested dev setup.If you prefer reproducibility, consider pinning or at least lower‑bounding the version here (e.g.,
aiperf==0.2.0oraiperf>=0.2.0) to match what you run in CI.tests/integration/defs/stress_test/stress_test.py (1)
157-182: aiperf integration flow looks coherent; verify CLI and artifact schema assumptionsThe refactor from genai‑perf to aiperf is internally consistent:
PerformanceParamsnow documents aiperf usage;create_aiperf_commandcentralizes the CLI, and bothmeasure_capacity_stageandstress_stagecall intorun_aiperf_process, which in turn monitors both the aiperf process and server health.extract_stress_test_metricshas been updated to expectprofile_export_aiperf.jsonartifacts and to mention aiperf in its validation errors.
- Ruff TRY003: the long
RuntimeError/ValueErrormessages you updated to reference aiperf (e.g., timeout, non‑zero exit code, “Please check OutputTokenThroughput from aiperf”) are now flagged by Ruff. If TRY003 is enforced, consider either shortening these messages or moving the detailed text into logging and raising simpler exceptions.- Behavior assumptions: this code assumes (a) the aiperf CLI supports the
profilesubcommand and all flags used increate_aiperf_command, and (b) the exported JSON still exposesrequest_throughput,output_token_throughput, and the sameinput_configlayout. Those look like direct translations from the previous genai‑perf integration but are worth validating end‑to‑end.Please run a full stress test (including the performance stages) with aiperf and confirm that:
- the constructed command runs without argument errors,
- artifacts named
profile_export_aiperf.jsonare generated under./artifacts/..., andextract_stress_test_metricssucceeds in parsing throughput and concurrency without raising the new aiperf‑specific errors.Also applies to: 407-428, 757-888, 890-940, 972-1035, 1186-1194, 1300-1313
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
examples/serve/genai_perf_client.sh(0 hunks)examples/serve/genai_perf_client_for_multimodal.sh(0 hunks)examples/serve/requirements.txt(1 hunks)requirements-dev.txt(1 hunks)tests/integration/defs/stress_test/stress_test.py(20 hunks)tests/unittest/llmapi/apps/_test_trtllm_serve_example.py(1 hunks)tests/unittest/llmapi/apps/_test_trtllm_serve_multimodal_example.py(1 hunks)
💤 Files with no reviewable changes (2)
- examples/serve/genai_perf_client_for_multimodal.sh
- examples/serve/genai_perf_client.sh
🧰 Additional context used
🧠 Learnings (5)
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
Repo: NVIDIA/TensorRT-LLM 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.
Applied to files:
tests/unittest/llmapi/apps/_test_trtllm_serve_multimodal_example.pytests/integration/defs/stress_test/stress_test.pytests/unittest/llmapi/apps/_test_trtllm_serve_example.py
📚 Learning: 2025-09-09T09:40:45.658Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7645
File: tests/integration/test_lists/qa/llm_function_core.txt:648-648
Timestamp: 2025-09-09T09:40:45.658Z
Learning: In TensorRT-LLM test lists, it's common and intentional for the same test to appear in multiple test list files when they serve different purposes (e.g., llm_function_core.txt for comprehensive core functionality testing and llm_function_core_sanity.txt for quick sanity checks). This duplication allows tests to be run in different testing contexts.
Applied to files:
tests/unittest/llmapi/apps/_test_trtllm_serve_multimodal_example.pytests/integration/defs/stress_test/stress_test.pytests/unittest/llmapi/apps/_test_trtllm_serve_example.py
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
Repo: NVIDIA/TensorRT-LLM PR: 6487
File: tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_trtllm_bench.py:1-12
Timestamp: 2025-08-06T13:58:07.506Z
Learning: In TensorRT-LLM, test files (files under tests/ directories) do not require NVIDIA copyright headers, unlike production source code files. Test files typically start directly with imports, docstrings, or code.
Applied to files:
tests/unittest/llmapi/apps/_test_trtllm_serve_multimodal_example.pytests/integration/defs/stress_test/stress_test.pytests/unittest/llmapi/apps/_test_trtllm_serve_example.py
📚 Learning: 2025-09-17T06:01:01.836Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7785
File: tests/integration/defs/perf/utils.py:321-333
Timestamp: 2025-09-17T06:01:01.836Z
Learning: In test infrastructure code for disaggregated serving tests, prefer logging errors and continuing execution rather than raising exceptions on timeout, to avoid disrupting test cleanup and causing cascading failures.
Applied to files:
tests/integration/defs/stress_test/stress_test.py
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
Repo: NVIDIA/TensorRT-LLM PR: 7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").
Applied to files:
tests/unittest/llmapi/apps/_test_trtllm_serve_example.py
🧬 Code graph analysis (1)
tests/integration/defs/stress_test/stress_test.py (1)
tests/integration/defs/trt_test_alternative.py (1)
print_info(300-306)
🪛 Ruff (0.14.5)
tests/integration/defs/stress_test/stress_test.py
432-432: Unused noqa directive (non-enabled: F401)
Remove unused noqa directive
(RUF100)
847-848: Avoid specifying long messages outside the exception class
(TRY003)
877-878: Avoid specifying long messages outside the exception class
(TRY003)
884-885: Avoid specifying long messages outside the exception class
(TRY003)
1310-1311: Avoid specifying long messages outside the exception class
(TRY003)
🔇 Additional comments (3)
requirements-dev.txt (1)
33-33: aiperf dev dependency pin looks reasonableReplacing
genai-perfwithaiperf==0.2.0in dev requirements is consistent with the PR’s migration and the rest of this file’s pinned tooling.Please double‑check that
0.2.0is the version you’ve validated in CI and local environments and that it’s compatible with the Triton/PyTorch versions you target.tests/unittest/llmapi/apps/_test_trtllm_serve_example.py (1)
51-58: Switch to aiperf_client.sh in serve examples test looks correctThe parametrized test now exercises
aiperf_client.shalongside the existing Python and curl clients, which matches the overall migration away from genai‑perf.Please confirm that
examples/serve/aiperf_client.shis present, executable, and uses the same port/model assumptions as this test (fixed port 8000 and the TinyLlama example) so CI doesn’t fail on missing or misconfigured scripts.tests/unittest/llmapi/apps/_test_trtllm_serve_multimodal_example.py (1)
61-64: Multimodal example now correctly targets aiperf client scriptUsing
aiperf_client_for_multimodal.shhere is consistent with the rest of the migration and keeps the multimodal example under the same test harness.Please verify that
examples/serve/aiperf_client_for_multimodal.shexists, is executable, and matches the Qwen2.5‑VL example configuration used by this test so the subprocess call succeeds under CI.
b33047c to
697f821
Compare
979f03f to
43e3d8f
Compare
|
/bot run |
|
PR_Github #25171 [ run ] triggered by Bot. Commit: |
|
PR_Github #25171 [ run ] completed with state |
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.
I assume we need to update ATTRIBUTIONS-Python.md for this PR? @chzblych @NVIDIA/trt-llm-oss-compliance
43e3d8f to
9ad4e9e
Compare
|
/bot run |
|
PR_Github #25210 [ run ] triggered by Bot. Commit: |
|
PR_Github #25210 [ run ] completed with state |
9ad4e9e to
43e3d8f
Compare
Signed-off-by: lkomali <[email protected]>
Signed-off-by: lkomali <[email protected]>
43e3d8f to
c94525c
Compare
|
/bot run |
Summary by CodeRabbit
Description
Replace GenAIPerf with AIPerf.
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)
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
/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-listparameter 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.mdand the
scripts/test_to_stage_mapping.pyhelper.kill
killKill all running builds associated with pull request.
skip
skip --comment COMMENTSkip 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-pipelineReuse 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.