[WideEP] Integrate DeepEP v2 (#41183)
Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
05cb606cad
commit
e2f993dc41
@@ -168,6 +168,14 @@ def fused_topk_bias(
|
||||
hash_indices_table: torch.Tensor | None = None,
|
||||
routed_scaling_factor: float = 1.0,
|
||||
):
|
||||
# The topk kernel dispatches dtype based on topk_ids (set by
|
||||
# indices_type) and assumes input_tokens/hash_indices_table match.
|
||||
if indices_type is not None:
|
||||
if input_tokens is not None and input_tokens.dtype != indices_type:
|
||||
input_tokens = input_tokens.to(dtype=indices_type)
|
||||
if hash_indices_table is not None and hash_indices_table.dtype != indices_type:
|
||||
hash_indices_table = hash_indices_table.to(dtype=indices_type)
|
||||
|
||||
if not rocm_aiter_ops.is_fused_moe_enabled():
|
||||
assert hidden_states.size(0) == gating_output.size(0), (
|
||||
"Number of tokens mismatch"
|
||||
|
||||
Reference in New Issue
Block a user