diff --git a/Paddle b/Paddle index 2b9ba85d9c..f6f5552ceb 160000 --- a/Paddle +++ b/Paddle @@ -1 +1 @@ -Subproject commit 2b9ba85d9c512c05e20b38ea822dc808e410609f +Subproject commit f6f5552cebeb1e2521a8a5f35629d0744d835837 diff --git a/backends/intel_hpu/custom_ops/llama_infer/prepare_block_metadata.cc b/backends/intel_hpu/custom_ops/llama_infer/prepare_block_metadata.cc index 1bb4d5abe5..95cc95e353 100644 --- a/backends/intel_hpu/custom_ops/llama_infer/prepare_block_metadata.cc +++ b/backends/intel_hpu/custom_ops/llama_infer/prepare_block_metadata.cc @@ -24,7 +24,6 @@ std::tuple> get_max_and_where_nonzero( int* seq_lens_encoder, int* seq_lens_decoder, const int elem_cnt) { int max_seq_len_without_context = 0; - int max_seq_len_with_context = 0; int max_context_len = 0; std::vector valid_batch; for (int i = 0; i < elem_cnt; ++i) { @@ -32,17 +31,13 @@ std::tuple> get_max_and_where_nonzero( valid_batch.push_back(i); if (seq_lens_encoder[i] > max_seq_len_without_context) { max_seq_len_without_context = seq_lens_encoder[i]; - max_seq_len_with_context = seq_lens_encoder[i]; } if (seq_lens_decoder[i] > max_context_len) { max_context_len = seq_lens_decoder[i]; } - if (seq_lens_decoder[i] > 0 && seq_lens_encoder[i] + seq_lens_decoder[i] > - max_seq_len_with_context) { - max_seq_len_with_context = seq_lens_encoder[i] + seq_lens_decoder[i]; - } } } + int max_seq_len_with_context = max_seq_len_without_context + max_context_len; return {max_seq_len_without_context, max_seq_len_with_context, max_context_len,