diff --git a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc index 413e0b74c09f7d0c322b6550c5c466f60adcd900..91802f04207bcf53d2bc6d3d7df23ddf65dff56e 100644 --- a/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc +++ b/paddle/fluid/framework/new_executor/interpreter/interpreter_util.cc @@ -65,7 +65,6 @@ static std::set OpsNeedSetOutputDtypeWhenRegisterPhiKernel = { "complex", "conv3d_coo", "distribute_fpn_proposals", - "edit_distance", "eig", "eig_grad", "eigh", diff --git a/paddle/phi/kernels/cpu/edit_distance_kernel.cc b/paddle/phi/kernels/cpu/edit_distance_kernel.cc index 190bc3fa55266a739c0c019bf9cd5eca07df0c3d..7e77cc719b851aadb4a6718980d5a40931ea46f8 100644 --- a/paddle/phi/kernels/cpu/edit_distance_kernel.cc +++ b/paddle/phi/kernels/cpu/edit_distance_kernel.cc @@ -121,4 +121,6 @@ void EditDistanceKernel(const Context& ctx, } // namespace phi PD_REGISTER_KERNEL( - edit_distance, CPU, ALL_LAYOUT, phi::EditDistanceKernel, float) {} + edit_distance, CPU, ALL_LAYOUT, phi::EditDistanceKernel, float) { + kernel->OutputAt(0).SetDataType(phi::DataType::INT64); +} diff --git a/paddle/phi/kernels/gpu/edit_distance_kernel.cu b/paddle/phi/kernels/gpu/edit_distance_kernel.cu index cb5b096ba3f78d341b9e66125e5689bbc697552a..6ff1706f7a907909561a375e3e89a1bf93122936 100644 --- a/paddle/phi/kernels/gpu/edit_distance_kernel.cu +++ b/paddle/phi/kernels/gpu/edit_distance_kernel.cu @@ -184,4 +184,6 @@ void EditDistanceKernel(const Context& ctx, } // namespace phi PD_REGISTER_KERNEL( - edit_distance, GPU, ALL_LAYOUT, phi::EditDistanceKernel, float) {} + edit_distance, GPU, ALL_LAYOUT, phi::EditDistanceKernel, float) { + kernel->OutputAt(0).SetDataType(phi::DataType::INT64); +}