mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-24 01:29:57 +08:00
[Cherry-Pick 2.4][BugFix] Fix get_padding_offset in empty run (#6461)
* fix empty get_padding_offset * fix mtp padding
This commit is contained in:
@@ -88,6 +88,9 @@ std::vector<paddle::Tensor> GetPaddingOffset(const paddle::Tensor &input_ids,
|
||||
paddle::empty({bsz + 1}, paddle::DataType::INT32, input_ids.place());
|
||||
auto cu_seqlens_k =
|
||||
paddle::empty({bsz + 1}, paddle::DataType::INT32, input_ids.place());
|
||||
if (token_num_data == 0) {
|
||||
return {x_remove_padding, batch_id_per_token, cu_seqlens_q, cu_seqlens_k};
|
||||
}
|
||||
#ifdef PADDLE_WITH_COREX
|
||||
int blockSize =
|
||||
std::min((token_num_data + WARP_SIZE - 1) / WARP_SIZE * WARP_SIZE, 128);
|
||||
|
||||
Reference in New Issue
Block a user