From a0c70816956298f7dd1d0cf47cfa1a169a413692 Mon Sep 17 00:00:00 2001 From: danisereb Date: Tue, 24 Feb 2026 17:25:44 +0200 Subject: [PATCH] Fix fallback to default tactic (flashinfer autotuner) with trtllm_fp4_block_scale_moe (#35088) Signed-off-by: Daniel Serebrenik --- .../layers/quantization/utils/flashinfer_fp4_moe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py b/vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py index 840663703c..fadf56be1d 100644 --- a/vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py +++ b/vllm/model_executor/layers/quantization/utils/flashinfer_fp4_moe.py @@ -348,7 +348,7 @@ def flashinfer_trtllm_fp4_moe( hidden_states=hidden_states_fp4, hidden_states_scale=hidden_states_scale_linear_fp4.view( torch.float8_e4m3fn - ).flatten(), + ).reshape(*hidden_states_fp4.shape[:-1], -1), gemm1_weights=layer.w13_weight.data, gemm1_weights_scale=layer.w13_weight_scale.data.view(torch.float8_e4m3fn), gemm1_bias=None, @@ -432,7 +432,7 @@ def flashinfer_trtllm_fp4_routed_moe( hidden_states=hidden_states_fp4, hidden_states_scale=hidden_states_scale_linear_fp4.view( torch.float8_e4m3fn - ).flatten(), + ).reshape(*hidden_states_fp4.shape[:-1], -1), gemm1_weights=layer.w13_weight.data, gemm1_weights_scale=layer.w13_weight_scale.data.view(torch.float8_e4m3fn), gemm1_bias=None,