Skip to content

Commit

Permalink
fix fused moe
Browse files Browse the repository at this point in the history
  • Loading branch information
grimoire committed Sep 18, 2024
1 parent e3cce5b commit f662332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/pytorch/kernels/cuda/fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def __get_sorted_idx(topk_ids: torch.Tensor):

# activate
if intermediate_cache1.size(-1) % 2048 == 0:
unflat_size = intermediate_cache1.shape[:-2]
unflat_size = intermediate_cache1.shape[:-1]
intermediate_cache1 = intermediate_cache1.flatten(0, -2)
gate_cache = silu_and_mul(intermediate_cache1)
gate_cache = gate_cache.unflatten(0, unflat_size)
Expand Down

0 comments on commit f662332

Please sign in to comment.