8000 Latch AFDEP_* protocol controls at construction and check them across ranks · Issue #7 · afdEP/afdEP-comm · GitHub
[go: up one dir, main page]

Skip to content

Latch AFDEP_* protocol controls at construction and check them across ranks #7

Open

Description

@Etelis

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;
  • AFDEP_SHARED_HYBRID_FORWARD and the other AFDEP_SHARED_HYBRID_* controls change the directional hybrid's launch shapes. Set on the FFN ranks only, FORWARD hangs the exchange (docs/v1.md §17 in Cross-node AFD: sparse and mixed-role directional hybrids (opt-in) #3).

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.
  • Apply the same latch to Cross-node AFD: sparse and mixed-role directional hybrids (opt-in) #3's switches.

Activity

  1. added
    bug
    on Oct 23, 2026
  2. almogtavor commented on Oct 26, 2026

    @almogtavor
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0