Support Heterogenous Node Groups - #4094
Open
Bihan wants to merge 1 commit into
Open
Conversation
r4victor
reviewed
Aug 5, 2026
Comment on lines
+2216
to
+2217
| if not _is_node_group_master(job, replica_jobs): | ||
| return [job] |
Collaborator
There was a problem hiding this comment.
So group masters can now provision the jobs within its group? This seems to conflict with _release_replica_jobs_from_master_wait that still releases all the jobs when the global master is provisioned – both group masters and group non-master jobs provision concurrently.
Collaborator
Author
There was a problem hiding this comment.
Proposed staged unlock / provision flow
Layout
- Group 0: jobs
0, 1, 2— job0= global master + group-0 master - Group 1: jobs
3, 4— job3= group-1 master - Group 2: jobs
5, 6— job5= group-2 master
Invariant: later groups stay blocked (waiting_master_job) until the global master (job 0) has finished its provision attempt. After that, unlock is staged (not “release everyone”).
1. Job 0 runs
jobs_to_provision = [0, 1, 2]
| Backend | Result |
|---|---|
| ComputeGroup | One run_jobs → VMs for 0, 1, 2 |
| Non-ComputeGroup | This call only creates a VM for job 0 |
2. Job 0 unlocks (after its provision attempt)
| Unlock | Why |
|---|---|
Jobs 1, 2 (rest of same group) |
Non-ComputeGroup: they still need to provision one-by-one |
Job 3 (group-1 master only) |
Lets group 1 start its batch |
Job 5 (group-2 master only) |
Lets group 2 start when ready |
Not 4 or 6 |
Avoids racing the group master’s batch |
3. Job 3 runs (group 1)
jobs_to_provision = [3, 4]
| Backend | Result |
|---|---|
| ComputeGroup | One run_jobs → VMs for 3, 4; job 4 already done |
| Non-ComputeGroup | VM for job 3 only → job 3 then unlocks job 4 → 4 provisions alone |
4. Job 5 runs (group 2)
Same pattern as step 3 with jobs_to_provision = [5, 6].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add heterogeneous node groups for multinode tasks (groups:), mutually exclusive with homogeneous nodes:, so one run can mix roles/resources (e.g. CPU router + GPU prefill/decode for PD-disaggregation).
Expand groups into a single global rank space with per-job node_group_* metadata; provision each group as its own same-shape batch; wire cross-group addressing via ${{ groups[i].nodes[j].IP_ADDRESS }} after IPs are ready (workers-first supported).
Runner: accept ClusterInfo.gpus_per_node, sum it for $DSTACK_GPUS_NUM, and write the MPI hostfile with per-IP slots= (CPU nodes omit slots); fall back to homogeneous gpus_per_job when the list is empty (older servers).
Design doc: Heterogeneous Node Groups
Sample config (PD-disaggregation)
SSH-Fleet