Skip to content

Add aggregate mode support to AIDynamo workload - #982

Open
saivishal1999 wants to merge 1 commit into
NVIDIA:mainfrom
saivishal1999:spothula/aggregate-mode-support
Open

Add aggregate mode support to AIDynamo workload#982
saivishal1999 wants to merge 1 commit into
NVIDIA:mainfrom
saivishal1999:spothula/aggregate-mode-support

Conversation

@saivishal1999

Copy link
Copy Markdown
Contributor

In aggregate mode a single vLLM worker handles both prefill and decode on the same node(s), as opposed to disaggregated mode where separate prefill and decode workers run on distinct nodes.

Changes:

  • ai_dynamo.py: add mode field (aggregate|disaggregate, default disaggregate) to AIDynamoArgs; skip decode worker model population and constraint checks in aggregate mode
  • slurm_command_gen_strategy.py: zero out decode node count and omit --decode-* CLI args when mode=aggregate
  • ai_dynamo.sh: guard decode TP/PP validation and workers-per-node calculation when no decode nodes are configured; fall back to prefill node as frontend-node in aggregate mode

Tested on Lyris GB200: aggregate (1 node, prefill 1/1 decode 0/0) and disaggregated (2 nodes, prefill 1/1 decode 1/1) both pass.

In aggregate mode a single vLLM worker handles both prefill and decode
on the same node(s), as opposed to disaggregated mode where separate
prefill and decode workers run on distinct nodes.

Changes:
- ai_dynamo.py: add mode field (aggregate|disaggregate, default disaggregate)
  to AIDynamoArgs; skip decode worker model population and constraint checks
  in aggregate mode
- slurm_command_gen_strategy.py: zero out decode node count and omit
  --decode-* CLI args when mode=aggregate
- ai_dynamo.sh: guard decode TP/PP validation and workers-per-node
  calculation when no decode nodes are configured; fall back to prefill
  node as frontend-node in aggregate mode

Tested on Lyris GB200: aggregate (1 node, prefill 1/1 decode 0/0) and
disaggregated (2 nodes, prefill 1/1 decode 1/1) both pass.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

AI Dynamo aggregate mode

Layer / File(s) Summary
Mode configuration and constraints
src/cloudai/workloads/ai_dynamo/ai_dynamo.py
Adds aggregate/disaggregate mode selection, conditionally configures decode workers, and skips split-worker constraints in aggregate mode.
Scheduler arguments and node specification
src/cloudai/workloads/ai_dynamo/slurm_command_gen_strategy.py
Omits decode-worker arguments and validation for aggregate runs while preserving prefill-worker handling.
Runtime allocation and startup sequencing
src/cloudai/workloads/ai_dynamo/ai_dynamo.sh
Updates frontend-node selection, VLLM worker allocation, DCGM enablement parsing, and starts ingress after workers launch.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested labels: enhancement

Suggested reviewers: podkidyshev

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding aggregate mode support to AIDynamo.
Description check ✅ Passed The description is directly related to the changeset and accurately summarizes the aggregate-mode updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch spothula/aggregate-mode-support

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

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/cloudai/workloads/ai_dynamo/ai_dynamo.py`:
- Around line 583-586: Update the aggregate-mode branch in the constraint-check
function so it skips only decode/split-specific validation while still executing
prefill GPU-capacity validation, including tp_times_pp_le_gpus_per_node. Remove
the unconditional early return and preserve the existing aggregate-mode handling
for checks that do not apply.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 4b622366-c12f-4a19-aaee-a617e29f1f49

📥 Commits

Reviewing files that changed from the base of the PR and between a218a77 and 403434a.

📒 Files selected for processing (3)
  • src/cloudai/workloads/ai_dynamo/ai_dynamo.py
  • src/cloudai/workloads/ai_dynamo/ai_dynamo.sh
  • src/cloudai/workloads/ai_dynamo/slurm_command_gen_strategy.py

Comment on lines +583 to +586
if tr.test.cmd_args.dynamo.mode == "aggregate":
logging.info("constraint_check skipped: aggregate mode has no prefill/decode split")
return True

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Retain prefill GPU-capacity validation in aggregate mode.

This return also skips tp_times_pp_le_gpus_per_node for the prefill worker. An aggregate run with TP × PP exceeding available GPUs is accepted, then the runtime allocation can compute zero workers per node. Skip only decode/split-specific checks; continue validating prefill capacity.

This is evidenced by the allocation path in src/cloudai/workloads/ai_dynamo/ai_dynamo.sh Lines 376-390.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cloudai/workloads/ai_dynamo/ai_dynamo.py` around lines 583 - 586, Update
the aggregate-mode branch in the constraint-check function so it skips only
decode/split-specific validation while still executing prefill GPU-capacity
validation, including tp_times_pp_le_gpus_per_node. Remove the unconditional
early return and preserve the existing aggregate-mode handling for checks that
do not apply.

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.

1 participant