Skip to content

[TRTLLM-9091] [feat] Replace GenAI-Perf with AIPerf - #9310

Merged
kaiyux merged 8 commits into
NVIDIA:mainfrom
lkomali:lkomali/replace-gap-with-aiperf
Dec 23, 2025
Merged

[TRTLLM-9091] [feat] Replace GenAI-Perf with AIPerf#9310
kaiyux merged 8 commits into
NVIDIA:mainfrom
lkomali:lkomali/replace-gap-with-aiperf

Conversation

@lkomali

@lkomali lkomali commented Nov 19, 2025

Copy link
Copy Markdown
Collaborator

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.

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)]

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.

@lkomali
lkomali requested review from a team as code owners November 19, 2025 17:53
@coderabbitai

coderabbitai Bot commented Nov 19, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Deleted example scripts
examples/serve/genai_perf_client.sh, examples/serve/genai_perf_client_for_multimodal.sh
Removed shell scripts that executed genai-perf profile commands with predefined configurations for standard and multimodal models.
Dependency updates
examples/serve/requirements.txt, requirements-dev.txt
Replaced genai-perf with aiperf (versions updated: 0.0.130.2.0 in dev requirements).
Test parameter updates
tests/unittest/llmapi/apps/_test_trtllm_serve_example.py, tests/unittest/llmapi/apps/_test_trtllm_serve_multimodal_example.py
Changed bash script references in parametrized tests from genai_perf_client.sh and genai_perf_client_for_multimodal.sh to aiperf_client.sh and aiperf_client_for_multimodal.sh respectively.
Stress test integration refactoring
tests/integration/defs/stress_test/stress_test.py
Renamed public functions create_genai_perf_command()create_aiperf_command() and run_genai_perf_process()run_aiperf_process(). Updated command construction, artifact file naming (profile_export_genai_perf.jsonprofile_export_aiperf.json), error messages, and internal logic throughout capacity, stress, and metrics extraction stages to reference aiperf.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • tests/integration/defs/stress_test/stress_test.py: Requires careful verification that function renames and internal logic changes (artifact file naming, command construction, process management) are consistently applied across all orchestration stages (capacity, stress, and metrics extraction).
  • Dependency version bump (genai-perf==0.0.13aiperf==0.2.0): Verify compatibility and that any API/flag changes between versions are properly reflected in command construction logic.
  • Test parameter updates: Confirm that corresponding bash scripts (aiperf_client.sh, aiperf_client_for_multimodal.sh) exist and are functional replacements for the deleted genai-perf scripts.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is minimal, providing only a one-line summary 'Replace GenAIPerf with AIPerf' without elaboration on the rationale, scope, or impact of the changes. Expand the description section to explain why this replacement is necessary, what functionality changes (if any), and whether there are any breaking changes or migration considerations for users.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The title clearly and concisely summarizes the main change: replacing GenAI-Perf with AIPerf. It is specific, directly related to the substantial modifications across multiple files, and uses clear terminology.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 and noqa directive

The commented‑out aiperf_install() helper and the commented import aiperf # noqa: F401 are now misleading (you’ve moved installation into requirements) and Ruff flags the unused noqa directive (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 noqa marker. 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 requirements

This example file pulls in the latest aiperf while requirements-dev.txt pins aiperf==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.0 or aiperf>=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 assumptions

The refactor from genai‑perf to aiperf is internally consistent: PerformanceParams now documents aiperf usage; create_aiperf_command centralizes the CLI, and both measure_capacity_stage and stress_stage call into run_aiperf_process, which in turn monitors both the aiperf process and server health. extract_stress_test_metrics has been updated to expect profile_export_aiperf.json artifacts and to mention aiperf in its validation errors.

  • Ruff TRY003: the long RuntimeError / ValueError messages 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 profile subcommand and all flags used in create_aiperf_command, and (b) the exported JSON still exposes request_throughput, output_token_throughput, and the same input_config layout. 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.json are generated under ./artifacts/..., and
  • extract_stress_test_metrics succeeds 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7ab02ad and 9c41927.

