Skip to content

Commit 6131bd3

Browse files
committed
fix autotuning
1 parent d26c745 commit 6131bd3

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

flashinfer/fused_moe/core.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,9 +2129,17 @@ def trtllm_mxint4_block_scale_moe_op(
21292129
use_shuffled_weight=True,
21302130
)
21312131
tunning_config = MoERunner.tuning_config_no_hidden_states_scales
2132+
# Create placeholder for tuning when routing_logits is None (routed mode)
2133+
routing_logits_for_tuning = (
2134+
routing_logits
2135+
if routing_logits is not None
2136+
else torch.empty(
2137+
num_tokens, num_experts, dtype=routing_dtype, device="meta"
2138+
)
2139+
)
21322140
inputs = [
21332141
output,
2134-
routing_logits,
2142+
routing_logits_for_tuning,
21352143
topk_ids,
21362144
expert_weights,
21372145
hidden_states,

0 commit comments

Comments
 (0)