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

fix_copy_if_different
Wilber 5 years ago committed by GitHub
parent c505c4dbea
commit 0371cf6f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);
}
}
}

Loading…
Cancel
Save