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