未验证 提交 da551b2e 编写于 作者: S Sanbu 提交者: GitHub

Add output defs for all_close all_raw kernel (#51410)

* Add output defs for all_close all_raw  kernel

* Update interpreter_util.cc
上级 fc3e51e9
...@@ -53,8 +53,6 @@ static std::set<std::string> OpsNeedSetOutputDtypeWhenRegisterPhiKernel = { ...@@ -53,8 +53,6 @@ static std::set<std::string> OpsNeedSetOutputDtypeWhenRegisterPhiKernel = {
"abs", "abs",
"adam", "adam",
"adamw", "adamw",
"all_close",
"all_raw",
"any_raw", "any_raw",
"arg_sort", "arg_sort",
"atan2", "atan2",
......
...@@ -35,4 +35,6 @@ void AllRawKernel(const Context& dev_ctx, ...@@ -35,4 +35,6 @@ void AllRawKernel(const Context& dev_ctx,
} // namespace phi } // 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);
}
...@@ -34,7 +34,11 @@ void AllRawKernel(const Context& dev_ctx, ...@@ -34,7 +34,11 @@ void AllRawKernel(const Context& dev_ctx,
} // namespace phi } // namespace phi
#ifdef PADDLE_WITH_XPU_KP #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 #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 #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册