Skip to content

Conversation

@Echo-Nie
Copy link
Contributor

@Echo-Nie Echo-Nie commented Sep 3, 2025

add test_pre_cache_len_concat

@paddle-bot
Copy link

paddle-bot bot commented Sep 3, 2025

Thanks for your contribution!

seq_lens_this_time = paddle.to_tensor(seq_lens_this_time_np, dtype="int32")

outputs = pre_cache_len_concat(seq_lens_decoder, seq_lens_this_time, max_dec_len, block_size)
cu_seqlens_k, batch_ids, tile_ids, num_blocks, kv_token_num = [out.numpy() for out in outputs]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里建议补充一下ref实现,对outputs中数值是否符合预期做一个check,比如cu_seqlens_k应该是seq_lens_decoder+seq_lens_this_time的cumsum

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thx!

@luotao1 luotao1 merged commit 4408dc7 into PaddlePaddle:develop Sep 15, 2025
25 of 28 checks passed
@Echo-Nie Echo-Nie deleted the 49hac branch October 17, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants