未验证 提交 0371cf6f 编写于 作者: W Wilber 提交者: GitHub

fix compile for lite subgraph. test=develop (#25285)

上级 c505c4db
......@@ -25,7 +25,7 @@ if (NOT LITE_SOURCE_DIR OR NOT LITE_BINARY_DIR)
set(LITE_INSTALL_DIR ${THIRD_PARTY_PATH}/install/lite)
if(NOT LITE_GIT_TAG)
set(LITE_GIT_TAG 34c29406c27ee00cef033a98887403443eb2565f)
set(LITE_GIT_TAG ab8af5c4b4dc5b40217633e0aa436315912d7b53)
endif()
if(NOT CUDA_ARCH_NAME)
......
......@@ -26,15 +26,14 @@ namespace lite {
// Just tell by the op_types.
struct SimpleOpTeller : public Teller {
SimpleOpTeller() {
const std::map<std::string, std::string>& op2path =
paddle::lite::GetOp2PathDict();
std::vector<std::string> lite_ops = paddle::lite::GetAllOps();
auto is_non_inst = [](const std::string& op) -> bool {
const std::vector<std::string> ops = {"feed", "fetch", "while"};
return std::find(ops.begin(), ops.end(), op) != ops.end();
};
for (const auto& op : op2path) {
if (!is_non_inst(op.first)) {
ops_.insert(op.first);
for (const auto& op : lite_ops) {
if (!is_non_inst(op)) {
ops_.insert(op);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册