Skip to content

Conversation

raayandhar
Copy link
Contributor

@raayandhar raayandhar commented Aug 13, 2025

Summary by CodeRabbit

  • New Features

    • Added pipeline-parallel options for context and generation (ctx_pp_size, gen_pp_size); resource calculation and generated configs now account for pipeline parallelism.
  • Refactor

    • Public CLI/SLURM interface expanded and reordered: positional arguments increased and submission scripts updated to match; prints now include the new pipeline sizes.
  • Documentation

    • Benchmark README updated with richer, pipeline-aware arguments; concurrency_list renamed to concurrency; many deployment/config options added and old log-subdirectory option removed.

Description

We landed pipeline parallelism with pyt backend a little bit ago but these changes didn't propagate to the disagg readme and benchmarking scripts, etc. Making that change now.

Test Coverage

Will try running this locally to make sure it works as expected

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 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.

Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

📝 Walkthrough

Walkthrough

Adds pipeline-parallel size parameters (ctx_pp_size, gen_pp_size) across README, SLURM script, and YAML generator. Updates CLI/positional arguments, GPU/resource calculations, and config/URL generation to propagate these values; submit.sh updated to pass the new PP args. Removes sub_file and renames concurrency_listconcurrency.

Changes

Cohort / File(s) Summary
Documentation
examples/disaggregated/slurm/benchmark/README.md
Updates benchmark argument list: adds ctx_pp_size/gen_pp_size, renames concurrency_listconcurrency, removes sub_file, adds deployment-related params, and reorders context/gen args.
SLURM script(s)
examples/disaggregated/slurm/benchmark/disaggr_torch.slurm, examples/disaggregated/slurm/benchmark/submit.sh
Adds positional args ctx_pp_size and gen_pp_size (positional count 23→25); shifts downstream indices; recalculates ctx_gpus/gen_gpus using TP*PP; passes new flags to gen_yaml.py; prints new params; submit.sh updated to supply PP values.
YAML / config generator
examples/disaggregated/slurm/benchmark/gen_yaml.py
Adds CLI options --ctx_pp_size and --gen_pp_size, updates gen_config_file signature, sets pipeline_parallel_size per stage, updates URL generation to use PP, and forwards server_port and cache_transceiver_max_num_tokens.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant S as submit.sh
  participant SL as disaggr_torch.slurm
  participant G as gen_yaml.py
  participant C as YAML Config

  U->>S: Run benchmark (includes ctx_pp_size/gen_pp_size)
  S->>SL: sbatch / invoke SLURM script with args
  SL->>SL: Compute ctx_gpus = num_ctx_servers * ctx_tp_size * ctx_pp_size
  SL->>SL: Compute gen_gpus = num_gen_servers * gen_tp_size * gen_pp_size
  SL->>G: Call gen_yaml.py --ctx_pp_size --gen_pp_size ... 
  G->>G: Build config and generate URLs using TP and PP
  G-->>C: Write YAML config
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Documentation

Suggested reviewers

  • qiaoxj07
  • pcastonguay
  • kaiyux
  • Shixiaowei02

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🔭 Outside diff range comments (4)
examples/disaggregated/slurm/benchmark/gen_yaml.py (2)

4-4: Fix Python 3.8 typing incompatibilities (use typing.Tuple).

This repo targets Python 3.8+, but builtin generics like tuple[List[str], int] require Python 3.9+. Replace them with typing.Tuple and import it.

Apply this diff:

-from typing import Dict, List
+from typing import Dict, List, Tuple
@@
-def process_node_and_task() -> tuple[int, List[str], List[str]]:
+def process_node_and_task() -> Tuple[int, List[str], List[str]]:
@@
-def generate_urls(ctx_or_gen: str,
+def generate_urls(ctx_or_gen: str,
                   num_instances: int,
                   tensor_parallel_size: int,
                   pipeline_parallel_size: int,
                   max_tasks_per_node: int,
                   nodes: List[str],
                   task_nodes: List[str],
                   node_to_port: Dict[str, int],
-                  task_nodes_offset: int = 0) -> tuple[List[str], int]:
+                  task_nodes_offset: int = 0) -> Tuple[List[str], int]:

Also applies to: 9-10, 77-86


307-343: Validate pp sizes at CLI level to avoid invalid configurations.

Guard against 0 or negative pp sizes by using a custom positive-int parser for --ctx_pp_size and --gen_pp_size.

Apply this diff:

