diff --git a/paddle/phi/kernels/cpu/scale_kernel.cc b/paddle/phi/kernels/cpu/scale_kernel.cc index 421aae270ee591c13dd205dd6909a8eb7bc3cef5..358d89197edb2ee0e096ec5b270f9fe33e73502e 100644 --- a/paddle/phi/kernels/cpu/scale_kernel.cc +++ b/paddle/phi/kernels/cpu/scale_kernel.cc @@ -58,6 +58,7 @@ PD_REGISTER_KERNEL(scale, float, double, phi::dtype::bfloat16, + phi::dtype::float16, uint8_t, int8_t, int16_t, diff --git a/paddle/phi/kernels/funcs/eigen/scale.cc b/paddle/phi/kernels/funcs/eigen/scale.cc index 341bf52f547fedfd957aba2a95643a8037b32830..7e2d463a9fab13ed3551cce89c67e5ca69d5ff5e 100644 --- a/paddle/phi/kernels/funcs/eigen/scale.cc +++ b/paddle/phi/kernels/funcs/eigen/scale.cc @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/phi/common/bfloat16.h" #include "paddle/phi/common/complex.h" +#include "paddle/phi/common/float16.h" #include "paddle/phi/kernels/funcs/eigen/eigen_function.h" namespace phi { @@ -41,6 +42,7 @@ struct EigenScale { template struct EigenScale; template struct EigenScale; template struct EigenScale; +template struct EigenScale; template struct EigenScale; template struct EigenScale; template struct EigenScale;