Skip to content

Commit

Permalink
fix speculate_save_output
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanglongzhi2001 committed Dec 9, 2024
1 parent 8bf745d commit 5a2cbb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions csrc/gpu/speculate_decoding_kernels/speculate_save_output.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ void SpeculateSaveWithOutputMsg(const paddle::Tensor& accept_tokens,

int max_draft_tokens = accept_tokens.shape()[1];

auto accept_tokens_cpu = accept_tokens.copy_to(paddle::CPUPlace(), true);
auto accept_num_cpu = accept_num.copy_to(paddle::CPUPlace(), true);
auto not_need_stop_cpu = not_need_stop.copy_to(paddle::CPUPlace(), true);
auto accept_tokens_cpu = accept_tokens.copy_to(paddle::CPUPlace(), false);
auto accept_num_cpu = accept_num.copy_to(paddle::CPUPlace(), false);
auto not_need_stop_cpu = not_need_stop.copy_to(paddle::CPUPlace(), false);

int64_t *accept_tokens_data = accept_tokens_cpu.data<int64_t>();
int *accept_num_data = accept_num_cpu.data<int>();
Expand Down

0 comments on commit 5a2cbb6

Please sign in to comment.