@@
-    parser.add_argument("--ctx_pp_size",
-                        type=int,
-                        default=1,
-                        help="Pipeline parallel size for context servers")
+    def _positive_int(value: str) -> int:
+        iv = int(value)
+        if iv < 1:
+            raise argparse.ArgumentTypeError("value must be >= 1")
+        return iv
+    parser.add_argument("--ctx_pp_size",
+                        type=_positive_int,
+                        default=1,
+                        help="Pipeline parallel size for context servers (>=1)")
@@
-    parser.add_argument("--gen_pp_size",
-                        type=int,
-                        default=1,
-                        help="Pipeline parallel size for generation servers")
+    parser.add_argument("--gen_pp_size",
+                        type=_positive_int,
+                        default=1,
+                        help="Pipeline parallel size for generation servers (>=1)")
examples/disaggregated/slurm/benchmark/README.md (2)

105-111: Update workflow step about logs; sub_file parameter no longer exists.

This step references a removed parameter. Point to the actual log path built in disaggr_torch.slurm (logdir/full_logdir).

Apply this diff:

-10. After the benchmark, `run_benchmark.sh` and `disaggr_torch.slurm` attempt to kill the server and worker processes.
-11. Logs for each run are stored in a subdirectory specified by the `sub_file` parameter.
+10. After the benchmark, `run_benchmark.sh` and `disaggr_torch.slurm` attempt to kill the server and worker processes.
+11. Logs for each run are stored under `${workdir}/benchmark-<isl>-<osl>/...` (see `full_logdir` construction in `disaggr_torch.slurm`).

85-93: Rename concurrency_list → concurrency in run_benchmark.sh and README

run_benchmark.sh and the benchmark README still reference concurrency_list while the rest of the repo uses a single concurrency value (e.g. disaggr_torch.slurm). Update both to avoid confusion.

Files to change:

  • examples/disaggregated/slurm/benchmark/run_benchmark.sh
    • Usage line (currently: "Usage: ... concurrency_list ...") — change to concurrency
    • Argument assignment (currently: concurrency_list=$5) — change to concurrency=$5
    • Loop (currently: for concurrency in ${concurrency_list}; do) — iterate over ${concurrency} instead
  • examples/disaggregated/slurm/benchmark/README.md
    • Replace the concurrency_list entry with concurrency.

Suggested diffs:

README.md

-5.  `concurrency_list`: Space-separated list of concurrencies.
+5.  `concurrency`: Concurrency level (integer).

run_benchmark.sh

-    echo "Usage: $0 isl osl multi_round model_name concurrency_list streaming log_path"
+    echo "Usage: $0 isl osl multi_round model_name concurrency streaming log_path"
...
-concurrency_list=$5
+concurrency=$5
...
-for concurrency in ${concurrency_list}; do
+for concurrency in ${concurrency}; do
🧹 Nitpick comments (4)
examples/disaggregated/slurm/benchmark/gen_yaml.py (3)

146-169: Document cache_transceiver_max_num_tokens in gen_config_file docstring.

The parameter is part of the signature but missing in the Args section.

Apply this diff:

