From 6dd178f2395b34cfb360eabb0130c19ed258f5fa Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 2 Apr 2021 22:04:39 +0100 Subject: IVGCVSW-5720 Remove the Caffe Parser from ArmNN Signed-off-by: Nikhil Raj Change-Id: Ib00be204f549efa9aa5971ecf65c2dec4a10b10f --- cmake/AddDllCopyCommands.cmake | 21 --------------------- cmake/GlobalConfig.cmake | 15 +-------------- cmake/ParserVersion.cmake | 16 ---------------- 3 files changed, 1 insertion(+), 51 deletions(-) (limited to 'cmake') diff --git a/cmake/AddDllCopyCommands.cmake b/cmake/AddDllCopyCommands.cmake index ff57bb173d..6190170dbc 100644 --- a/cmake/AddDllCopyCommands.cmake +++ b/cmake/AddDllCopyCommands.cmake @@ -39,14 +39,6 @@ macro(addDllCopyCommands target) addDllCopyCommand(${target} "$/armnn.dll" "$/armnn.dll") endif() - # armnnCaffeParser.dll - if ("armnnCaffeParser" IN_LIST target_deps) - addDllCopyCommand(${target} "$/armnnCaffeParser.dll" - "$/armnnCaffeParser.dll") - addDllCopyCommand(${target} "${PROTOBUF_ROOT}/bin/libprotobufd.dll" - "${PROTOBUF_ROOT}/bin/libprotobuf.dll") - endif() - # armnnTfParser.dll if ("armnnTfParser" IN_LIST target_deps) addDllCopyCommand(${target} "$/armnnTfParser.dll" @@ -60,18 +52,5 @@ macro(addDllCopyCommands target) addDllCopyCommand(${target} "$/armnnTfLiteParser.dll" "$/armnnTfLiteParser.dll") endif() - - # caffe.dll and its dependencies - listContainsRegex(includeCaffeDlls "${target_deps}" "caffe") - if (${includeCaffeDlls}) - addDllCopyCommand(${target} "${CAFFE_BUILD_ROOT}/lib/caffe-d.dll" - "${CAFFE_BUILD_ROOT}/lib/caffe.dll") - addDllCopyCommand(${target} "${PROTOBUF_ROOT}/bin/libprotobufd.dll" - "${PROTOBUF_ROOT}/bin/libprotobuf.dll") - addDllCopyCommand(${target} "${BLAS_ROOT}/bin/libopenblas.dll" "${BLAS_ROOT}/bin/libopenblas.dll") - addDllCopyCommand(${target} "${MINGW32_ROOT}/bin/libgfortran-3.dll" "${MINGW32_ROOT}/bin/libgfortran-3.dll") - addDllCopyCommand(${target} "${MINGW32_ROOT}/bin/libgcc_s_dw2-1.dll" "${MINGW32_ROOT}/bin/libgcc_s_dw2-1.dll") - addDllCopyCommand(${target} "${MINGW32_ROOT}/bin/libquadmath-0.dll" "${MINGW32_ROOT}/bin/libquadmath-0.dll") - endif() endif() endmacro() diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index 8a7c9a1821..031974814b 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -3,7 +3,6 @@ # Copyright 2020 NXP # SPDX-License-Identifier: MIT # -option(BUILD_CAFFE_PARSER "Build Caffe parser" OFF) option(BUILD_TF_PARSER "Build Tensorflow parser" OFF) option(BUILD_ONNX_PARSER "Build Onnx parser" OFF) option(BUILD_UNIT_TESTS "Build unit tests" ON) @@ -159,7 +158,7 @@ endif() find_dependency(Threads) # Favour the protobuf passed on command line -if(BUILD_TF_PARSER OR BUILD_CAFFE_PARSER OR BUILD_ONNX_PARSER) +if(BUILD_TF_PARSER OR BUILD_ONNX_PARSER) find_library(PROTOBUF_LIBRARY_DEBUG NAMES "protobufd" PATHS ${PROTOBUF_ROOT}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) @@ -181,15 +180,6 @@ if(BUILD_TF_PARSER OR BUILD_CAFFE_PARSER OR BUILD_ONNX_PARSER) add_definitions(-DPROTOBUF_USE_DLLS) endif() -# Caffe and its dependencies -if(BUILD_CAFFE_PARSER) - add_definitions(-DARMNN_CAFFE_PARSER) - - find_path(CAFFE_GENERATED_SOURCES "caffe/proto/caffe.pb.h" - HINTS ${CAFFE_BUILD_ROOT}/include) - include_directories(SYSTEM "${CAFFE_GENERATED_SOURCES}") -endif() - if(BUILD_TF_PARSER) add_definitions(-DARMNN_TF_PARSER) @@ -416,9 +406,6 @@ else() endif() -if(NOT BUILD_CAFFE_PARSER) - message(STATUS "Caffe parser support is disabled") -endif() if(NOT BUILD_TF_PARSER) message(STATUS "Tensorflow parser support is disabled") diff --git a/cmake/ParserVersion.cmake b/cmake/ParserVersion.cmake index e7a5234506..2120bf7057 100644 --- a/cmake/ParserVersion.cmake +++ b/cmake/ParserVersion.cmake @@ -3,22 +3,6 @@ # SPDX-License-Identifier: MIT # -# Read the CaffeParser version components from file -file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnCaffeParser/Version.hpp caffeVersion) - -# Parse the CaffeParser version components -string(REGEX MATCH "#define CAFFE_PARSER_MAJOR_VERSION ([0-9]*)" _ ${caffeVersion}) -set(CAFFE_PARSER_MAJOR_VERSION ${CMAKE_MATCH_1}) -string(REGEX MATCH "#define CAFFE_PARSER_MINOR_VERSION ([0-9]*)" _ ${caffeVersion}) -set(CAFFE_PARSER_MINOR_VERSION ${CMAKE_MATCH_1}) - -# Define LIB version -set(CAFFE_PARSER_LIB_VERSION "${CAFFE_PARSER_MAJOR_VERSION}.${CAFFE_PARSER_MINOR_VERSION}") - -# Define LIB soversion -set(CAFFE_PARSER_LIB_SOVERSION "${CAFFE_PARSER_MAJOR_VERSION}") - - # Read the OnnxParser version components from file file(READ ${CMAKE_CURRENT_LIST_DIR}/../include/armnnOnnxParser/Version.hpp onnxVersion) -- cgit v1.2.1