Skip to content

Commit

Permalink
fix no quant
Browse files Browse the repository at this point in the history
  • Loading branch information
baishihao committed Jan 13, 2025
1 parent 4a20aeb commit 56f0aff
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions lightllm/common/fused_moe/grouped_fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,15 @@ def grouped_matmul(
topk_num,
token_input_scale,
expert_to_weights_scale,
expert_to_weights_scale.stride(0),
expert_to_weights_scale.stride(1),
expert_to_weights_scale.stride(2),
expert_to_weights_scale.stride(0)
if expert_to_weights_scale is not None and expert_to_weights_scale.ndim == 2
else 0,
expert_to_weights_scale.stride(1)
if expert_to_weights_scale is not None and expert_to_weights_scale.ndim == 2
else 0,
expert_to_weights_scale.stride(2)
if expert_to_weights_scale is not None and expert_to_weights_scale.ndim == 3
else 0,
token_inputs,
token_inputs.stride(0),
token_inputs.stride(1),
Expand Down Expand Up @@ -496,9 +502,15 @@ def grouped_matmul(
topk_num,
token_input_scale,
expert_to_weights_scale,
expert_to_weights_scale.stride(0),
expert_to_weights_scale.stride(1),
expert_to_weights_scale.stride(2),
expert_to_weights_scale.stride(0)
if expert_to_weights_scale is not None and expert_to_weights_scale.ndim == 2
else 0,
expert_to_weights_scale.stride(1)
if expert_to_weights_scale is not None and expert_to_weights_scale.ndim == 2
else 0,
expert_to_weights_scale.stride(2)
if expert_to_weights_scale is not None and expert_to_weights_scale.ndim == 3
else 0,
token_inputs,
token_inputs.stride(0),
token_inputs.stride(1),
Expand Down

0 comments on commit 56f0aff

Please sign in to comment.