From aec47b43d484410c92fb19fff012b4d93748e7e4 Mon Sep 17 00:00:00 2001 From: zhaojiaying01 Date: Fri, 28 Dec 2018 12:23:27 +0800 Subject: [PATCH] add superresoltion model separate compilation --- test/CMakeLists.txt | 9 +++++++++ tools/build.sh | 2 +- tools/op.cmake | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1fb5fcf2df..5602d2d3ac 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -129,6 +129,15 @@ if (CON GREATER -1) endif () +list(FIND NET "super" CON) +if (CON GREATER -1) + # gen test + ADD_EXECUTABLE(test-super net/test_super.cpp test_helper.h test_include.h executor_for_test.h) + target_link_libraries(test-super paddle-mobile) + set(FOUND_MATCH ON) + +endif () + if (NOT FOUND_MATCH) # gen test ADD_EXECUTABLE(test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h) diff --git a/tools/build.sh b/tools/build.sh index f83a7fe187..5cb0887e3a 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash NETS="" -declare -a supportedNets=("googlenet" "mobilenet" "yolo" "squeezenet" "resnet" "mobilenetssd" "nlp" "mobilenetfssd" "genet") +declare -a supportedNets=("googlenet" "mobilenet" "yolo" "squeezenet" "resnet" "mobilenetssd" "nlp" "mobilenetfssd" "genet" "super") build_for_mac() { if [ ! `which brew` ]; then diff --git a/tools/op.cmake b/tools/op.cmake index 3254a83ab2..40bc1075ba 100644 --- a/tools/op.cmake +++ b/tools/op.cmake @@ -202,6 +202,16 @@ if (CON GREATER -1) set(FOUND_MATCH ON) endif() +list(FIND NET "super" CON) +if (CON GREATER -1) + message("super enabled") + set(FUSION_CONVADD_OP ON) + set(FUSION_CONVADDRELU_OP ON) + set(ELEMENTWISEADD_OP ON) + + set(FOUND_MATCH ON) +endif() + if(NOT FOUND_MATCH) message("--default--") -- GitLab