未验证 提交 1a7d907d 编写于 作者: L limingshu 提交者: GitHub

Addition of bf16 type support for Compare OP (#46413)

* first commit

* clarify the quotes

* change code style format

* support bfloat16
上级 62c05369
...@@ -114,7 +114,8 @@ PD_REGISTER_KERNEL(less_than, ...@@ -114,7 +114,8 @@ PD_REGISTER_KERNEL(less_than,
int64_t, int64_t,
float, float,
double, double,
phi::dtype::float16) {} phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(less_equal, PD_REGISTER_KERNEL(less_equal,
KPS, KPS,
ALL_LAYOUT, ALL_LAYOUT,
...@@ -125,7 +126,8 @@ PD_REGISTER_KERNEL(less_equal, ...@@ -125,7 +126,8 @@ PD_REGISTER_KERNEL(less_equal,
int64_t, int64_t,
float, float,
double, double,
phi::dtype::float16) {} phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(greater_than, PD_REGISTER_KERNEL(greater_than,
KPS, KPS,
ALL_LAYOUT, ALL_LAYOUT,
...@@ -136,7 +138,8 @@ PD_REGISTER_KERNEL(greater_than, ...@@ -136,7 +138,8 @@ PD_REGISTER_KERNEL(greater_than,
int64_t, int64_t,
float, float,
double, double,
phi::dtype::float16) {} phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(greater_equal, PD_REGISTER_KERNEL(greater_equal,
KPS, KPS,
ALL_LAYOUT, ALL_LAYOUT,
...@@ -147,7 +150,8 @@ PD_REGISTER_KERNEL(greater_equal, ...@@ -147,7 +150,8 @@ PD_REGISTER_KERNEL(greater_equal,
int64_t, int64_t,
float, float,
double, double,
phi::dtype::float16) {} phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(equal, PD_REGISTER_KERNEL(equal,
KPS, KPS,
ALL_LAYOUT, ALL_LAYOUT,
...@@ -158,7 +162,8 @@ PD_REGISTER_KERNEL(equal, ...@@ -158,7 +162,8 @@ PD_REGISTER_KERNEL(equal,
int64_t, int64_t,
float, float,
double, double,
phi::dtype::float16) {} phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(not_equal, PD_REGISTER_KERNEL(not_equal,
KPS, KPS,
ALL_LAYOUT, ALL_LAYOUT,
...@@ -169,7 +174,8 @@ PD_REGISTER_KERNEL(not_equal, ...@@ -169,7 +174,8 @@ PD_REGISTER_KERNEL(not_equal,
int64_t, int64_t,
float, float,
double, double,
phi::dtype::float16) {} phi::dtype::float16,
phi::dtype::bfloat16) {}
PD_REGISTER_KERNEL(equal_all, PD_REGISTER_KERNEL(equal_all,
KPS, KPS,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册