未验证 提交 14393876 编写于 作者: J jakpiase 提交者: GitHub

added missing bf16 ops (#36291)

上级 a679fcbb
......@@ -2263,15 +2263,34 @@ PDNode *patterns::QuantizePlacement::operator()(
PDNode *patterns::Bfloat16Placement::operator()(
const std::unordered_set<std::string> &bfloat16_enabled_op_types) {
std::unordered_set<std::string> supported_op_types =
std::unordered_set<std::string>(
{"concat", "conv2d", "conv2d_transpose",
"elementwise_add", "elementwise_mul", "fc",
"fusion_gru", "fusion_lstm", "gelu",
"layer_norm", "matmul", "matmul_v2",
"pool2d", "prelu", "relu",
"reshape2", "softmax", "split",
"squeeze", "squeeze2", "sum",
"transpose2"});
std::unordered_set<std::string>({"cast",
"clip",
"concat",
"conv2d",
"conv2d_transpose",
"elementwise_add",
"elementwise_mul",
"expand_v2",
"fc",
"fusion_gru",
"fusion_lstm",
"gelu",
"layer_norm",
"matmul",
"matmul_v2",
"pool2d",
"prelu",
"relu",
"reshape2",
"scale",
"sigmoid",
"slice",
"softmax",
"split",
"squeeze",
"squeeze2",
"sum",
"transpose2"});
if (!bfloat16_enabled_op_types.empty()) {
supported_op_types = bfloat16_enabled_op_types;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册