未验证 提交 5afab2cd 编写于 作者: H hellolllw 提交者: GitHub

add register of is_empty (#51484)

* Update interpreter_util.cc

* Update is_empty_kernel.cc

* Update is_empty_kernel.cc
上级 4a4fcc2d
...@@ -73,7 +73,6 @@ static std::set<std::string> OpsNeedSetOutputDtypeWhenRegisterPhiKernel = { ...@@ -73,7 +73,6 @@ static std::set<std::string> OpsNeedSetOutputDtypeWhenRegisterPhiKernel = {
"group_norm", "group_norm",
"histogram", "histogram",
"instance_norm", "instance_norm",
"is_empty",
"kthvalue", "kthvalue",
"lamb", "lamb",
"layer_norm", "layer_norm",
......
...@@ -39,7 +39,9 @@ PD_REGISTER_KERNEL(is_empty, ...@@ -39,7 +39,9 @@ PD_REGISTER_KERNEL(is_empty,
float, float,
double, double,
int, int,
int64_t) {} int64_t) {
kernel->OutputAt(0).SetDataType(phi::DataType::BOOL);
}
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
PD_REGISTER_KERNEL(is_empty, PD_REGISTER_KERNEL(is_empty,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册