[SDPA] relax restriction on L from query and attention_mask being equal (#24745)
### Details: - *relax restriction on L from query and attention_mask being equal* ### Tickets: - *CVS-129000*
This commit is contained in:
parent
5a8d75d076
commit
fc0b82c1be
|
|
@ -73,9 +73,9 @@ std::vector<TRShape> shape_infer(const ScaledDotProductAttention* op,
|
|||
const auto& attention_mask_rank = attention_mask.rank();
|
||||
if (attention_mask_rank.is_static() && attention_mask_rank != 0) {
|
||||
const auto& attention_mask_rank_len = attention_mask_rank.get_length();
|
||||
bool attention_mask_input_correctness = attention_mask_rank_len >= 2 &&
|
||||
DimType::merge(l_dim, l_dim, *(attention_mask.end() - 2)) &&
|
||||
DimType::merge(s_dim, s_dim, *(attention_mask.end() - 1));
|
||||
bool attention_mask_input_correctness =
|
||||
attention_mask_rank_len >= 2 && DimType::broadcast_merge(l_dim, l_dim, *(attention_mask.end() - 2)) &&
|
||||
DimType::broadcast_merge(s_dim, s_dim, *(attention_mask.end() - 1));
|
||||
if (attention_mask_rank_len >= 3) {
|
||||
attention_mask_input_correctness =
|
||||
attention_mask_input_correctness &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue