Permalink
Browse files

Release 18.05

  • Loading branch information...
Surmeh authored and TelmoARM committed May 18, 2018
1 parent bceff2f commit 3537c2ca7ebf31c1673b9ec2bb0c17b0406bbae0
Showing with 5,129 additions and 2,656 deletions.
  1. +28 −1 Android.bp
  2. +15 −13 Android.mk
  3. +59 −6 CMakeLists.txt
  4. +6 −6 LICENSE
  5. +1 −2 README.md
  6. +34 −1 cmake/GlobalConfig.cmake
  7. +19 −0 include/armnn/Exceptions.hpp
  8. +2 −0 include/armnn/LayerSupport.hpp
  9. +22 −2 include/armnn/TypesUtils.hpp
  10. +1 −1 include/armnn/Version.hpp
  11. +27 −10 src/armnn/Descriptors.cpp
  12. +2 −15 src/armnn/Graph.cpp
  13. +3 −3 src/armnn/Graph.hpp
  14. +28 −3 src/armnn/Layer.hpp
  15. +3 −1 src/armnn/LayerSupport.cpp
  16. +0 −1,029 src/armnn/Layers.cpp
  17. +0 −437 src/armnn/Layers.hpp
  18. +23 −0 src/armnn/LayersFwd.hpp
  19. +30 −27 src/armnn/LoadedNetwork.cpp
  20. +13 −13 src/armnn/LoadedNetwork.hpp
  21. +0 −1 src/armnn/Network.cpp
  22. +68 −25 src/armnn/Runtime.cpp
  23. +9 −11 src/armnn/Runtime.hpp
  24. +28 −13 src/armnn/SerializeLayerParameters.cpp
  25. +5 −0 src/armnn/SerializeLayerParameters.hpp
  26. +2 −2 src/armnn/Utils.cpp
  27. +32 −0 src/armnn/backends/AclBaseMemoryManager.cpp
  28. +46 −0 src/armnn/backends/AclBaseMemoryManager.hpp
  29. +14 −0 src/armnn/backends/ArmComputeTensorUtils.hpp
  30. +234 −0 src/armnn/backends/ClContextControl.cpp
  31. +60 −0 src/armnn/backends/ClContextControl.hpp
  32. +11 −7 src/armnn/backends/ClLayerSupport.cpp
  33. +2 −0 src/armnn/backends/ClLayerSupport.hpp
  34. +14 −150 src/armnn/backends/ClWorkloadFactory.cpp
  35. +5 −36 src/armnn/backends/ClWorkloadFactory.hpp
  36. +43 −0 src/armnn/backends/ClWorkloads/ClConvolution2dBaseWorkload.cpp
  37. +19 −0 src/armnn/backends/ClWorkloads/ClConvolution2dBaseWorkload.hpp
  38. +9 −12 src/armnn/backends/ClWorkloads/ClConvolution2dFloat32Workload.cpp
  39. +8 −2 src/armnn/backends/ClWorkloads/ClConvolution2dFloat32Workload.hpp
  40. +9 −13 src/armnn/backends/ClWorkloads/ClConvolution2dUint8Workload.cpp
  41. +6 −2 src/armnn/backends/ClWorkloads/ClConvolution2dUint8Workload.hpp
  42. +3 −2 src/armnn/backends/ClWorkloads/ClFullyConnectedFloat32Workload.cpp
  43. +5 −1 src/armnn/backends/ClWorkloads/ClFullyConnectedFloat32Workload.hpp
  44. +4 −2 src/armnn/backends/ClWorkloads/ClSoftmaxFloat32Workload.cpp
  45. +6 −3 src/armnn/backends/ClWorkloads/ClSoftmaxFloat32Workload.hpp
  46. +3 −1 src/armnn/backends/ClWorkloads/ClSoftmaxUint8Workload.cpp
  47. +6 −4 src/armnn/backends/ClWorkloads/ClSoftmaxUint8Workload.hpp
  48. +14 −10 src/armnn/backends/MakeWorkloadHelper.hpp
  49. +16 −38 src/armnn/backends/NeonLayerSupport.cpp
  50. +2 −0 src/armnn/backends/NeonLayerSupport.hpp
  51. +25 −6 src/armnn/backends/NeonWorkloadFactory.cpp
  52. +8 −2 src/armnn/backends/NeonWorkloadFactory.hpp
  53. +0 −2 src/armnn/backends/NeonWorkloadUtils.cpp
  54. +32 −4 src/armnn/backends/NeonWorkloads/NeonConvolution2dBaseWorkload.cpp
  55. +14 −2 src/armnn/backends/NeonWorkloads/NeonConvolution2dBaseWorkload.hpp
  56. +2 −6 src/armnn/backends/NeonWorkloads/NeonConvolution2dFloat32Workload.cpp
  57. +9 −5 src/armnn/backends/NeonWorkloads/NeonConvolution2dFloat32Workload.hpp
  58. +5 −5 src/armnn/backends/NeonWorkloads/NeonConvolution2dUint8Workload.cpp
  59. +6 −4 src/armnn/backends/NeonWorkloads/NeonConvolution2dUint8Workload.hpp
  60. +2 −3 src/armnn/backends/NeonWorkloads/NeonFullyConnectedFloat32Workload.cpp
  61. +6 −5 src/armnn/backends/NeonWorkloads/NeonFullyConnectedFloat32Workload.hpp
  62. +2 −2 src/armnn/backends/NeonWorkloads/NeonL2NormalizationFloat32Workload.cpp
  63. +8 −4 src/armnn/backends/NeonWorkloads/NeonL2NormalizationFloat32Workload.hpp
  64. +2 −1 src/armnn/backends/NeonWorkloads/NeonNormalizationFloat32Workload.cpp
  65. +4 −1 src/armnn/backends/NeonWorkloads/NeonNormalizationFloat32Workload.hpp
  66. +4 −3 src/armnn/backends/NeonWorkloads/NeonSoftmaxFloat32Workload.cpp
  67. +6 −4 src/armnn/backends/NeonWorkloads/NeonSoftmaxFloat32Workload.hpp
  68. +6 −3 src/armnn/backends/NeonWorkloads/NeonSoftmaxUint8Workload.cpp
  69. +4 −4 src/armnn/backends/NeonWorkloads/NeonSoftmaxUint8Workload.hpp
  70. +5 −0 src/armnn/backends/RefLayerSupport.cpp
  71. +2 −0 src/armnn/backends/RefLayerSupport.hpp
  72. +0 −2 src/armnn/backends/RefWorkloadFactory.cpp
  73. +5 −2 src/armnn/backends/RefWorkloads/ConvImpl.hpp
  74. +1 −1 src/armnn/backends/RefWorkloads/Merger.hpp
  75. +1 −1 src/armnn/backends/RefWorkloads/Splitter.hpp
  76. +46 −4 src/armnn/backends/WorkloadFactory.cpp
  77. +5 −2 src/armnn/backends/WorkloadFactory.hpp
  78. +3 −0 src/armnn/backends/test/ArmComputeCl.cpp
  79. +9 −0 src/armnn/backends/test/ArmComputeNeon.cpp
  80. +124 −5 src/armnn/backends/test/Conv2dTestImpl.hpp
  81. +10 −17 src/armnn/backends/test/CreateWorkloadCl.cpp
  82. +7 −4 src/armnn/backends/test/CreateWorkloadNeon.cpp
  83. +7 −4 src/armnn/backends/test/CreateWorkloadRef.cpp
  84. +4 −3 src/armnn/backends/test/FullyConnectedTestImpl.hpp
  85. +1 −2 src/armnn/backends/test/IsLayerSupportedTest.cpp
  86. +514 −263 src/armnn/backends/test/LayerTests.cpp
  87. +3 −0 src/armnn/backends/test/LayerTests.hpp
  88. +1 −1 src/armnn/backends/test/MemCopyTests.cpp
  89. +3 −0 src/armnn/backends/test/NormTestImpl.hpp
  90. +3 −0 src/armnn/backends/test/Reference.cpp
  91. +4 −1 src/armnn/backends/test/SoftmaxTestImpl.hpp
  92. +83 −104 src/armnn/backends/test/SplitterTestImpl.hpp
  93. +41 −0 src/armnn/layers/ActivationLayer.cpp
  94. +27 −0 src/armnn/layers/ActivationLayer.hpp
  95. +68 −0 src/armnn/layers/AdditionLayer.cpp
  96. +27 −0 src/armnn/layers/AdditionLayer.hpp
  97. +60 −0 src/armnn/layers/BatchNormalizationLayer.cpp
  98. +34 −0 src/armnn/layers/BatchNormalizationLayer.hpp
  99. +46 −0 src/armnn/layers/ConstantLayer.cpp
  100. +32 −0 src/armnn/layers/ConstantLayer.hpp
  101. +83 −0 src/armnn/layers/Convolution2dLayer.cpp
  102. +32 −0 src/armnn/layers/Convolution2dLayer.hpp
  103. +85 −0 src/armnn/layers/DepthwiseConvolution2dLayer.cpp
  104. +32 −0 src/armnn/layers/DepthwiseConvolution2dLayer.hpp
  105. +51 −0 src/armnn/layers/FakeQuantizationLayer.cpp
  106. +27 −0 src/armnn/layers/FakeQuantizationLayer.hpp
  107. +49 −0 src/armnn/layers/FloorLayer.cpp
  108. +27 −0 src/armnn/layers/FloorLayer.hpp
  109. +69 −0 src/armnn/layers/FullyConnectedLayer.cpp
  110. +32 −0 src/armnn/layers/FullyConnectedLayer.hpp
  111. +37 −0 src/armnn/layers/InputLayer.cpp
  112. +27 −0 src/armnn/layers/InputLayer.hpp
  113. +50 −0 src/armnn/layers/L2NormalizationLayer.cpp
  114. +27 −0 src/armnn/layers/L2NormalizationLayer.hpp
  115. +24 −0 src/armnn/layers/LayerCloneBase.hpp
  116. +52 −0 src/armnn/layers/LayerWithParameters.hpp
  117. +48 −0 src/armnn/layers/MemCopyLayer.cpp
  118. +27 −0 src/armnn/layers/MemCopyLayer.hpp
  119. +178 −0 src/armnn/layers/MergerLayer.cpp
  120. +28 −0 src/armnn/layers/MergerLayer.hpp
  121. +71 −0 src/armnn/layers/MultiplicationLayer.cpp
  122. +27 −0 src/armnn/layers/MultiplicationLayer.hpp
  123. +44 −0 src/armnn/layers/NormalizationLayer.cpp
  124. +27 −0 src/armnn/layers/NormalizationLayer.hpp
  125. +37 −0 src/armnn/layers/OutputLayer.cpp
  126. +31 −0 src/armnn/layers/OutputLayer.hpp
  127. +49 −0 src/armnn/layers/PermuteLayer.cpp
  128. +44 −0 src/armnn/layers/PermuteLayer.hpp
  129. +106 −0 src/armnn/layers/Pooling2dLayer.cpp
  130. +27 −0 src/armnn/layers/Pooling2dLayer.hpp
  131. +46 −0 src/armnn/layers/ReshapeLayer.cpp
  132. +33 −0 src/armnn/layers/ReshapeLayer.hpp
  133. +52 −0 src/armnn/layers/ResizeBilinearLayer.cpp
  134. +27 −0 src/armnn/layers/ResizeBilinearLayer.hpp
  135. +44 −0 src/armnn/layers/SoftmaxLayer.cpp
  136. +27 −0 src/armnn/layers/SoftmaxLayer.hpp
  137. +81 −0 src/armnn/layers/SplitterLayer.cpp
  138. +28 −0 src/armnn/layers/SplitterLayer.hpp
  139. +48 −28 src/armnn/test/CreateWorkload.hpp
  140. +2 −1 src/armnn/test/EndToEndTest.cpp
  141. +1 −3 src/armnn/test/GraphTests.cpp
  142. +141 −3 src/armnn/test/RuntimeTests.cpp
  143. +1 −1 src/armnn/test/TensorHelpers.hpp
  144. +1 −1 src/armnn/test/UnitTests.hpp
  145. +17 −1 src/armnnCaffeParser/CaffeParser.cpp
  146. +6 −5 src/armnnCaffeParser/CaffeSupport.md
  147. +1 −1 src/armnnTfParser/README.md
  148. +67 −55 src/armnnTfParser/TensorFlowSupport.md
  149. +13 −0 src/armnnTfParser/TfParser.cpp
  150. +11 −2 src/armnnUtils/DotSerializer.cpp
  151. +38 −0 src/armnnUtils/HeapProfiling.cpp
  152. +47 −0 src/armnnUtils/HeapProfiling.hpp
  153. +62 −0 src/armnnUtils/LeakChecking.cpp
  154. +89 −0 src/armnnUtils/LeakChecking.hpp
  155. +11 −0 src/armnnUtils/ParserFlatbuffersFixture.hpp
  156. +61 −41 src/armnnUtils/ParserPrototxtFixture.hpp
  157. +6 −0 tests/CMakeLists.txt
  158. +17 −3 tests/CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp
  159. +18 −4 tests/CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp
  160. +23 −7 tests/CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp
  161. +18 −4 tests/CaffeMnist-Armnn/CaffeMnist-Armnn.cpp
  162. +26 −10 tests/CaffeResNet-Armnn/CaffeResNet-Armnn.cpp
  163. +19 −5 tests/CaffeVGG-Armnn/CaffeVGG-Armnn.cpp
  164. +34 −19 tests/CaffeYolo-Armnn/CaffeYolo-Armnn.cpp
  165. +21 −2 tests/ExecuteNetwork/ExecuteNetwork.cpp
  166. +50 −12 tests/InferenceModel.hpp
  167. +1 −1 tests/InferenceTest.cpp
  168. +1 −0 tests/InferenceTest.inl
  169. +12 −2 tests/MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
  170. +20 −5 tests/TfCifar10-Armnn/TfCifar10-Armnn.cpp
  171. +28 −11 tests/TfInceptionV3-Armnn/TfInceptionV3-Armnn.cpp
  172. +20 −5 tests/TfMnist-Armnn/TfMnist-Armnn.cpp
  173. +53 −37 tests/TfMobileNet-Armnn/TfMobileNet-Armnn.cpp
  174. +39 −0 tests/TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp
