Source/Packages

Representation.ParticipantTree

packages/representations/src/Representation/ParticipantTree.alpha

283 lines25 declarations11.9 KiBSHA-256 327ac80c5242

family · lines 26–35

ParticipantTreeNode

Full file
A bounded-fan-out hierarchy over logical roles 0..count-1, numbered in preorder so that every subtree is one contiguous role range [role, role + size). Role 0 is the root. A node's descendants (its range minus itself) are split into at most `fanout` contiguous chunks whose sizes differ by at most one, larger chunks first; each chunk is one child's subtree and its first role is that child. Why preorder ranges: a parent certifies its children's coverage with O(fan- out) checks -- consecutive child ranges must tile (role, role + size) -- so a checkpoint or collective rooted here never collects the complete membership or every shard descriptor at one participant (docs/multi-device-learning/22-fleet-scale.md, "Distributed checkpoint data, bounded publication metadata"). Locating a role descends one path from the root, so its cost is depth x fan-out, not the participant count. These are logical roles. Which device holds a role, and whether a particular placement keeps parent and child in one failure domain, are separate decisions (Execution.ResourceGraph); this relation only fixes who exchanges with whom.
26family ParticipantTreeNode : Type 0
27constructor ParticipantTreeNodeOf
28-- the node's role: the first role of its subtree
29field unrestricted participantTreeRole : Nat
30-- roles in the subtree, the node included
31field unrestricted participantTreeSize : Nat
32-- the parent's role; the root names itself
33field unrestricted participantTreeParent : Nat
34-- edges from the root to this node
35field unrestricted participantTreeDepth : Nat

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.