diff --git a/lite/kernels/mlu/bridges/argmax_op.cc b/lite/kernels/mlu/bridges/argmax_op.cc index a85935e528119d65feeae2edd295c1aa51b8b039..b004639f07c79e5cc414e2d60bc1f32ec522f0f5 100644 --- a/lite/kernels/mlu/bridges/argmax_op.cc +++ b/lite/kernels/mlu/bridges/argmax_op.cc @@ -91,6 +91,9 @@ int ArgmaxConverter(void* ctx, OpLite* op, KernelBase* kernel) { } graph->FuseOp(argmax_op); CNML_CALL(cnmlDestroyBaseOp(&argmax_op)); + if (cast_op) { + CNML_CALL(cnmlDestroyBaseOp(&cast_op)); + } return SUCCESS; }