diff --git a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc index b93ef729079dc9dc914153306c1645e04ca06320..af08155a315b6d5e5f21a48163cec2ec55367beb 100644 --- a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc +++ b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc @@ -55,7 +55,6 @@ static std::set OpsNeedSetOutputDtypeWhenRegisterPhiKernel = { "adamw", "all_close", "all_raw", - "angle", "any_raw", "arg_sort", "atan2", diff --git a/paddle/phi/kernels/cpu/angle_kernel.cc b/paddle/phi/kernels/cpu/angle_kernel.cc index dc994f763cbad27ec5545bb00399a46d3e197bf6..bcca37334cf1c6c6109f998f6700895e840f76f7 100644 --- a/paddle/phi/kernels/cpu/angle_kernel.cc +++ b/paddle/phi/kernels/cpu/angle_kernel.cc @@ -26,4 +26,6 @@ PD_REGISTER_KERNEL(angle, float, double, phi::dtype::complex, - phi::dtype::complex) {} + phi::dtype::complex) { + kernel->OutputAt(0).SetDataType(phi::DataType::UNDEFINED); +} diff --git a/paddle/phi/kernels/gpu/angle_kernel.cu b/paddle/phi/kernels/gpu/angle_kernel.cu index 237d97de21997dd3659de546bcde4bfda22dce2a..7c64e784e275e8613cca15cd5d5c76ec61606240 100644 --- a/paddle/phi/kernels/gpu/angle_kernel.cu +++ b/paddle/phi/kernels/gpu/angle_kernel.cu @@ -26,4 +26,6 @@ PD_REGISTER_KERNEL(angle, float, double, phi::dtype::complex, - phi::dtype::complex) {} + phi::dtype::complex) { + kernel->OutputAt(0).SetDataType(phi::DataType::UNDEFINED); +}