From a4475b599a97a766e80b815849de4de9ba7dbba6 Mon Sep 17 00:00:00 2001 From: Vladimir Paramuzov Date: Tue, 26 Nov 2024 11:16:55 +0400 Subject: [PATCH] [GPU] Allow micro_sdpa when inputs have different transpose order (#27726) ### Details: - Perf improvement for flux.1 Signed-off-by: Vladimir Paramuzov --- .../src/kernel_selector/kernels/sdpa/sdpa_kernel_micro.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/intel_gpu/src/kernel_selector/kernels/sdpa/sdpa_kernel_micro.cpp b/src/plugins/intel_gpu/src/kernel_selector/kernels/sdpa/sdpa_kernel_micro.cpp index 8f0672da8875a1..838d34bbf85404 100644 --- a/src/plugins/intel_gpu/src/kernel_selector/kernels/sdpa/sdpa_kernel_micro.cpp +++ b/src/plugins/intel_gpu/src/kernel_selector/kernels/sdpa/sdpa_kernel_micro.cpp @@ -332,10 +332,7 @@ bool SDPAKernelMicro::Validate(const Params& p) const { auto K_num_heads_dim = get_num_heads(params.inputs[1], params.input1_order); auto V_num_heads_dim = get_num_heads(params.inputs[2], params.input2_order); - if (params.input0_order != params.input1_order || params.input0_order != params.input2_order) - return false; - - if (params.input0_order[3] != 3) + if (params.input0_order[3] != 3 || params.input1_order[3] != 3 || params.input2_order[3] != 3) return false; if (Q_num_heads_dim.is_dynamic || K_num_heads_dim.is_dynamic || V_num_heads_dim.is_dynamic || K_num_heads_dim.v != V_num_heads_dim.v)