Skip to content

Commit

Permalink
[GPU] Allow micro_sdpa when inputs have different transpose order (#2…
Browse files Browse the repository at this point in the history
…7726)

### Details:
 - Perf improvement for flux.1

Signed-off-by: Vladimir Paramuzov <[email protected]>
  • Loading branch information
vladimir-paramuzov authored Nov 26, 2024
1 parent 149edd3 commit a4475b5
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4475b5

Please sign in to comment.