From 581d9b1b6230d08e2fecb62295b3c012924b57c3 Mon Sep 17 00:00:00 2001 From: zhangjun Date: Sat, 25 Mar 2023 05:07:49 +0000 Subject: [PATCH] fix operator need_prepare_phi_data_ --- paddle/fluid/framework/operator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 71da871cc00..4d9aeecac30 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -1588,8 +1588,8 @@ void OperatorWithKernel::CheckWhetherPreparePhiData( // different type with variable. The PhiKernelContext need be reconstructed. // We use kernel_signature_'s output to retrieve tensor. Because the tensor // in phi_kernel_context stored in the order of kernel_signature_'s output. - if (phi_kernel_context->OutputsSize() >= phi_tensor_index || - kernel_signature_ == nullptr) { + // if (phi_kernel_context->OutputsSize() >= phi_tensor_index || + if (kernel_signature_ == nullptr) { need_prepare_phi_data_ = true; return; } -- GitLab