From de056fe0793304b084a7ea452389e1a00a6839cc Mon Sep 17 00:00:00 2001 From: xiebaiyuan Date: Tue, 11 Sep 2018 15:30:09 +0800 Subject: [PATCH] add single build for genet --- test/CMakeLists.txt | 5 +++++ tools/build.sh | 2 +- tools/op.cmake | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 475bbe3eef..ef03205ae5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -55,6 +55,11 @@ elseif("mobilenetfssd" IN_LIST NET) # gen test ADD_EXECUTABLE(test-fssd net/test_mobilenet_025_fssd.cpp test_helper.h test_include.h) target_link_libraries(test-fssd paddle-mobile) + +elseif("genet" IN_LIST NET) + # gen test + ADD_EXECUTABLE(test-genet net/test_genet_combine.cpp test_helper.h test_include.h executor_for_test.h) + target_link_libraries(test-genet paddle-mobile) else () # gen test diff --git a/tools/build.sh b/tools/build.sh index 2d3bd7d6e1..baa9fe1097 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") +declare -a supportedNets=("googlenet" "mobilenet" "yolo" "squeezenet" "resnet" "mobilenetssd" "nlp" "mobilenetfssd" "genet") build_for_mac() { if [ ! `which brew` ]; then diff --git a/tools/op.cmake b/tools/op.cmake index c7e8b65447..8488dd86bd 100644 --- a/tools/op.cmake +++ b/tools/op.cmake @@ -148,6 +148,21 @@ if ("mobilenetfssd" IN_LIST NET) set(FOUND_MATCH ON) endif() +if ("genet" IN_LIST NET) + message("genet enabled") + set(FUSION_CONVADDPRELU_OP ON) + set(FUSION_CONVADDADDPRELU_OP ON) + set(FUSION_CONVADD_OP ON) + set(CONV_TRANSPOSE_OP ON) + set(FUSION_CONVADDRELU_OP ON) + set(ELEMENTWISEADD_OP ON) + set(PRELU_OP ON) + set(POOL_OP ON) + set(CONCAT_OP ON) + + set(FOUND_MATCH ON) +endif() + if(NOT FOUND_MATCH) message("--default--") -- GitLab