📒 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.py
  • tests/integration/defs/stress_test/stress_test.py
  • tests/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.py
  • tests/integration/defs/stress_test/stress_test.py
  • tests/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.py
  • tests/integration/defs/stress_test/stress_test.py
  • tests/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 reasonable

Replacing genai-perf with aiperf==0.2.0 in dev requirements is consistent with the PR’s migration and the rest of this file’s pinned tooling.

Please double‑check that 0.2.0 is 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 correct

The parametrized test now exercises aiperf_client.sh alongside the existing Python and curl clients, which matches the overall migration away from genai‑perf.

Please confirm that examples/serve/aiperf_client.sh is 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 script

Using aiperf_client_for_multimodal.sh here 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.sh exists, is executable, and matches the Qwen2.5‑VL example configuration used by this test so the subprocess call succeeds under CI.

@lkomali
lkomali force-pushed the lkomali/replace-gap-with-aiperf branch from b33047c to 697f821 Compare November 19, 2025 18:02
@lkomali
lkomali requested review from a team as code owners November 19, 2025 18:02
@lkomali
lkomali force-pushed the lkomali/replace-gap-with-aiperf branch from 979f03f to 43e3d8f Compare November 19, 2025 18:06
@svc-trtllm-gh-bot svc-trtllm-gh-bot added the Community want to contribute PRs initiated from Community label Nov 19, 2025
@kaiyux kaiyux changed the title feat: Replace GenAI-Perf with AIPerf [TRTLLM-9091] [feat] Replace GenAI-Perf with AIPerf Nov 20, 2025
@kaiyux

kaiyux commented Dec 21, 2025

Copy link
Copy Markdown
Member

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #29313 [ run ] triggered by Bot. Commit: a6fa61a

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #29313 [ run ] completed with state SUCCESS. Commit: a6fa61a
/LLM/main/L0_MergeRequest_PR pipeline #22509 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

@kaiyux

kaiyux commented Dec 22, 2025

Copy link
Copy Markdown
Member

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #29370 [ run ] triggered by Bot. Commit: a6fa61a

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #29370 [ run ] completed with state SUCCESS. Commit: a6fa61a
/LLM/main/L0_MergeRequest_PR pipeline #22561 completed with status: 'SUCCESS'

@lkomali
lkomali force-pushed the lkomali/replace-gap-with-aiperf branch from f4a5121 to 48c77e2 Compare December 22, 2025 18:16
@lkomali
lkomali requested a review from a team December 22, 2025 18:16
@lkomali
lkomali requested a review from a team as a code owner December 22, 2025 18:16
@lkomali
lkomali requested review from kxdc and niukuo December 22, 2025 18:16
lkomali and others added 7 commits December 22, 2025 10:21
Signed-off-by: lkomali <lkomali@nvidia.com>
Signed-off-by: lkomali <lkomali@nvidia.com>
Signed-off-by: lkomali <lkomali@nvidia.com>
Signed-off-by: lkomali <lkomali@nvidia.com>
Signed-off-by: lkomali <lkomali@nvidia.com>
…rve.md

Co-authored-by: Kaiyu Xie <26294424+kaiyux@users.noreply.github.com>
Signed-off-by: Harshini Komali <157742537+lkomali@users.noreply.github.com>
Signed-off-by: lkomali <lkomali@nvidia.com>
Signed-off-by: lkomali <lkomali@nvidia.com>
@lkomali
lkomali force-pushed the lkomali/replace-gap-with-aiperf branch from 48c77e2 to 898a80e Compare December 22, 2025 18:28
Signed-off-by: lkomali <lkomali@nvidia.com>
@kaiyux

kaiyux commented Dec 23, 2025

Copy link
Copy Markdown
Member

/bot skip --comment "pipeline has passed"

@kaiyux
kaiyux removed request for a team, kxdc and niukuo December 23, 2025 02:37
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #29492 [ skip ] triggered by Bot. Commit: 5ad08f4

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #29492 [ skip ] completed with state SUCCESS. Commit: 5ad08f4
Skipping testing for commit 5ad08f4

@kaiyux
kaiyux enabled auto-merge (squash) December 23, 2025 03:24
Comment thread examples/serve/requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community want to contribute PRs initiated from Community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants