Repository navigation
Add expert-parallel no-sync symmetric-memory buffer pool - #739
Merged
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The symmetric-memory buffer pool, leases, transient slots, stage state, and pending-context machinery shared by the no-sync expert-parallel forward paths (bf16 and rowwise-FP8): allocation/ caching of symm tensors, lease acquisition + prewarming, and the per-block shared pool. Co-authored-by: Tianhua Tao <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
- Add a module docstring describing the symmetric-memory buffer/lease machinery. - Remove the dead env-gated debug instrumentation (the module-level _tbo_buffer_debug_* and the unused _NoSyncSymmLeasePool._debug_* methods; every call site was commented out) and leave a single note on the OLMO_TBO_VERBOSE_DEBUG_PRINT trace switch at the allocation site. - Use lowercase tuple[...] type hints per the merged-leaf convention. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Cover the pure helpers: buffer-reuse coverage (_cached_symm_tensor_covers — a cached symm tensor serves a request only with a >= leading dim and matching trailing dims/dtype/device), prefix-view aliasing (_view_cached_symm_tensor), env parsing (_parse_bool_env incl. the error case), and the rank-capacity formula (compute_ep_no_sync_rank_capacity). Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
compute_ep_no_sync_rank_capacity is typed for MoEFusedV2TransformerBlock; annotate the duck-typed SimpleNamespace stand-ins as Any so mypy accepts them. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
AkshitaB
force-pushed
the
akshitab/moe-v2-ep-buffers
branch
from
June 30, 2026 05:00
10a5f55 to
7cbd4fb
Compare
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.
Adds the symmetric-memory buffer machinery shared by the no-sync expert-parallel forward paths.
What's added
nn/moe/v2/ep_no_sync_buffers.py:It operates on plain tensors / a passed-in block and depends only on
olmo_core.kernels.olmo_symm_mem(+ torch); the EP forward families that consume it land in follow-up changes.Notes
OLMO_TBO_VERBOSE_DEBUG_PRINTtrace switch remains at the allocation site.tuple[...]type hints per convention.Testing
src/test/nn/moe/v2/ep_no_sync_buffers_test.py(CPU): buffer-reuse coverage, prefix-view aliasing, env parsing (incl. error case), and the rank-capacity formula.make checksclean.🤖 Generated with Claude Code