Repository navigation
Reject ranks that latched different wire-visible AFDEP_* controls - #21
Open
almogtavor wants to merge 1 commit into
Open
almogtavor wants to merge 1 commit into
almogtavor wants to merge 1 commit into
Conversation
Seven AFDEP_* controls change barriers, the count exchange, the registered layout or the hybrid protocol: KEEP_ENTRY_BARRIERS, UNION_NOTIFY, ALL_RANK_EXIT, GRID_SYNC_EXIT, UNION_BUFFERS, UNION_HYBRID and MIXED_HYBRID. If ranks disagree the exchange hangs or corrupts data. The native buffer now reports them as latched (get_afd_protocol_config), and Buffer construction gathers them and raises ValueError naming the differing controls on every rank. Adds a unit test and tests/gpu/protocol_agreement.py, a negative control that sets each control on one rank only, and documents the controls in docs/api.md.
This was referenced Oct 26, 2026
This branch has not been deployed
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.
Resolves #7. Stacked on #20 (which latches every
AFDEP_*control per Buffer at construction); merge #20 first, then this retargets tomain.Classification
Wire-visible, must agree on every rank (gathered and checked here):
AFDEP_KEEP_ENTRY_BARRIERSAFDEP_UNION_NOTIFYAFDEP_ALL_RANK_EXITAFDEP_GRID_SYNC_EXITAFDEP_UNION_BUFFERSAFDEP_UNION_HYBRIDAFDEP_MIXED_HYBRIDAlready checked as resolved values (unchanged): count-first (
AFDEP_PAYLOAD_FIRST,AFDEP_COUNT_FIRST_MIN_BUCKET,AFDEP_COUNT_FIRST_ARM) and the sparse hybrid parts and FP8 combine replies (AFDEP_SHARED_*,AFDEP_HYBRID_FP8_COMBINE*), which #3's switches resolve into.Rank-local launch shapes or screen knobs, allowed to differ by role:
AFDEP_SHARED_ROLE_KERNELS,AFDEP_SHARED_FFN_RECEIVE,AFDEP_SHARED_HYBRID_SEND/FORWARD/COLLECT(their wire effects are covered by the resolved checks above),AFDEP_HYBRID_ROUTE_GUARD,AFDEP_ATTENTION_GRID_SYNC,AFDEP_UNION_REDUCE_PREFIX,AFDEP_COUNT_FIRST_UNGATE/UNGATED_TOKENS/WARP_COUNT/UNIT_MIN_ROWS/EPILOGUE_SMS.Change
buffer.hpp:get_afd_protocol_config()reports the seven controls from the Buffer's latched snapshot.afdep/deepep.py:PROTOCOL_CONTROLS; construction gathers the tuple and, on a mismatch, closes collectively and raisesValueErrornaming the differing controls on every rank.tests/unit/test_deepep.py: mismatch test.tests/gpu/protocol_agreement.py: GPU negative control; sets each control on rank 1 only, expectsValueErroron every rank, then runs a correct exchange.docs/api.md: the controls are measurement switches read once at construction.Validation (CoreWeave, 4x H200,
EP_DISABLE_GIN=1)tests.gpu.protocol_agreement: all 7 controls rejected on all 4 ranks, no hang; the following exchange verifies. Native digest80d292af....tests.gpu.deepepbf16 and fp8: pass.tests.gpu.two_buffers --env-b AFDEP_UNION_BUFFERS=1: pass.