Skip to content

Commit c8fccdc

Browse files
committed
delete context
1 parent d5d8c7c commit c8fccdc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

custom_ops/xpu_ops/src/ops/mtp/speculate_get_logits.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ void SpeculateGetLogits(const paddle::Tensor& draft_logits,
5656
seq_lens_encoder.data<int>(),
5757
real_bsz,
5858
vocab_size);
59+
if (draft_logits.is_cpu()) {
60+
delete ctx;
61+
}
5962
}
6063

6164
PD_BUILD_STATIC_OP(speculate_get_logits)

0 commit comments

Comments
 (0)