File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ PD_REGISTER_KERNEL(scale,
5858 float ,
5959 double ,
6060 phi::dtype::bfloat16,
61+ phi::dtype::float16,
6162 uint8_t ,
6263 int8_t ,
6364 int16_t ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
1313limitations under the License. */
1414#include " paddle/phi/common/bfloat16.h"
1515#include " paddle/phi/common/complex.h"
16+ #include " paddle/phi/common/float16.h"
1617#include " paddle/phi/kernels/funcs/eigen/eigen_function.h"
1718
1819namespace phi {
@@ -41,6 +42,7 @@ struct EigenScale<Eigen::DefaultDevice, T> {
4142template struct EigenScale <Eigen::DefaultDevice, float >;
4243template struct EigenScale <Eigen::DefaultDevice, double >;
4344template struct EigenScale <Eigen::DefaultDevice, dtype::bfloat16>;
45+ template struct EigenScale <Eigen::DefaultDevice, dtype::float16>;
4446template struct EigenScale <Eigen::DefaultDevice, uint8_t >;
4547template struct EigenScale <Eigen::DefaultDevice, int8_t >;
4648template struct EigenScale <Eigen::DefaultDevice, int16_t >;
You can’t perform that action at this time.
0 commit comments