aboutsummaryrefslogtreecommitdiff
path: root/delegate
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-11-17 16:43:56 +0000
committerFinn Williams <Finn.Williams@arm.com>2020-11-17 19:56:11 +0000
commit5d03e31aaf4d82e9f9cdc03c41d2328bbb2a0dee (patch)
tree6af2bfa7747ee5461d00bee7da6b0224fd4f9b6f /delegate
parenta40b434e2e3afdbf2254ef735758244bd840ef77 (diff)
downloadarmnn-5d03e31aaf4d82e9f9cdc03c41d2328bbb2a0dee.tar.gz
IVGCVSW-5377 Add ArmNN TfLite delegate to ExecuteNetwork
* Added package manger to turn internal calls to find_package into a no-op * Changed delegate cmake so it can now be built within armnn Change-Id: I2a7ecb9a3c1ca05474cd1dccd91498f6f6c0b32e Signed-off-by: Finn Williams <Finn.Williams@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Diffstat (limited to 'delegate')
-rw-r--r--delegate/CMakeLists.txt2
-rw-r--r--delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in2
-rw-r--r--delegate/include/armnn_delegate.hpp4
-rw-r--r--delegate/src/Transpose.hpp2
4 files changed, 6 insertions, 4 deletions
diff --git a/delegate/CMakeLists.txt b/delegate/CMakeLists.txt
index 595784f37a..d53af88105 100644
--- a/delegate/CMakeLists.txt
+++ b/delegate/CMakeLists.txt
@@ -195,5 +195,7 @@ export(
EXPORT armnn-delegate-targets
FILE ${CMAKE_CURRENT_BINARY_DIR}/ArmnnDelegateTargets.cmake
NAMESPACE ArmnnDelegate::)
+add_library(ArmnnDelegate::ArmnnDelegate ALIAS armnnDelegate)
+
####################################################
diff --git a/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in b/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in
index 12d1161afa..c403068db8 100644
--- a/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in
+++ b/delegate/cmake/Modules/ArmnnDelegateConfig.cmake.in
@@ -9,6 +9,8 @@ MESSAGE(STATUS "Found ArmnnDelegate: ${ARMNN_DELEGATE_CONFIG_FILE}")
include(CMakeFindDependencyMacro)
+find_dependency(Armnn REQUIRED CONFIG)
+
list(APPEND CMAKE_MODULE_PATH ${ARMNN_DELEGATE_CMAKE_DIR})
if(NOT TARGET ArmnnDelegate::ArmnnDelegate)
diff --git a/delegate/include/armnn_delegate.hpp b/delegate/include/armnn_delegate.hpp
index 6f18185d7b..adf264aabb 100644
--- a/delegate/include/armnn_delegate.hpp
+++ b/delegate/include/armnn_delegate.hpp
@@ -3,8 +3,7 @@
// SPDX-License-Identifier: MIT
//
-#ifndef ARMNN_TFLITE_DELEGATE
-#define ARMNN_TFLITE_DELEGATE
+#pragma once
#include "DelegateOptions.hpp"
@@ -114,5 +113,4 @@ private:
} // armnnDelegate namespace
-#endif // ARMNN_TFLITE_DELEGATE
diff --git a/delegate/src/Transpose.hpp b/delegate/src/Transpose.hpp
index dd79bd3bee..f3c348a1c2 100644
--- a/delegate/src/Transpose.hpp
+++ b/delegate/src/Transpose.hpp
@@ -64,7 +64,7 @@ TfLiteStatus VisitTransposeOperator(DelegateData& delegateData,
auto* permTensorDataPtr = tflite::GetTensorData<int32_t>(&tfLiteInputTensor1);
unsigned int numEl = tfLiteInputTensor1.dims->data[0];
- ARMNN_ASSERT( numEl <= armnn::MaxNumOfTensorDimensions);
+ ARMNN_ASSERT( numEl <= static_cast<int>(armnn::MaxNumOfTensorDimensions));
ARMNN_ASSERT( tfLiteInputTensor1.dims->size == 1); // ensure only single dimension to the permutation tensor
armnn::TransposeDescriptor descriptor(armnn::PermutationVector(