View
@@ -10,6 +10,7 @@
////////////////////////////////////////////
cc_library_static {
name: "libarmnn",
proprietary: true,
export_include_dirs: ["include",
"src/armnnUtils"],
local_include_dirs: ["src/armnn"],
@@ -25,6 +26,7 @@ cc_library_static {
"src/armnn/backends/ClWorkloads/ClBatchNormalizationFloat32Workload.cpp",
"src/armnn/backends/ClWorkloads/ClConstantFloat32Workload.cpp",
"src/armnn/backends/ClWorkloads/ClConstantUint8Workload.cpp",
"src/armnn/backends/ClWorkloads/ClConvolution2dBaseWorkload.cpp",
"src/armnn/backends/ClWorkloads/ClConvolution2dFloat32Workload.cpp",
"src/armnn/backends/ClWorkloads/ClConvolution2dUint8Workload.cpp",
"src/armnn/backends/ClWorkloads/ClDepthwiseConvolutionFloat32Workload.cpp",
@@ -76,6 +78,7 @@ cc_library_static {
"src/armnn/backends/NeonWorkloads/NeonSplitterFloat32Workload.cpp",
"src/armnn/backends/NeonWorkloads/NeonSplitterUint8Workload.cpp",
"src/armnn/backends/ClWorkloadFactory.cpp",
"src/armnn/backends/ClContextControl.cpp",
"src/armnn/backends/CpuTensorHandle.cpp",
"src/armnn/backends/RefWorkloadFactory.cpp",
"src/armnn/backends/RefWorkloads/RefMergerUint8Workload.cpp",
@@ -124,6 +127,29 @@ cc_library_static {
"src/armnn/backends/MemCopyWorkload.cpp",
"src/armnn/backends/WorkloadData.cpp",
"src/armnn/backends/WorkloadFactory.cpp",
"src/armnn/backends/AclBaseMemoryManager.cpp",
"src/armnn/layers/ActivationLayer.cpp",
"src/armnn/layers/AdditionLayer.cpp",
"src/armnn/layers/BatchNormalizationLayer.cpp",
"src/armnn/layers/ConstantLayer.cpp",
"src/armnn/layers/Convolution2dLayer.cpp",
"src/armnn/layers/DepthwiseConvolution2dLayer.cpp",
"src/armnn/layers/FakeQuantizationLayer.cpp",
"src/armnn/layers/FloorLayer.cpp",
"src/armnn/layers/FullyConnectedLayer.cpp",
"src/armnn/layers/InputLayer.cpp",
"src/armnn/layers/L2NormalizationLayer.cpp",
"src/armnn/layers/MemCopyLayer.cpp",
"src/armnn/layers/MergerLayer.cpp",
"src/armnn/layers/MultiplicationLayer.cpp",
"src/armnn/layers/NormalizationLayer.cpp",
"src/armnn/layers/OutputLayer.cpp",
"src/armnn/layers/PermuteLayer.cpp",
"src/armnn/layers/Pooling2dLayer.cpp",
"src/armnn/layers/ReshapeLayer.cpp",
"src/armnn/layers/ResizeBilinearLayer.cpp",
"src/armnn/layers/SoftmaxLayer.cpp",
"src/armnn/layers/SplitterLayer.cpp",
"src/armnn/Descriptors.cpp",
"src/armnn/Exceptions.cpp",
"src/armnn/Graph.cpp",
@@ -132,7 +158,6 @@ cc_library_static {
"src/armnn/SerializeLayerParameters.cpp",
"src/armnn/InternalTypes.cpp",
"src/armnn/Layer.cpp",
"src/armnn/Layers.cpp",
"src/armnn/LoadedNetwork.cpp",
"src/armnn/Network.cpp",
"src/armnn/backends/OutputHandler.cpp",
@@ -151,6 +176,8 @@ cc_library_static {
"libboost_log",
"libboost_system",
"libboost_thread"],
shared_libs: [
"liblog"],
stl: "libc++",
cppflags: [
"-fexceptions",
View
@@ -7,7 +7,7 @@ LOCAL_PATH := $(call my-dir)
# Configure these paths if you move the source or Khronos headers
#
OPENCL_HEADER_PATH := $(LOCAL_PATH)/../../mali/product/khronos/original
OPENCL_HEADER_PATH := $(LOCAL_PATH)/../clframework/include
NN_HEADER_PATH := $(LOCAL_PATH)/../../../../frameworks/ml/nn/runtime/include
ARMNN_HEADER_PATH := $(LOCAL_PATH)/include
ARMNN_SOURCE_HEADER_PATH := $(LOCAL_PATH)/src/armnn
@@ -30,18 +30,18 @@ LOCAL_CFLAGS := \
LOCAL_SRC_FILES := \
src/armnn/test/UnitTests.cpp \
src/armnn/test/EndToEndTest.cpp \
src/armnn/test/UtilsTests.cpp \
src/armnn/test/GraphTests.cpp \
src/armnn/test/RuntimeTests.cpp \
src/armnn/test/TensorTest.cpp \
src/armnn/test/Network_test.cpp \
src/armnn/backends/test/IsLayerSupportedTest.cpp \
src/armnn/backends/test/Reference.cpp \
src/armnn/backends/test/WorkloadDataValidation.cpp \
src/armnn/backends/test/TensorCopyUtils.cpp \
src/armnn/backends/test/LayerTests.cpp \
src/armnn/backends/test/CreateWorkloadRef.cpp \
src/armnn/test/EndToEndTest.cpp \
src/armnn/test/UtilsTests.cpp \
src/armnn/test/GraphTests.cpp \
src/armnn/test/RuntimeTests.cpp \
src/armnn/test/TensorTest.cpp \
src/armnn/test/Network_test.cpp \
src/armnn/backends/test/IsLayerSupportedTest.cpp \
src/armnn/backends/test/Reference.cpp \
src/armnn/backends/test/WorkloadDataValidation.cpp \
src/armnn/backends/test/TensorCopyUtils.cpp \
src/armnn/backends/test/LayerTests.cpp \
src/armnn/backends/test/CreateWorkloadRef.cpp \
src/armnn/backends/test/ArmComputeCl.cpp \
src/armnn/backends/test/ArmComputeNeon.cpp \
src/armnn/backends/test/CreateWorkloadCl.cpp \
@@ -78,6 +78,8 @@ LOCAL_ARM_MODE := arm
# Mark source files as dependent on Android.mk
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_PROPRIETARY_MODULE := true
include $(BUILD_EXECUTABLE)
View
@@ -27,6 +27,10 @@ list(APPEND armnnUtils_sources
src/armnnUtils/Permute.cpp
src/armnnUtils/DotSerializer.cpp
src/armnnUtils/DotSerializer.hpp
src/armnnUtils/HeapProfiling.cpp
src/armnnUtils/HeapProfiling.hpp
src/armnnUtils/LeakChecking.cpp
src/armnnUtils/LeakChecking.hpp
)
if(BUILD_TF_PARSER OR BUILD_CAFFE_PARSER)
list(APPEND armnnUtils_sources
@@ -100,6 +104,8 @@ list(APPEND armnn_sources
include/armnn/Version.hpp
src/armnn/backends/ClWorkloadFactory.hpp
src/armnn/backends/ClWorkloadFactory.cpp
src/armnn/backends/ClContextControl.hpp
src/armnn/backends/ClContextControl.cpp
src/armnn/backends/ClLayerSupport.cpp
src/armnn/backends/ClLayerSupport.hpp
src/armnn/backends/CpuTensorHandleFwd.hpp
@@ -120,6 +126,8 @@ list(APPEND armnn_sources
src/armnn/backends/WorkloadData.cpp
src/armnn/backends/WorkloadFactory.hpp
src/armnn/backends/WorkloadFactory.cpp
src/armnn/backends/AclBaseMemoryManager.hpp
src/armnn/backends/AclBaseMemoryManager.cpp
src/armnn/backends/WorkloadInfo.hpp
src/armnn/backends/MemCopyWorkload.cpp
src/armnn/backends/MemCopyWorkload.hpp
@@ -214,14 +222,58 @@ list(APPEND armnn_sources
src/armnn/backends/RefWorkloads/RefFakeQuantizationFloat32Workload.hpp
src/armnn/backends/RefWorkloads/RefPermuteWorkload.hpp
src/armnn/backends/RefWorkloads/RefPermuteWorkload.cpp
src/armnn/layers/LayerCloneBase.hpp
src/armnn/layers/LayerWithParameters.hpp
src/armnn/layers/ActivationLayer.hpp
src/armnn/layers/ActivationLayer.cpp
src/armnn/layers/AdditionLayer.hpp
src/armnn/layers/AdditionLayer.cpp
src/armnn/layers/BatchNormalizationLayer.hpp
src/armnn/layers/BatchNormalizationLayer.cpp
src/armnn/layers/ConstantLayer.hpp
src/armnn/layers/ConstantLayer.cpp
src/armnn/layers/Convolution2dLayer.hpp
src/armnn/layers/Convolution2dLayer.cpp
src/armnn/layers/DepthwiseConvolution2dLayer.hpp
src/armnn/layers/DepthwiseConvolution2dLayer.cpp
src/armnn/layers/FakeQuantizationLayer.hpp
src/armnn/layers/FakeQuantizationLayer.cpp
src/armnn/layers/FloorLayer.hpp
src/armnn/layers/FloorLayer.cpp
src/armnn/layers/FullyConnectedLayer.hpp
src/armnn/layers/FullyConnectedLayer.cpp
src/armnn/layers/InputLayer.hpp
src/armnn/layers/InputLayer.cpp
src/armnn/layers/L2NormalizationLayer.hpp
src/armnn/layers/L2NormalizationLayer.cpp
src/armnn/layers/MemCopyLayer.hpp
src/armnn/layers/MemCopyLayer.cpp
src/armnn/layers/MergerLayer.hpp
src/armnn/layers/MergerLayer.cpp
src/armnn/layers/MultiplicationLayer.hpp
src/armnn/layers/MultiplicationLayer.cpp
src/armnn/layers/NormalizationLayer.hpp
src/armnn/layers/NormalizationLayer.cpp
src/armnn/layers/OutputLayer.hpp
src/armnn/layers/OutputLayer.cpp
src/armnn/layers/PermuteLayer.hpp
src/armnn/layers/PermuteLayer.cpp
src/armnn/layers/Pooling2dLayer.hpp
src/armnn/layers/Pooling2dLayer.cpp
src/armnn/layers/ReshapeLayer.hpp
src/armnn/layers/ReshapeLayer.cpp
src/armnn/layers/ResizeBilinearLayer.hpp
src/armnn/layers/ResizeBilinearLayer.cpp
src/armnn/layers/SoftmaxLayer.hpp
src/armnn/layers/SoftmaxLayer.cpp
src/armnn/layers/SplitterLayer.hpp
src/armnn/layers/SplitterLayer.cpp
src/armnn/InternalTypes.hpp
src/armnn/InternalTypes.cpp
src/armnn/LayerFwd.hpp
src/armnn/Layer.hpp
src/armnn/Layer.cpp
src/armnn/LayersFwd.hpp
src/armnn/Layers.hpp
src/armnn/Layers.cpp
src/armnn/Runtime.hpp
src/armnn/Runtime.cpp
src/armnn/SerializeLayerParameters.cpp
@@ -336,6 +388,8 @@ if(ARMCOMPUTECL)
src/armnn/backends/ClWorkloads/ClConstantFloat32Workload.hpp
src/armnn/backends/ClWorkloads/ClConstantUint8Workload.cpp
src/armnn/backends/ClWorkloads/ClConstantUint8Workload.hpp
src/armnn/backends/ClWorkloads/ClConvolution2dBaseWorkload.cpp
src/armnn/backends/ClWorkloads/ClConvolution2dBaseWorkload.hpp
src/armnn/backends/ClWorkloads/ClConvolution2dFloat32Workload.cpp
src/armnn/backends/ClWorkloads/ClConvolution2dFloat32Workload.hpp
src/armnn/backends/ClWorkloads/ClConvolution2dUint8Workload.cpp
@@ -427,7 +481,6 @@ if(PROFILING_BACKEND_STREAMLINE)
target_link_libraries(armnn pthread)
endif()
if(BUILD_UNIT_TESTS)
set(unittest_sources)
list(APPEND unittest_sources
@@ -530,13 +583,13 @@ if(BUILD_UNIT_TESTS)
target_include_directories(UnitTests PRIVATE src/armnn)
target_include_directories(UnitTests PRIVATE src/armnnUtils)
CHECK_INCLUDE_FILE(valgrind/memcheck.h VALGRIND_FOUND)
if(VALGRIND_FOUND)
if(NOT HEAP_PROFILING AND VALGRIND_FOUND)
# Valgrind works with gperftools version number <= 2.4
target_compile_definitions(UnitTests PRIVATE "WITH_VALGRIND=1")
endif()
target_link_libraries(UnitTests armnn)
target_link_libraries(UnitTests armnnUtils)
target_link_libraries(UnitTests ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(UnitTests ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
View
12 LICENSE
@@ -1,12 +1,12 @@
Copyright (c) 2017 ARM Limited.
MIT License
SPDX-License-Identifier: MIT
Copyright (c) 2017 ARM Limited.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
View
@@ -2,5 +2,4 @@
For more information about Arm NN, see: https://developer.arm.com/products/processors/machine-learning/arm-nn
There is a getting started guide here: https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/configuring-the-arm-nn-sdk-build-environment-for-caffe
There is a getting started guide here: https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/configuring-the-arm-nn-sdk-build-environment
View
@@ -7,6 +7,9 @@ option(ARMCOMPUTENEON "Build with ARM Compute NEON support" OFF)
option(ARMCOMPUTECL "Build with ARM Compute OpenCL support" OFF)
option(PROFILING "Build with ArmNN built-in profiling support" OFF)
option(PROFILING_BACKEND_STREAMLINE "Forward the armNN profiling events to DS-5/Streamline as annotations" OFF)
# options used for heap profiling
option(HEAP_PROFILING "Build with heap profiling enabled" OFF)
option(GPERFTOOLS_ROOT "Location where the gperftools 'include' and 'lib' folders to be found" Off)
include(SelectLibraryConfigurations)
@@ -146,7 +149,6 @@ if(BUILD_TF_PARSER)
include_directories(SYSTEM "${TF_GENERATED_SOURCES}")
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
# ARM Compute
@@ -250,3 +252,34 @@ if(PROFILING_BACKEND_STREAMLINE)
add_definitions(-DARMNN_STREAMLINE_ENABLED)
endif()
if(HEAP_PROFILING)
# enable heap profiling for everything except for referencetests
if(NOT ${PROJECT_NAME} STREQUAL "referencetests")
find_path(HEAP_PROFILER_INCLUDE gperftools/heap-profiler.h
PATHS ${GPERFTOOLS_ROOT}/include
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
include_directories(SYSTEM "${HEAP_PROFILER_INCLUDE}")
find_library(GPERF_TOOLS_LIBRARY
NAMES tcmalloc_debug
HINTS ${GPERFTOOLS_ROOT}/lib)
link_directories(${GPERFTOOLS_ROOT}/lib)
link_libraries(${GPERF_TOOLS_LIBRARY})
add_definitions("-DARMNN_HEAP_PROFILING_ENABLED=1")
else()
message("Heap profiling is disabled for referencetests")
endif()
else()
# Valgrind only works with gperftools version number <= 2.4
CHECK_INCLUDE_FILE(valgrind/memcheck.h VALGRIND_FOUND)
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")
endif()
@@ -6,6 +6,7 @@
#include <stdexcept>
#include <string>
#include <sstream>
namespace armnn
{
@@ -72,4 +73,22 @@ void ConditionalThrow(bool condition, const std::string& message)
}
}
///
/// ComparedType must support:
/// operator==(const ComparedType&)
/// operator<<(ostream&, const ComparedType&)
///
template <typename ExceptionType, typename ComparedType>
void ConditionalThrowIfNotEqual(const std::string& message,
const ComparedType& leftHandSide,
const ComparedType& rightHandSide)
{
if (!(leftHandSide == rightHandSide))
{
std::stringstream ss;
ss << message << " : " << leftHandSide << " != " << rightHandSide;
throw ExceptionType(ss.str());
}
}
}
@@ -37,8 +37,10 @@ bool IsConstantSupported(Compute compute,
bool IsConvolution2dSupported(Compute compute,
const TensorInfo& input,
const TensorInfo& output,
const Convolution2dDescriptor& descriptor,
const TensorInfo& weights,
const TensorInfo& biases,
char* reasonIfUnsupported = nullptr,
size_t reasonIfUnsupportedMaxLength = 1024);
Oops, something went wrong.

0 comments on commit 3537c2c

Please sign in to comment.