Skip to content

Commit 192e7cc

Browse files
JiabinYangchenwhql
andauthored
[Eager Bug fix]Fix Detection (#46147)
* fix linspace error in amp * fix log * fix amp error * Revert "Simplify size op impl (#45808)" This reverts commit c252b1d. * fix_seg * fix detection Co-authored-by: Chen Weihang <sunny_cwh@163.com>
1 parent f9b90dd commit 192e7cc

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

paddle/phi/kernels/cpu/scale_kernel.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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,

paddle/phi/kernels/funcs/eigen/scale.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations 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

1819
namespace phi {
@@ -41,6 +42,7 @@ struct EigenScale<Eigen::DefaultDevice, T> {
4142
template struct EigenScale<Eigen::DefaultDevice, float>;
4243
template struct EigenScale<Eigen::DefaultDevice, double>;
4344
template struct EigenScale<Eigen::DefaultDevice, dtype::bfloat16>;
45+
template struct EigenScale<Eigen::DefaultDevice, dtype::float16>;
4446
template struct EigenScale<Eigen::DefaultDevice, uint8_t>;
4547
template struct EigenScale<Eigen::DefaultDevice, int8_t>;
4648
template struct EigenScale<Eigen::DefaultDevice, int16_t>;

0 commit comments

Comments
 (0)