diff --git a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc index fd5f4cfcf88b5428a65cbdd41796392d4b47fa19..b93ef729079dc9dc914153306c1645e04ca06320 100644 --- a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc +++ b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc @@ -89,13 +89,11 @@ static std::set OpsNeedSetOutputDtypeWhenRegisterPhiKernel = { "multiclass_nms3", "multinomial", "nanmedian", - "numl", "rnn", "search_sort", "select", "send_recv", "send_ue_recv", - "svd", "sync_batch_norm_grad", "unique", "unique_consecutive_flattened_tensor", diff --git a/paddle/phi/kernels/cpu/numel_kernel.cc b/paddle/phi/kernels/cpu/numel_kernel.cc index 7050adb1c9c05b0c7206afbc2a7a4a8adc916e7a..047bf99d2cc8823616bb2244bdae3e6d2df30120 100644 --- a/paddle/phi/kernels/cpu/numel_kernel.cc +++ b/paddle/phi/kernels/cpu/numel_kernel.cc @@ -30,4 +30,6 @@ PD_REGISTER_KERNEL(numel, phi::dtype::bfloat16, float, double, - bool) {} + bool) { + kernel->OutputAt(0).SetDataType(phi::DataType::INT64); +} diff --git a/paddle/phi/kernels/gpu/numel_kernel.cu b/paddle/phi/kernels/gpu/numel_kernel.cu index 2c44f4db08ec441f2d9552d80833ed5082d74b21..0dc205041340f438759cb0900a9b064768a2522d 100644 --- a/paddle/phi/kernels/gpu/numel_kernel.cu +++ b/paddle/phi/kernels/gpu/numel_kernel.cu @@ -29,4 +29,6 @@ PD_REGISTER_KERNEL(numel, phi::dtype::bfloat16, float, double, - bool) {} + bool) { + kernel->OutputAt(0).SetDataType(phi::DataType::INT64); +}