diff --git a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc index 62aab7383a2488b93f40dedbcfc566b8f790cc31..b4e6d8a7d12bc1384932f1c27590c869f10a887e 100644 --- a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc +++ b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc @@ -53,8 +53,6 @@ static std::set OpsNeedSetOutputDtypeWhenRegisterPhiKernel = { "abs", "adam", "adamw", - "all_close", - "all_raw", "any_raw", "arg_sort", "atan2", diff --git a/paddle/phi/kernels/cpu/reduce_all_kernel.cc b/paddle/phi/kernels/cpu/reduce_all_kernel.cc index 60094d1345a77a9cd39833a50305b7b52292540e..1dea17d4b7af3066c74bd301944c7265fd977503 100644 --- a/paddle/phi/kernels/cpu/reduce_all_kernel.cc +++ b/paddle/phi/kernels/cpu/reduce_all_kernel.cc @@ -35,4 +35,6 @@ void AllRawKernel(const Context& dev_ctx, } // namespace phi -PD_REGISTER_KERNEL(all_raw, CPU, ALL_LAYOUT, phi::AllRawKernel, bool) {} +PD_REGISTER_KERNEL(all_raw, CPU, ALL_LAYOUT, phi::AllRawKernel, bool) { + kernel->OutputAt(0).SetDataType(phi::DataType::BOOL); +} diff --git a/paddle/phi/kernels/kps/reduce_all_kernel.cu b/paddle/phi/kernels/kps/reduce_all_kernel.cu index d4d4596917bf8563d76a8d6195bce0ed18ed1735..c0c338bb4f249726c9a14ffd45f6f1f28ac7b4b3 100644 --- a/paddle/phi/kernels/kps/reduce_all_kernel.cu +++ b/paddle/phi/kernels/kps/reduce_all_kernel.cu @@ -34,7 +34,11 @@ void AllRawKernel(const Context& dev_ctx, } // namespace phi #ifdef PADDLE_WITH_XPU_KP -PD_REGISTER_KERNEL(all_raw, KPS, ALL_LAYOUT, phi::AllRawKernel, bool) {} +PD_REGISTER_KERNEL(all_raw, KPS, ALL_LAYOUT, phi::AllRawKernel, bool) { + kernel->OutputAt(0).SetDataType(phi::DataType::BOOL); +} #else -PD_REGISTER_KERNEL(all_raw, KPS, ALL_LAYOUT, phi::AllRawKernel, bool) {} +PD_REGISTER_KERNEL(all_raw, KPS, ALL_LAYOUT, phi::AllRawKernel, bool) { + kernel->OutputAt(0).SetDataType(phi::DataType::BOOL); +} #endif