diff options
-rw-r--r-- | delegate/CMakeLists.txt | 10 | ||||
-rw-r--r-- | delegate/cmake/Modules/FindTfLite.cmake | 1 | ||||
-rw-r--r-- | delegate/src/Split.hpp | 6 | ||||
-rw-r--r-- | delegate/src/test/GatherTestHelper.hpp | 4 |
4 files changed, 10 insertions, 11 deletions
diff --git a/delegate/CMakeLists.txt b/delegate/CMakeLists.txt index 5303d81d26..9be2f44d44 100644 --- a/delegate/CMakeLists.txt +++ b/delegate/CMakeLists.txt @@ -71,10 +71,10 @@ add_library(tflite_headers INTERFACE) target_include_directories(tflite_headers INTERFACE $<BUILD_INTERFACE:${TfLite_INCLUDE_DIR}> $<INSTALL_INTERFACE:include/tflite_headers>) -target_compile_options(tflite_headers INTERFACE $<$<CXX_COMPILER_ID:GNU>:-Wno-conversion - -Wno-sign-conversion - -Wno-unused-parameter - -Wno-unused-function>) +target_compile_options(tflite_headers INTERFACE -Wno-conversion + -Wno-sign-conversion + -Wno-unused-parameter + -Wno-unused-function) target_link_libraries(armnnDelegate PUBLIC tflite_headers) @@ -89,7 +89,7 @@ target_link_libraries(armnnDelegate PRIVATE add_library(flatbuffer_headers INTERFACE) target_include_directories(flatbuffer_headers INTERFACE $<BUILD_INTERFACE:${Flatbuffers_INCLUDE_DIR}> $<INSTALL_INTERFACE:include/flatbuffer_headers>) -target_compile_options(flatbuffer_headers INTERFACE $<$<CXX_COMPILER_ID:GNU>:-Wno-sign-conversion>) +target_compile_options(flatbuffer_headers INTERFACE -Wno-sign-conversion) target_link_libraries(armnnDelegate PUBLIC flatbuffer_headers) diff --git a/delegate/cmake/Modules/FindTfLite.cmake b/delegate/cmake/Modules/FindTfLite.cmake index 9bb117efac..18d6032147 100644 --- a/delegate/cmake/Modules/FindTfLite.cmake +++ b/delegate/cmake/Modules/FindTfLite.cmake @@ -16,6 +16,7 @@ find_path(TfLite_INCLUDE_DIR find_library(TfLite_LIB NAMES "libtensorflow_lite_all.so" + "libtensorflowlite.so" HINTS ${TFLITE_LIB_ROOT}) diff --git a/delegate/src/Split.hpp b/delegate/src/Split.hpp index c76ad60ace..8248be9413 100644 --- a/delegate/src/Split.hpp +++ b/delegate/src/Split.hpp @@ -42,10 +42,9 @@ TfLiteStatus VisitSplitOperator(DelegateData& delegateData, return kTfLiteError; } - const armnn::TensorInfo& axisTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteAxisTensor); const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor); - ARMNN_ASSERT(axisTensorInfo.GetNumElements() == 1); + ARMNN_ASSERT(GetTensorInfoForTfLiteTensor(tfLiteAxisTensor).GetNumElements() == 1); auto* axisTensorDataPtr = tflite::GetTensorData<int32_t>(&tfLiteAxisTensor); std::vector<int32_t> axisTensorData(axisTensorDataPtr, axisTensorDataPtr + 1); const unsigned int splitDim = axisTensorData[0]; @@ -168,9 +167,8 @@ TfLiteStatus VisitSplitVOperator(DelegateData& delegateData, const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor); const armnn::TensorInfo& splitsTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteSplitsTensor); ARMNN_ASSERT(splitsTensorInfo.GetNumDimensions() == 1); + ARMNN_ASSERT(GetTensorInfoForTfLiteTensor(tfLiteAxisTensor).GetNumElements() == 1); - const armnn::TensorInfo& axisTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteAxisTensor); - ARMNN_ASSERT(axisTensorInfo.GetNumElements() == 1); auto* axisTensorDataPtr = tflite::GetTensorData<int32_t>(&tfLiteAxisTensor); std::vector<int32_t> axisTensorData(axisTensorDataPtr, axisTensorDataPtr + 1); diff --git a/delegate/src/test/GatherTestHelper.hpp b/delegate/src/test/GatherTestHelper.hpp index d8bfe37842..fcacf04134 100644 --- a/delegate/src/test/GatherTestHelper.hpp +++ b/delegate/src/test/GatherTestHelper.hpp @@ -71,7 +71,7 @@ std::vector<char> CreateGatherTfLiteModel(tflite::TensorType tensorType, flatbuffers::Offset<void> operatorBuiltinOptions = CreateGatherOptions(flatBufferBuilder).Union(); const std::vector<int> operatorInputs{{0, 1}}; - const std::vector<int> operatorOutputs{{2}}; + const std::vector<int> operatorOutputs{2}; flatbuffers::Offset<Operator> controlOperator = CreateOperator(flatBufferBuilder, 0, @@ -83,7 +83,7 @@ std::vector<char> CreateGatherTfLiteModel(tflite::TensorType tensorType, operatorBuiltinOptions); const std::vector<int> subgraphInputs{{0, 1}}; - const std::vector<int> subgraphOutputs{{2}}; + const std::vector<int> subgraphOutputs{2}; flatbuffers::Offset<SubGraph> subgraph = CreateSubGraph(flatBufferBuilder, flatBufferBuilder.CreateVector(tensors.data(), tensors.size()), |