@@ def gen_config_file(config_path: str,
-        server_port: Server port
+        server_port: Server port
+        cache_transceiver_max_num_tokens: Max tokens held by the cache transceiver buffer

103-111: Minor grammar and clarity fix in error message.

“use more node than expected” → “use more nodes than expected”.

Apply this diff:

-            raise ValueError(
-                f"Tasks for a instance {instance} of {ctx_or_gen} instances use more node than expected. Nodes used: {instance_nodes}, number of nodes expected: {min_node}, max_tasks_per_node: {max_tasks_per_node}"
-            )
+            raise ValueError(
+                f"Tasks for instance {instance} of {ctx_or_gen} use more nodes than expected. Nodes used: {instance_nodes}, nodes expected: {min_node}, max_tasks_per_node: {max_tasks_per_node}"
+            )

1-1: Add NVIDIA copyright header.

Per repo guidelines, prepend the NVIDIA copyright header to Python files.

Apply this diff at the top of the file:

+# Copyright (c) 2025, NVIDIA CORPORATION.  All rights reserved.
examples/disaggregated/slurm/benchmark/disaggr_torch.slurm (1)

80-83: Include PP sizes in log directory to disambiguate runs.

The log directory encodes tp sizes but not pp. Including pp avoids collisions when sweeping pp sizes.

Apply this diff:

-logdir=${workdir}/benchmark-${isl}-${osl}
+logdir=${workdir}/benchmark-${isl}-${osl}
 mkdir -p ${logdir}
-full_logdir=${logdir}/ctx${num_ctx_servers}_gen${num_gen_servers}_dep${gen_tp_size}_batch${gen_batch_size}_eplb${eplb_num_slots}_mtp${mtp_size}
+full_logdir=${logdir}/ctx${num_ctx_servers}_gen${num_gen_servers}_dep${gen_tp_size}_cpp${ctx_pp_size}_gpp${gen_pp_size}_batch${gen_batch_size}_eplb${eplb_num_slots}_mtp${mtp_size}
@@
-    full_logdir=${logdir}/ctx${num_ctx_servers}_gen${num_gen_servers}_tep${gen_tp_size}_batch${gen_batch_size}_eplb${eplb_num_slots}_mtp${mtp_size}
+    full_logdir=${logdir}/ctx${num_ctx_servers}_gen${num_gen_servers}_tep${gen_tp_size}_cpp${ctx_pp_size}_gpp${gen_pp_size}_batch${gen_batch_size}_eplb${eplb_num_slots}_mtp${mtp_size}

Also applies to: 95-96

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cba883 and 8e1730d.

📒 Files selected for processing (4)
  • examples/disaggregated/slurm/benchmark/README.md (2 hunks)
  • examples/disaggregated/slurm/benchmark/disaggr_torch.slurm (3 hunks)
  • examples/disaggregated/slurm/benchmark/gen_yaml.py (8 hunks)
  • examples/disaggregated/slurm/benchmark/submit.sh (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code must target Python 3.8+
Python indentation: 4 spaces, no tabs
Maintain module namespace in imports (from package.subpackage import foo; then use foo.SomeClass())
Python file names use snake_case
Python class names use PascalCase
Python functions/methods and local variables use snake_case; variables starting with a number get k_ prefix (e.g., k_99th_percentile)
Global variables use G_ prefixed UPPER_SNAKE_CASE (e.g., G_MY_GLOBAL)
Constants use UPPER_SNAKE_CASE in Python
Avoid shadowing variables from outer scopes in Python
Initialize all externally visible members of a Python class in init
Prefer docstrings for interfaces used outside a file; comments for local code
Use Google-style docstrings for classes and functions (Sphinx-parsable)
Document attributes/variables inline with short docstrings
Avoid reflection when simple alternatives exist (e.g., prefer explicit parameters over dict(**locals()))
In try/except, catch the narrowest exceptions possible
For duck-typing with try/except, keep try body minimal and put logic in else

Files:

  • examples/disaggregated/slurm/benchmark/gen_yaml.py
**/*.{cpp,cxx,cc,cu,h,hpp,hxx,hh,cuh,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

Prepend NVIDIA copyright header (current year) to all source files

Files:

  • examples/disaggregated/slurm/benchmark/gen_yaml.py
🔇 Additional comments (5)
examples/disaggregated/slurm/benchmark/gen_yaml.py (1)

122-145: Pipeline parallelism correctly introduced and propagated.

ctx_pp_size/gen_pp_size are plumbed through the function signature, config dict, and URL generation. The mapping to 'pipeline_parallel_size' for the respective server groups looks correct.

Also applies to: 186-206, 207-236, 242-254

examples/disaggregated/slurm/benchmark/submit.sh (1)

23-27: Arguments updated to include PP size look correct and consistent.

The insertion of ctx_pp_size and gen_pp_size aligns with disaggr_torch.slurm and gen_yaml.py, and comments are updated accordingly.

Also applies to: 31-31, 39-39

examples/disaggregated/slurm/benchmark/disaggr_torch.slurm (3)

13-26: Argument parsing extended with ctx_pp_size/gen_pp_size is correct.

Positions and variable names are consistent with README and submit.sh.


86-88: GPU accounting correctly incorporates PP sizes.

Including pp in ctx_gpus/gen_gpus prevents under-allocation. Nice catch.


121-146: PP sizes correctly forwarded to gen_yaml.py.

The new flags --ctx_pp_size/--gen_pp_size are passed through and align with gen_yaml.py.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🔭 Outside diff range comments (2)
examples/disaggregated/slurm/benchmark/gen_yaml.py (2)

4-4: Fix Python 3.8 typing incompatibility: use typing.Tuple instead of builtin tuple[...]

The file targets Python 3.8+, but builtin generics like tuple[List[str], ...] require Python 3.9+. This will raise errors on 3.8. Switch to typing.Tuple.

Apply this diff:

-from typing import Dict, List
+from typing import Dict, List, Tuple
@@
-def process_node_and_task() -> tuple[int, List[str], List[str]]:
+def process_node_and_task() -> Tuple[int, List[str], List[str]]:
@@
-def generate_urls(ctx_or_gen: str,
-                  num_instances: int,
-                  tensor_parallel_size: int,
-                  pipeline_parallel_size: int,
-                  max_tasks_per_node: int,
-                  nodes: List[str],
-                  task_nodes: List[str],
-                  node_to_port: Dict[str, int],
-                  task_nodes_offset: int = 0) -> tuple[List[str], int]:
+def generate_urls(ctx_or_gen: str,
+                  num_instances: int,
+                  tensor_parallel_size: int,
+                  pipeline_parallel_size: int,
+                  max_tasks_per_node: int,
+                  nodes: List[str],
+                  task_nodes: List[str],
+                  node_to_port: Dict[str, int],
+                  task_nodes_offset: int = 0) -> Tuple[List[str], int]:

Also applies to: 9-10, 77-86


1-1: Add required NVIDIA copyright header.

Per repo guidelines, prepend the NVIDIA copyright header to all source files.

Apply this diff:

+#
+# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
+#
 import argparse
🧹 Nitpick comments (6)
examples/disaggregated/slurm/benchmark/gen_yaml.py (6)

148-169: Docstring: document cache_transceiver_max_num_tokens.

The parameter exists in the function signature but is missing in Args, which may confuse users.

Apply this diff to complete the docstring:

         worker_start_port: Start port for workers
         server_port: Server port
+        cache_transceiver_max_num_tokens: Max tokens held in the cache transceiver buffer

170-172: Optional: de-duplicate CUDA graph batch sizes.

gen_cuda_graph_batch_sizes can contain duplicates if gen_batch_size is already in the list. Not harmful, but easy to tidy.

Apply this diff:

-    gen_cuda_graph_batch_sizes = [
-        1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 768, 1024, 2048, gen_batch_size
-    ]
+    gen_cuda_graph_batch_sizes = list(dict.fromkeys([
+        1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 768, 1024, 2048, gen_batch_size
+    ]))

262-269: Ensure output directory exists before writing MoE LB config.

If config_path includes a non-existent directory, this write will fail.

Apply this diff:

-        moe_load_balancer_file = os.path.join(os.path.dirname(config_path),
-                                              "moe_load_balancer.yaml")
+        out_dir = os.path.dirname(config_path) or "."
+        os.makedirs(out_dir, exist_ok=True)
+        moe_load_balancer_file = os.path.join(out_dir, "moe_load_balancer.yaml")

17-18: Prefer logging over printing for operational visibility.

Replacing print with logging allows users to control verbosity and integrates with SLURM logging more cleanly.

Example minimal change:

+import logging
+logger = logging.getLogger(__name__)
@@
-    print(f"SLURM_JOB_NODELIST: {slurm_job_nodelist}")
+    logger.info(f"SLURM_JOB_NODELIST: {slurm_job_nodelist}")
@@
-    print(f"SLURM_TASKS_PER_NODE: {slurm_tasks_per_node}")
+    logger.info(f"SLURM_TASKS_PER_NODE: {slurm_tasks_per_node}")
@@
-    print(f"Nodes: {nodes}")
+    logger.debug(f"Nodes: {nodes}")
@@
-    print(f"Tasks per node: {tasks_per_node}")
+    logger.debug(f"Tasks per node: {tasks_per_node}")
@@
-            print(f"{ctx_or_gen} urls so far: {urls}")
+            logger.warning(f"{ctx_or_gen} urls so far: {urls}")
@@
-    print(f"{ctx_or_gen} urls: {urls}")
+    logger.info(f"{ctx_or_gen} urls: {urls}")

Also applies to: 22-23, 52-53, 62-63, 98-101, 118-119


103-110: Reassess the strict node-usage assertion for heterogeneous task layouts.

The check compares the actual number of nodes spanned by a server instance to ceil(tasks_needed / max_tasks_per_node). In heterogeneous SLURM_TASKS_PER_NODE scenarios or when the offset crosses node boundaries, this can legitimately exceed the theoretical minimum and trigger a false negative.

Consider downgrading this to a warning or computing the expected minimum based on the contiguous capacities of the nodes starting at task_nodes_offset. For example:

-        if len(instance_nodes) > min_node:
-            raise ValueError(
-                f"Tasks for a instance {instance} of {ctx_or_gen} instances use more node than expected. Nodes used: {instance_nodes}, number of nodes expected: {min_node}, max_tasks_per_node: {max_tasks_per_node}"
-            )
+        if len(instance_nodes) > min_node:
+            print(f"Warning: {ctx_or_gen} instance {instance} spans {len(instance_nodes)} nodes (> theoretical minimum {min_node}); proceeding.")

If you depend on this being hard-fail for uniform clusters, confirm SLURM_TASKS_PER_NODE is homogeneous in your environment.


143-144: Minor: unify default ports between function signature and CLI defaults.

worker_start_port/server_port defaults differ between gen_config_file (8001/8000) and argparse (8336/8333). Not a blocker, but this can surprise users when calling gen_config_file programmatically versus via CLI.

Align defaults or add a short comment/docstring note clarifying that CLI defaults override the function defaults.

Also applies to: 372-378

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8e1730d and 35e8a45.

📒 Files selected for processing (2)
  • examples/disaggregated/slurm/benchmark/gen_yaml.py (8 hunks)
  • examples/disaggregated/slurm/benchmark/submit.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/disaggregated/slurm/benchmark/submit.sh
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code must target Python 3.8+
Python indentation: 4 spaces, no tabs
Maintain module namespace in imports (from package.subpackage import foo; then use foo.SomeClass())
Python file names use snake_case
Python class names use PascalCase
Python functions/methods and local variables use snake_case; variables starting with a number get k_ prefix (e.g., k_99th_percentile)
Global variables use G_ prefixed UPPER_SNAKE_CASE (e.g., G_MY_GLOBAL)
Constants use UPPER_SNAKE_CASE in Python
Avoid shadowing variables from outer scopes in Python
Initialize all externally visible members of a Python class in init
Prefer docstrings for interfaces used outside a file; comments for local code
Use Google-style docstrings for classes and functions (Sphinx-parsable)
Document attributes/variables inline with short docstrings
Avoid reflection when simple alternatives exist (e.g., prefer explicit parameters over dict(**locals()))
In try/except, catch the narrowest exceptions possible
For duck-typing with try/except, keep try body minimal and put logic in else

Files:

  • examples/disaggregated/slurm/benchmark/gen_yaml.py
**/*.{cpp,cxx,cc,cu,h,hpp,hxx,hh,cuh,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

Prepend NVIDIA copyright header (current year) to all source files

Files:

  • examples/disaggregated/slurm/benchmark/gen_yaml.py
⏰ 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
🔇 Additional comments (1)
examples/disaggregated/slurm/benchmark/gen_yaml.py (1)

126-135: PP size correctly propagated end-to-end (signature, config, and URLs).

The newly added ctx_pp_size/gen_pp_size are consistently threaded through:

  • gen_config_file signature and doc-args,
  • config emission for context_servers/generation_servers,
  • URL generation for both ctx/gen with correct tasks_needed = tp * pp.

This aligns the YAML and runtime URLs with pipeline parallelism. LGTM.

Also applies to: 194-195, 212-213, 244-244, 250-253

@pcastonguay
Copy link
Collaborator

@qiaoxj07 @Tabrizian could you please review as well? Thanks

@pcastonguay
Copy link
Collaborator

@raayandhar could you rebase and fix conflicts? Thanks.

@raayandhar raayandhar force-pushed the disagg_pp_doc branch 2 times, most recently from f3150d3 to 345d333 Compare August 19, 2025 17:25
@qiaoxj07
Copy link
Collaborator

@raayandhar
Copy link
Contributor Author

raayandhar commented Aug 21, 2025

Hi @raayandhar, there are another two files also depending on this file, could you update them accordingly? https://github.com/NVIDIA/TensorRT-LLM/blob/main/examples/wide_ep/slurm_scripts/submit_e2e.sh https://github.com/NVIDIA/TensorRT-LLM/blob/main/examples/wide_ep/slurm_scripts/submit_gen_only.sh

Yes, will update them, thanks for pointing them out.

@raayandhar
Copy link
Contributor Author

@qiaoxj07 I update the scripts, could you take a look?

@qiaoxj07
Copy link
Collaborator

LGTM

@pcastonguay
Copy link
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16446 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16446 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #12357 completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

@raayandhar
Copy link
Contributor Author

raayandhar commented Aug 27, 2025

I tested submit.sh on a slurm cluster and had to make a small change to get it to work, just committed that right now.

@kaiyux kaiyux enabled auto-merge (squash) August 27, 2025 04:29
@kaiyux
Copy link
Member

kaiyux commented Aug 27, 2025

/bot skip --comment "the slurm scripts are not protected by CI pipeline"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16636 [ skip ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16636 [ skip ] completed with state SUCCESS
Skipping testing for commit 3c04609

@kaiyux kaiyux merged commit 82bd187 into NVIDIA:main Aug 27, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants