未验证 提交 8a9d4003 编写于 作者: W Wangzheee 提交者: GitHub

[Paddle Inference]add_lookup_table_v2 (#46893)

* add_lookup_table_v2
上级 21668cb2
......@@ -151,6 +151,13 @@ class OpConverter {
platform::errors::Unimplemented("no OpConverter for optype [%s]",
op_desc.Type()));
}
if (op_desc.Type() == "lookup_table_v2") {
it = Registry<OpConverter>::Global().Lookup("lookup_table");
PADDLE_ENFORCE_NOT_NULL(
it,
platform::errors::Unimplemented("no OpConverter for optype [%s]",
op_desc.Type()));
}
if (!it) {
it = Registry<OpConverter>::Global().Lookup(op_desc.Type());
}
......
......@@ -2221,7 +2221,8 @@ struct SimpleOpTypeSetTeller : public Teller {
"squeeze2",
"unsqueeze2",
"layernorm_shift_partition",
"lookup_table"};
"lookup_table",
"lookup_table_v2"};
std::unordered_set<std::string> teller_set{
"mul",
"matmul",
......@@ -2333,7 +2334,8 @@ struct SimpleOpTypeSetTeller : public Teller {
"unsqueeze2",
"fused_token_prune",
"layernorm_shift_partition",
"lookup_table"};
"lookup_table",
"lookup_table_v2"};
};
struct GenericPluginTeller : public Teller {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册