-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[TRTLLM-8263][feat] Add ctx-only and gen-only Disagg Perf Tests #11361
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?
[TRTLLM-8263][feat] Add ctx-only and gen-only Disagg Perf Tests #11361
Conversation
📝 WalkthroughWalkthroughThis PR introduces a comprehensive local SLURM-based performance testing infrastructure with new orchestration scripts and configuration updates. It adds a Python submission tool, shell scripts for installation and execution with locking mechanisms, and documentation, while updating disaggregated/aggregated test launchers with improved mode handling and adding GPU count specifications to multiple performance test YAML files. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
jenkins/scripts/perf/disaggregated/submit.py (3)
375-376:⚠️ Potential issue | 🔴 CriticalBug:
remove_whitespace_linesreturn value is discarded — the lists are never actually filtered.
remove_whitespace_lines(Line 108) returns a new list; it does not mutate the input. The same issue occurs on Lines 378 and 391. The whitespace-only lines remain in the joined output.Proposed fix
- remove_whitespace_lines(script_prefix_lines) + script_prefix_lines = remove_whitespace_lines(script_prefix_lines) script_prefix = "\n".join(script_prefix_lines) - remove_whitespace_lines(srun_args_lines) + srun_args_lines = remove_whitespace_lines(srun_args_lines) srun_args_lines.extend(- remove_whitespace_lines(draft_launch_lines) + draft_launch_lines = remove_whitespace_lines(draft_launch_lines) draft_launch_content = "\n".join(draft_launch_lines)
1-6:⚠️ Potential issue | 🟡 MinorMissing NVIDIA copyright header.
As per coding guidelines, all source files should contain an NVIDIA copyright header with the year of latest meaningful modification.
368-369:⚠️ Potential issue | 🟡 MinorFix inconsistent variable naming:
gpusPerfNodePerfshould begpusPerNodePer.Lines 368–369 export variables that use
Perfinstead ofPer, inconsistent with surrounding variable naming patterns likegpusPerNode,gpusPerCtxServer, andgpusPerGenServer. While these specific variables are currently unused in the codebase (downstream scripts usenCtxServerandnGenServerinstead), the naming should still be corrected for consistency.Proposed fix
- f"export gpusPerfNodePerfCtxServer={hardware_config['gpus_per_node_per_ctx_server']}", - f"export gpusPerfNodePerfGenServer={hardware_config['gpus_per_node_per_gen_server']}", + f"export gpusPerNodePerCtxServer={hardware_config['gpus_per_node_per_ctx_server']}", + f"export gpusPerNodePerGenServer={hardware_config['gpus_per_node_per_gen_server']}",
🤖 Fix all issues with AI agents
In `@jenkins/scripts/perf/local/slurm_install.sh`:
- Line 41: The conditional uses an unquoted bare $SLURM_LOCALID which will fail
under set -u when SLURM isn't set; change the test to use a quoted default
numeric expansion such as if [ "${SLURM_LOCALID:-0}" -eq 0 ]; so the script uses
the default 0 when SLURM_LOCALID is unset and avoids unbound variable errors
(update the conditional that currently reads if [ $SLURM_LOCALID -eq 0 ];).
In `@jenkins/scripts/perf/local/submit.py`:
- Around line 498-499: The intentional visual separator (an empty string
appended to script_prefix_lines) is being removed by remove_whitespace_lines; to
fix, either stop appending the empty string (remove the
script_prefix_lines.append("") call) or call remove_whitespace_lines on
script_prefix_lines before you append the intentional separator so the blank
line is preserved; alternatively, modify remove_whitespace_lines to accept a
flag or marker (e.g., preserve_markers) and skip lines that are explicitly
marked as intentional. Ensure you update the code around the script_prefix_lines
append site and references to remove_whitespace_lines so the intended blank
separator remains.
- Around line 519-522: The current os.chmod calls for launch_sh, run_sh, and
install_sh can raise FileNotFoundError for external files (run_sh, install_sh);
update the code around those os.chmod calls to either check existence using
os.path.exists() for run_sh and install_sh before calling os.chmod or wrap the
chmod calls in a try/except that catches FileNotFoundError and logs a clear
warning while allowing the rest of the script to continue; keep the chmod for
launch_sh as-is (since it is created here) but apply the existence
check/try-except specifically for run_sh and install_sh and use the same logger
or error handling behaviour used elsewhere in this module.
- Around line 473-474: The exported environment variable names contain a typo:
they use gpusPerfNodePerfCtxServer and gpusPerfNodePerfGenServer instead of the
correct gpusPerNodePerCtxServer and gpusPerNodePerGenServer; update the two
export strings that reference
hardware_config.get('gpus_per_node_per_ctx_server', '') and
hardware_config.get('gpus_per_node_per_gen_server', '') so the exported names
match the hardware config keys exactly (use gpusPerNodePerCtxServer and
gpusPerNodePerGenServer) to ensure downstream scripts find the expected
variables.
- Around line 351-353: The validation error message is misleading when test_name
is None but the user supplied --test-list; update the block that checks "if not
is_disagg and not test_name" to produce a contextual error: detect whether a
--test-list value was provided (the variable holding the list, e.g., test_list)
and, if so, raise a ValueError saying the test string from --test-list could not
be parsed (e.g., "invalid test format in --test-list: expected three bracket
parts"), otherwise keep or adjust the existing message about --config-file;
modify the error text in that validation to reflect which input (test_list vs
config_file) caused the missing test_name.
- Around line 1-8: This file is missing the required NVIDIA copyright header;
insert the standard NVIDIA copyright header block (with the year of latest
meaningful modification) at the top of the file immediately after the shebang
line (#!/usr/bin/env python3) so it precedes the import block, ensuring the
header text matches the project's canonical NVIDIA header format and includes
the correct year and ownership statements.
🧹 Nitpick comments (7)
jenkins/scripts/perf/aggregated/slurm_launch_draft.sh (1)
2-6:cleanup_on_failureis defined but never called.This function is dead code — nothing in the script invokes it, and there's no
trapwiring it to ERR. Either wire it via a trap or remove it.Also,
${SLURM_JOB_ID}should be quoted to prevent word splitting.Proposed fix
If the intent is to use it as an ERR trap:
+trap 'cleanup_on_failure "Command failed"' ERR + cleanup_on_failure() { echo "Error: $1" - scancel ${SLURM_JOB_ID} + scancel "${SLURM_JOB_ID}" exit 1 }Otherwise, remove the unused function.
jenkins/scripts/perf/disaggregated/submit.py (1)
337-348: Substring matching on mode is fragile.Using
"gen_only_no_context" in modeand"gen_only" in moderelies on check order since"gen_only"is a substring of"gen_only_no_context". Consider using exact equality (==) for robustness.Proposed fix
- if "gen_only_no_context" in benchmark_config.get("mode", ""): + if benchmark_config.get("mode", "") == "gen_only_no_context": worker_env_vars = f"TRTLLM_DISAGG_BENCHMARK_GEN_ONLY=1 {worker_env_vars}" server_env_vars = f"TRTLLM_DISAGG_BENCHMARK_GEN_ONLY=1 {server_env_vars}" script_prefix_lines.append("export TRTLLM_DISAGG_BENCHMARK_GEN_ONLY=1") srun_args_lines.append("--container-env=TRTLLM_DISAGG_BENCHMARK_GEN_ONLY") - elif "gen_only" in benchmark_config.get("mode", ""): + elif benchmark_config.get("mode", "") == "gen_only":jenkins/scripts/perf/local/README.md (1)
22-31: Consider replacing user-specific paths with placeholders in examples.The examples contain hardcoded user-specific paths (e.g.,
/home/chenfeiz/) and internal image URIs. Using placeholders like<your-home-dir>,<container-image>, etc. would make the documentation more reusable for other team members.jenkins/scripts/perf/local/slurm_run.sh (2)
16-16: Quote$llmSrcNodeto prevent word splitting.Proposed fix
-cd $llmSrcNode/tests/integration/defs +cd "$llmSrcNode"/tests/integration/defs
23-23: Quote$pytestCommandin theevalcall.Unquoted variable expansion before
evalcan cause unexpected word splitting if the command contains paths with spaces.Proposed fix
-eval $pytestCommand +eval "$pytestCommand"jenkins/scripts/perf/local/slurm_install.sh (1)
32-34: Busy-wait loops have no timeout — tasks will hang forever if the primary task crashes before writing the lock.Both the build-wheel wait (Lines 32–34) and install wait (Lines 56–58) poll indefinitely. Consider adding a timeout to prevent infinite hangs.
Example timeout pattern
+ local wait_seconds=0 + local max_wait=1800 # 30 minutes while [ ! -f "$build_lock_file" ]; do sleep 10 + wait_seconds=$((wait_seconds + 10)) + if [ $wait_seconds -ge $max_wait ]; then + echo "Timed out waiting for build wheel lock" + exit 1 + fi donejenkins/scripts/perf/local/submit.py (1)
211-211: Unused parametermodeingenerate_sbatch_params.The
modeparameter is accepted but never used in the function body. Either remove it or document intended future use.Proposed fix
-def generate_sbatch_params(args, hardware_config, work_dir, mode): +def generate_sbatch_params(args, hardware_config, work_dir):And update the call site at line 402:
- sbatch_lines = generate_sbatch_params(args, hardware_config, work_dir, args.mode) + sbatch_lines = generate_sbatch_params(args, hardware_config, work_dir)
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4,GB200-8_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU1-GEN1-NODE1-GPU4-Post-Merge-1" |
|
PR_Github #35439 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4,GB200-8_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-CTX1-NODE1-GPU1-GEN1-NODE1-GPU4-Post-Merge-1" |
|
PR_Github #35474 [ run ] triggered by Bot. Commit: |
|
PR_Github #35474 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-1,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-2,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4" |
|
PR_Github #35514 [ run ] triggered by Bot. Commit: |
|
PR_Github #35514 [ run ] completed with state
|
95d6177 to
9c6336b
Compare
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-1,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-2,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-5,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-6,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-7" |
|
PR_Github #35641 [ run ] triggered by Bot. Commit: |
|
PR_Github #35641 [ run ] completed with state |
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-1,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-2,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-5,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-6,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-7" |
|
PR_Github #35702 [ run ] triggered by Bot. Commit: |
|
PR_Github #35702 [ run ] completed with state
|
| def cleanupCommands = [ | ||
| "rm -rf ${cluster.scratchPath}/users/svc_tensorrt/containers/container-${slurmJobID}.sqsh || true", | ||
| "rm -rf ${jobWorkspace} || true", | ||
| // "rm -rf ${jobWorkspace} || true", |
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.
Revert back when merging.
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-1,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-2,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-5,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-6,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-7,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-4,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-5,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-6,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-7" |
|
PR_Github #35774 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-1,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-2,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-4,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-5,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-6" |
|
PR_Github #35779 [ run ] triggered by Bot. Commit: |
|
PR_Github #35779 [ run ] completed with state
|
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-3,GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-6,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-4,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-5,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-6,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-7" |
|
PR_Github #35865 [ run ] triggered by Bot. Commit: |
|
PR_Github #35865 [ run ] completed with state
|
840452c to
256bd08
Compare
Signed-off-by: Chenfei Zhang <[email protected]>
256bd08 to
16a0774
Compare
|
/bot run --disable-fail-fast --stage-list "GB200-4_GPUs-PyTorch-PerfSanity-Post-Merge-6,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-4,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-5,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-6,GB200-8_GPUs-2_Nodes-PyTorch-PerfSanity-Node2-GPU8-Post-Merge-7" |
|
PR_Github #35892 [ run ] triggered by Bot. Commit: |
|
PR_Github #35892 [ run ] completed with state
|
Summary by CodeRabbit
Release Notes
New Features
Documentation
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)
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 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.