Expand description
2026-09-25: Partition of top-k (token, expert) assignments into this rank’s experts and the other ranks’ experts, for EP token dispatch.
Its callers are MoeLayer::forward_ep_dispatch (moe/forward_ep.rs),
which has no caller and serves through forward, and the
glm53_ep_semantics test. The served EP MoE is masked-local plus
all-reduce (moe/forward.rs).
Owner: model-layers (MoE). Invariants: none beyond the types.
Structs§
- EpRouting
Table - 2026-09-25: Top-k assignments split into a local bucket (expert in this
rank’s range) and a remote bucket (any other expert). Entry
iof a bucket is the triple (*_token_indices[i],*_expert_ids[i],*_weights[i]), in the order the assignments were given.
Functions§
- build_
ep_ routing_ table - 2026-09-25: Build the table from row-major
[num_tokens, top_k]expert ids and weights. An expert is local when it lies inlocal_expert_start..local_expert_end.