You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latch AFDEP_* protocol controls at construction and check them across ranks #7
The native code reads about twenty AFDEP_* measurement controls through deep_ep::get_env at every launch. Only count-first is latched in the ElasticBuffer constructor and compared across ranks (afdep/deepep.py). Several of the others change the wire protocol or the registered window, for example:
AFDEP_KEEP_ENTRY_BARRIERS and AFDEP_ALL_RANK_EXIT change which ranks enter which barriers;
AFDEP_UNION_NOTIFY and AFDEP_UNION_HYBRID change the count exchange and the hybrid protocol;
AFDEP_UNION_BUFFERS changes the registered layout;
If ranks disagree, or a control changes after construction, the exchange can hang or corrupt data instead of failing. #3 adds an agreement check for its own switches, but checks them only at construction while still reading them at every launch.
Tasks
Classify every AFDEP_* control as wire-visible or rank-local (launch shape only).
Latch the wire-visible ones in the constructor, as count-first does, and launch only from the latched values.
Gather them at construction and reject a mismatch on every rank, with a unit test and a GPU negative control: one rank differs, so a ValueError is raised with no hang.
Document in docs/api.md that the controls are measurement switches, read once at construction.
I resolved this in PR #21 (merge PR #20 first). Each Buffer now reads the AFDEP_* controls once when it's opened, and every rank raises ValueError if the protocol-changing ones differ across ranks instead of hanging. I tested it on 4x H200 by setting each one on a single rank.
Activity
almogtavor commentedon Oct 26, 2026
I resolved this in PR #21 (merge PR #20 first). Each Buffer now reads the
AFDEP_*controls once when it's opened, and every rank raisesValueErrorif the protocol-changing ones differ across ranks instead of hanging. I tested it on 4x H200 by setting each one on a single rank.