diff --git a/CMakeLists.txt b/CMakeLists.txt index 30bd636ed5141abac40d86aeb0f656f2e3f8f215..b0f8790b3cff653ea2351a029df21128ab81e940 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build) # NET default set(NET "defult" CACHE STRING "select net type") -set_property(CACHE NET PROPERTY STRINGS "defult" "googlenet" "mobilenet" "yolo" "squeezenet") +set_property(CACHE NET PROPERTY STRINGS "defult" "googlenet" "mobilenet" "yolo" "squeezenet" "FPGAnets") include("${CMAKE_CURRENT_LIST_DIR}/tools/op.cmake") diff --git a/tools/op.cmake b/tools/op.cmake index feccaabbeb122d40cc5e0687a8420e147a98b1cf..50fca67092d964baeafecf10146e22efce24c98a 100644 --- a/tools/op.cmake +++ b/tools/op.cmake @@ -42,6 +42,16 @@ elseif (NET STREQUAL "resnet") set(MUL_OP ON) set(POOL_OP ON) set(RELU_OP ON) +elseif (NET STREQUAL "FPGAnets") + set(FUSION_CONVRELU_OP ON) + set(FUSION_CONVBNSCALE_OP ON) + set(FUSION_CONVBNSCALERELU_OP ON) + set(FUSION_POOLBN_OP ON) + set(FUSION_ELEMENTWISEADDRELU_OP ON) + set(REGION_OP ON) + set(POOL_OP ON) + set(CONCAT_OP ON) + set(SOFTMAX_OP ON) else () set(BATCHNORM_OP ON) set(BOXCODER_OP ON) @@ -183,3 +193,23 @@ endif() if (IM2SEQUENCE_OP) add_definitions(-DIM2SEQUENCE_OP) endif() + +if (FUSION_CONVRELU_OP) + add_definitions(-DFUSION_CONVRELU_OP) +endif() +if (FUSION_CONVBNSCALE_OP) + add_definitions(-DFUSION_CONVBNSCALE_OP) +endif() +if (FUSION_CONVBNSCALERELU_OP) + add_definitions(-DFUSION_CONVBNSCALERELU_OP) +endif() +if (FUSION_POOLBN_OP) + add_definitions(-DFUSION_POOLBN_OP) +endif() +if (FUSION_ELEMENTWISEADDRELU_OP) + add_definitions(-DFUSION_ELEMENTWISEADDRELU_OP) +endif() +if (REGION_OP) + add_definitions(-DREGION_OP) +endif() +