Repository navigation
helios: allow persistent workers on rank 0 of local multi-rank cores - #640
Open
original-el8 wants to merge 1 commit into
Open
original-el8 wants to merge 1 commit into
original-el8 wants to merge 1 commit into
Conversation
Why: Helios rejected persistent_workers whenever a core contained more than one rank, preventing local multi-GPU deployments from running a rank-0 persistent worker alongside plain peer ranks under ThreadedExecutor. Peer ranks (rank > 0) and multi-host socket clusters still do not support persistent workers and must remain explicitly rejected. What: - helios/src/runtime_core/model.rs: - Before: validate_persistent_worker_topology rejected any core slice with cores.len() > 1 or cluster.is_some() when any rank declared persistent_workers. - After: validate_persistent_worker_topology permits cores.first() (rank 0) to declare persistent_workers on local cores (cluster.is_none()), while rejecting peer ranks (cores.iter().skip(1)) or clustered cores (has_rank0_worker && cluster.is_some()) with "persistent workers are only supported on rank 0 of a local core". - Updated persistent_worker_topology_rejects_peer_rank_and_cluster_cores to cover [worker, plain], [worker, worker], [plain, worker], and [worker] with cluster metadata. - helios/src/runtime_core/selection.rs: - Before: LoadOptions::select rejected !execution.persistent_workers.is_empty() && multi_rank. - After: LoadOptions::select rejects !execution.persistent_workers.is_empty() && rank > 0 with "persistent workers are only supported on rank 0", retaining rank 0's persistent worker graph on local multi-rank cores. - Updated selected_graphs_retain_rank0_persistent_worker_and_reject_peer_or_multiple_workers. - helios/src/execution/threaded.rs: - Before: ThreadedExecutor::new rejected !manifest.persistent_workers.is_empty() as well as peer workers, and same_layout(a, b) required a.persistent_workers and b.persistent_workers to match. - After: ThreadedExecutor::new rejects only ranks.iter().any(|rank| !rank.persistent_workers.is_empty()), and same_layout(a, b) checks !b.persistent_workers.is_empty() so rank 0's persistent worker does not fail peer layout validation. - Added rank_layout_permits_persistent_worker_only_on_rank_zero. - docs/runtime-core-design.md: - Updated Execution.persistent_workers topology wording to match rank-0 support on local cores and peer/cluster rejection. Result: Local multi-rank cores can validate, select, and initialize rank-0 persistent workers alongside plain peer ranks while rejecting peer-rank, multi-worker, and multi-host cluster persistent workers. Verification and limitations: - Executed CPU-only (CUDA_VISIBLE_DEVICES="") against helios/Cargo.toml (flare-helios): - cargo test --locked --manifest-path helios/Cargo.toml -p flare-helios --features runtime-core,server --lib execution:: -> 133 passed, 0 failed, 2 ignored (CUDA-gated). - cargo test --locked --manifest-path helios/Cargo.toml -p flare-helios --features runtime-core,server --lib runtime_core:: -> 186 passed, 0 failed, 11 ignored (CUDA-gated). - cargo test --locked --manifest-path helios/Cargo.toml -p flare-helios --features runtime-core --lib -> 1,167 passed, 0 failed, 34 ignored. - Limitations: CUDA-gated Green Context tests (#[ignore]) and live multi-GPU core loading/execution with a persistent worker were not executed in this CPU-only check. Design-Signed-Off-By: Jason Cook <1637905+original-el8@users.noreply.github.com>; design-review=2e5b
Collaborator
|
A case file has been opened for 640. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Collaborator
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedThe predicate relaxations are narrow and model-agnostic, but the PR lifts PR #430's maintainer-imposed gate without exercising multi-rank initialization, partial-startup-failure, or failure-abandonment paths, leaves
Walkthrough
Merge Risk: Medium · up to
|
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.
Why
Helios previously rejected
persistent_workerswhenever a core contained more than one rank, even when only rank 0 of a local multi-rank deployment carried a persistent worker and peer ranks carried none. That restriction blocked local multi-GPU cores from combining a rank-0 persistent worker (such as a GPU-side mover) with plain peer ranks underThreadedExecutor. Multi-host socket clusters and peer ranks (rank > 0) still do not support persistent workers and must remain explicitly rejected.What changed
helios/src/runtime_core/model.rs:validate_persistent_worker_topologyrejected any core set withcores.len() > 1orcluster.is_some()if any rank had non-emptypersistent_workers.validate_persistent_worker_topologyallowscores.first()(rank 0) to carry a persistent worker on local cores (cluster.is_none()), while rejecting peer ranks (cores.iter().skip(1)) or clustered cores (has_rank0_worker && cluster.is_some()) with"persistent workers are only supported on rank 0 of a local core".persistent_worker_topology_rejects_peer_rank_and_cluster_coresto verify[worker, plain]passes while[worker, worker],[plain, worker], and[worker]with a cluster descriptor fail.helios/src/runtime_core/selection.rs:LoadOptions::selectrejected!execution.persistent_workers.is_empty() && multi_rank.LoadOptions::selectchecksrank > 0, retaining rank 0's persistent worker graph on local multi-rank cores while rejecting peer-rank persistent workers with"persistent workers are only supported on rank 0".selected_graphs_retain_rank0_persistent_worker_and_reject_peer_or_multiple_workersto cover[worker_core(), core()],[worker_core(), worker_core()], and[core(), worker_core()].helios/src/execution/threaded.rs:ThreadedExecutor::newrejected!manifest.persistent_workers.is_empty()alongside peer workers, andsame_layout(a, b)requireda.persistent_workersandb.persistent_workersto match.ThreadedExecutor::newrejects only peer ranks with non-emptypersistent_workers(ranks.iter().any(|rank| !rank.persistent_workers.is_empty())), andsame_layout(a, b)requiresb.persistent_workers.is_empty()so rank 0's persistent worker does not fail peer layout comparison.rank_layout_permits_persistent_worker_only_on_rank_zero.docs/runtime-core-design.md:Execution.persistent_workerstopology specification to match rank-0 support on local cores and peer/cluster rejection.Result
Local multi-rank cores can load, select, and initialize rank-0 persistent workers alongside plain peer ranks, while peer-rank persistent workers, multiple workers per rank, and multi-host cluster persistent workers continue to fail validation explicitly.
Verification
Executed CPU-only (
CUDA_VISIBLE_DEVICES="") againsthelios/Cargo.toml(flare-helios):cargo test --locked --manifest-path helios/Cargo.toml -p flare-helios --features runtime-core,server --lib execution::: 133 passed, 0 failed, 2 ignored (CUDA-gated tests).cargo test --locked --manifest-path helios/Cargo.toml -p flare-helios --features runtime-core,server --lib runtime_core::: 186 passed, 0 failed, 11 ignored (CUDA-gated tests).cargo test --locked --manifest-path helios/Cargo.toml -p flare-helios --features runtime-core --lib: 1,167 passed, 0 failed, 34 ignored.Limitations: CUDA-gated Green Context tests (
#[ignore]) and live multi-GPU core loading/execution with a persistent worker were not executed in this CPU-only check.Discord: el8