telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 ARM Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | # SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 4 | # |
| 5 | |
| 6 | LOCAL_PATH := $(call my-dir) |
| 7 | |
| 8 | # Configure these paths if you move the source or Khronos headers |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 9 | OPENCL_HEADER_PATH := $(LOCAL_PATH)/../clframework/include |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 10 | NN_HEADER_PATH := $(LOCAL_PATH)/../../../../frameworks/ml/nn/runtime/include |
| 11 | ARMNN_HEADER_PATH := $(LOCAL_PATH)/include |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 12 | ARMNN_MAIN_HEADER_PATH := $(LOCAL_PATH)/src |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 13 | ARMNN_SOURCE_HEADER_PATH := $(LOCAL_PATH)/src/armnn |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 14 | ARMNN_SOURCE_UTILS_HEADER_PATH := $(LOCAL_PATH)/src/armnnUtils |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 15 | ARMNN_BACKENDS_HEADER_PATH := $(LOCAL_PATH)/src/backends |
janeil01 | 55e488a | 2019-11-08 12:03:58 +0000 | [diff] [blame] | 16 | ARMNN_PROFILING_HEADER_PATH := $(LOCAL_PATH)/src/profiling |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 17 | |
David Beck | b30c533 | 2018-09-28 16:51:01 +0100 | [diff] [blame] | 18 | # find the common.mk and backend.mk files in the backend source folders |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 19 | ARMNN_BACKEND_COMMON_MAKEFILE_LOCAL_PATHS := $(wildcard $(LOCAL_PATH)/src/backends/*/common.mk) |
David Beck | b30c533 | 2018-09-28 16:51:01 +0100 | [diff] [blame] | 20 | ARMNN_BACKEND_COMMON_MAKEFILE_PATHS := $(subst $(LOCAL_PATH),,$(ARMNN_BACKEND_COMMON_MAKEFILE_LOCAL_PATHS)) |
| 21 | ARMNN_BACKEND_COMMON_MAKEFILE_DIRS := $(subst /common.mk,,$(ARMNN_BACKEND_COMMON_MAKEFILE_PATHS)) |
| 22 | |
David Beck | 2ca4696 | 2018-09-21 15:48:23 +0100 | [diff] [blame] | 23 | ARMNN_BACKEND_MAKEFILE_LOCAL_PATHS := $(wildcard $(LOCAL_PATH)/src/backends/*/backend.mk) |
| 24 | ARMNN_BACKEND_MAKEFILE_PATHS := $(subst $(LOCAL_PATH),,$(ARMNN_BACKEND_MAKEFILE_LOCAL_PATHS)) |
| 25 | ARMNN_BACKEND_MAKEFILE_DIRS := $(subst /backend.mk,,$(ARMNN_BACKEND_MAKEFILE_PATHS)) |
| 26 | |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 27 | ############## |
| 28 | # libarmnn.a # |
| 29 | ############## |
| 30 | include $(CLEAR_VARS) |
| 31 | |
| 32 | LOCAL_MODULE := libarmnn |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 33 | ifeq ($(Q_OR_LATER),1) |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 34 | # "eng" is deprecated in Android Q |
| 35 | LOCAL_MODULE_TAGS := optional |
| 36 | else |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 37 | LOCAL_MODULE_TAGS := eng optional |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 38 | endif |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 39 | LOCAL_ARM_MODE := arm |
| 40 | LOCAL_PROPRIETARY_MODULE := true |
| 41 | |
David Beck | b30c533 | 2018-09-28 16:51:01 +0100 | [diff] [blame] | 42 | # placeholder to hold all backend source files, common and specific to the backends |
David Beck | 2ca4696 | 2018-09-21 15:48:23 +0100 | [diff] [blame] | 43 | ARMNN_BACKEND_SOURCES := |
| 44 | |
| 45 | # |
David Beck | b30c533 | 2018-09-28 16:51:01 +0100 | [diff] [blame] | 46 | # iterate through the backend common and specific include paths, include them into the |
| 47 | # current makefile and append the sources held by the COMMON_SOURCES and BACKEND_SOURCES variable |
| 48 | # (included from the given makefile) to the ARMNN_BACKEND_SOURCES list |
David Beck | 2ca4696 | 2018-09-21 15:48:23 +0100 | [diff] [blame] | 49 | # |
David Beck | b30c533 | 2018-09-28 16:51:01 +0100 | [diff] [blame] | 50 | $(foreach mkPath,$(ARMNN_BACKEND_COMMON_MAKEFILE_DIRS),\ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 51 | $(eval include $(LOCAL_PATH)/$(mkPath)/common.mk)\ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 52 | $(eval ARMNN_BACKEND_SOURCES := $(ARMNN_BACKEND_SOURCES)\ |
| 53 | $(patsubst %,$(mkPath)/%,$(COMMON_SOURCES)))) |
David Beck | b30c533 | 2018-09-28 16:51:01 +0100 | [diff] [blame] | 54 | |
David Beck | 2ca4696 | 2018-09-21 15:48:23 +0100 | [diff] [blame] | 55 | $(foreach mkPath,$(ARMNN_BACKEND_MAKEFILE_DIRS),\ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 56 | $(eval include $(LOCAL_PATH)/$(mkPath)/backend.mk)\ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 57 | $(eval ARMNN_BACKEND_SOURCES := $(ARMNN_BACKEND_SOURCES)\ |
| 58 | $(patsubst %,$(mkPath)/%,$(BACKEND_SOURCES)))) |
David Beck | 2ca4696 | 2018-09-21 15:48:23 +0100 | [diff] [blame] | 59 | |
| 60 | # Mark source files as dependent on Android.mk and backend makefiles |
| 61 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk \ |
| 62 | $(ARMNN_BACKEND_MAKEFILE_LOCAL_PATHS) |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 63 | |
| 64 | LOCAL_EXPORT_C_INCLUDES := \ |
David Beck | 10b4dfd | 2018-09-19 12:03:20 +0100 | [diff] [blame] | 65 | $(ARMNN_MAIN_HEADER_PATH) \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 66 | $(ARMNN_SOURCE_HEADER_PATH) \ |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 67 | $(ARMNN_SOURCE_UTILS_HEADER_PATH) \ |
janeil01 | 55e488a | 2019-11-08 12:03:58 +0000 | [diff] [blame] | 68 | $(ARMNN_PROFILING_HEADER_PATH) \ |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 69 | $(ARMNN_BACKENDS_HEADER_PATH) |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 70 | |
| 71 | LOCAL_C_INCLUDES := \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 72 | $(OPENCL_HEADER_PATH) \ |
| 73 | $(NN_HEADER_PATH) \ |
| 74 | $(ARMNN_HEADER_PATH) \ |
| 75 | $(ARMNN_MAIN_HEADER_PATH) \ |
| 76 | $(ARMNN_SOURCE_HEADER_PATH) \ |
| 77 | $(ARMNN_SOURCE_UTILS_HEADER_PATH) \ |
janeil01 | 55e488a | 2019-11-08 12:03:58 +0000 | [diff] [blame] | 78 | $(ARMNN_PROFILING_HEADER_PATH) \ |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 79 | $(ARMNN_BACKENDS_HEADER_PATH) |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 80 | |
| 81 | LOCAL_SRC_FILES := \ |
David Beck | 2ca4696 | 2018-09-21 15:48:23 +0100 | [diff] [blame] | 82 | $(ARMNN_BACKEND_SOURCES) \ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 83 | src/armnn/BackendHelper.cpp \ |
Matteo Martincigh | c601aa6 | 2019-10-29 15:03:22 +0000 | [diff] [blame] | 84 | src/armnn/BackendRegistry.cpp \ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 85 | src/armnn/Descriptors.cpp \ |
| 86 | src/armnn/Exceptions.cpp \ |
| 87 | src/armnn/Graph.cpp \ |
| 88 | src/armnn/InternalTypes.cpp \ |
| 89 | src/armnn/JsonPrinter.cpp \ |
| 90 | src/armnn/Layer.cpp \ |
| 91 | src/armnn/LayerSupport.cpp \ |
| 92 | src/armnn/LoadedNetwork.cpp \ |
| 93 | src/armnn/Network.cpp \ |
| 94 | src/armnn/NetworkUtils.cpp \ |
| 95 | src/armnn/Observable.cpp \ |
| 96 | src/armnn/Optimizer.cpp \ |
Rob Hughes | 3a7d3a7 | 2019-09-24 16:59:56 +0100 | [diff] [blame] | 97 | src/armnn/optimizations/PermuteAndBatchToSpaceAsDepthToSpace.cpp \ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 98 | src/armnn/ProfilingEvent.cpp \ |
| 99 | src/armnn/Profiling.cpp \ |
| 100 | src/armnn/Runtime.cpp \ |
| 101 | src/armnn/SerializeLayerParameters.cpp \ |
| 102 | src/armnn/SubgraphView.cpp \ |
| 103 | src/armnn/SubgraphViewSelector.cpp \ |
| 104 | src/armnn/Tensor.cpp \ |
| 105 | src/armnn/TypesUtils.cpp \ |
| 106 | src/armnn/Utils.cpp \ |
| 107 | src/armnn/WallClockTimer.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 108 | src/armnnUtils/CsvReader.cpp \ |
| 109 | src/armnnUtils/DataLayoutIndexed.cpp \ |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 110 | src/armnnUtils/DotSerializer.cpp \ |
| 111 | src/armnnUtils/FloatingPointConverter.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 112 | src/armnnUtils/HeapProfiling.cpp \ |
| 113 | src/armnnUtils/LeakChecking.cpp \ |
Sadik Armagan | 479045b | 2018-10-01 11:51:37 +0100 | [diff] [blame] | 114 | src/armnnUtils/ParserHelper.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 115 | src/armnnUtils/Permute.cpp \ |
Nina Drozd | d41b259 | 2018-11-19 13:03:36 +0000 | [diff] [blame] | 116 | src/armnnUtils/TensorUtils.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 117 | src/armnnUtils/VerificationHelpers.cpp \ |
Kevin May | 868eb14 | 2019-09-04 17:29:31 +0100 | [diff] [blame] | 118 | src/armnn/layers/AbsLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 119 | src/armnn/layers/ActivationLayer.cpp \ |
| 120 | src/armnn/layers/AdditionLayer.cpp \ |
Nikhil Raj | ee391d5 | 2019-09-05 17:50:44 +0100 | [diff] [blame] | 121 | src/armnn/layers/ArgMinMaxLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 122 | src/armnn/layers/BatchNormalizationLayer.cpp \ |
Éanna Ó Catháin | 4e1e136 | 2018-11-12 11:36:34 +0000 | [diff] [blame] | 123 | src/armnn/layers/BatchToSpaceNdLayer.cpp \ |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 124 | src/armnn/layers/ComparisonLayer.cpp \ |
Jim Flynn | e242f2d | 2019-05-22 14:24:13 +0100 | [diff] [blame] | 125 | src/armnn/layers/ConcatLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 126 | src/armnn/layers/ConstantLayer.cpp \ |
| 127 | src/armnn/layers/Convolution2dLayer.cpp \ |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 128 | src/armnn/layers/ConvertFp16ToFp32Layer.cpp \ |
| 129 | src/armnn/layers/ConvertFp32ToFp16Layer.cpp \ |
Nattapat Chaimanowong | a9a1cf1 | 2018-12-03 16:06:49 +0000 | [diff] [blame] | 130 | src/armnn/layers/DebugLayer.cpp \ |
Aron Virginas-Tar | dd6247f | 2019-09-19 14:31:17 +0100 | [diff] [blame] | 131 | src/armnn/layers/DepthToSpaceLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 132 | src/armnn/layers/DepthwiseConvolution2dLayer.cpp \ |
Nattapat Chaimanowong | e4294fd | 2019-03-28 09:56:53 +0000 | [diff] [blame] | 133 | src/armnn/layers/DequantizeLayer.cpp \ |
Narumol Prangnawarat | 94dd5d8 | 2019-01-23 18:06:26 +0000 | [diff] [blame] | 134 | src/armnn/layers/DetectionPostProcessLayer.cpp \ |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 135 | src/armnn/layers/DivisionLayer.cpp \ |
Matteo Martincigh | 59a950c | 2018-12-13 12:48:25 +0000 | [diff] [blame] | 136 | src/armnn/layers/ElementwiseBaseLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 137 | src/armnn/layers/FakeQuantizationLayer.cpp \ |
| 138 | src/armnn/layers/FloorLayer.cpp \ |
| 139 | src/armnn/layers/FullyConnectedLayer.cpp \ |
narpra01 | b89b05f | 2019-01-16 09:53:09 +0000 | [diff] [blame] | 140 | src/armnn/layers/GatherLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 141 | src/armnn/layers/InputLayer.cpp \ |
Kevin May | ce5045a | 2019-10-02 14:07:47 +0100 | [diff] [blame] | 142 | src/armnn/layers/InstanceNormalizationLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 143 | src/armnn/layers/L2NormalizationLayer.cpp \ |
Aron Virginas-Tar | f982dea | 2019-10-11 14:07:53 +0100 | [diff] [blame] | 144 | src/armnn/layers/LogSoftmaxLayer.cpp \ |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 145 | src/armnn/layers/LstmLayer.cpp \ |
Nattapat Chaimanowong | 5a4304a | 2018-11-28 10:44:37 +0000 | [diff] [blame] | 146 | src/armnn/layers/MaximumLayer.cpp \ |
narpra01 | 32b9046 | 2018-09-13 11:07:48 +0100 | [diff] [blame] | 147 | src/armnn/layers/MeanLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 148 | src/armnn/layers/MemCopyLayer.cpp \ |
Derek Lamberti | f674aa0 | 2019-08-01 15:56:25 +0100 | [diff] [blame] | 149 | src/armnn/layers/MemImportLayer.cpp \ |
Nattapat Chaimanowong | 1f88630 | 2019-04-05 13:37:19 +0100 | [diff] [blame] | 150 | src/armnn/layers/MergeLayer.cpp \ |
kevmay01 | 9053969 | 2018-11-29 08:40:19 +0000 | [diff] [blame] | 151 | src/armnn/layers/MinimumLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 152 | src/armnn/layers/MultiplicationLayer.cpp \ |
| 153 | src/armnn/layers/NormalizationLayer.cpp \ |
| 154 | src/armnn/layers/OutputLayer.cpp \ |
Mohamed Nour Abouelseoud | 5662c20 | 2018-09-24 13:30:09 +0100 | [diff] [blame] | 155 | src/armnn/layers/PadLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 156 | src/armnn/layers/PermuteLayer.cpp \ |
| 157 | src/armnn/layers/Pooling2dLayer.cpp \ |
Matteo Martincigh | 4912402 | 2019-01-11 13:25:59 +0000 | [diff] [blame] | 158 | src/armnn/layers/PreCompiledLayer.cpp \ |
Matteo Martincigh | 0e406ee | 2019-06-12 15:42:18 +0100 | [diff] [blame] | 159 | src/armnn/layers/PreluLayer.cpp \ |
Derek Lamberti | a9cca6a | 2019-03-25 15:41:58 +0000 | [diff] [blame] | 160 | src/armnn/layers/QuantizeLayer.cpp \ |
James Conroy | ee18dc8 | 2019-07-17 11:27:46 +0100 | [diff] [blame] | 161 | src/armnn/layers/QuantizedLstmLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 162 | src/armnn/layers/ReshapeLayer.cpp \ |
Teresa Charlin | a9075df | 2019-06-27 15:41:57 +0100 | [diff] [blame] | 163 | src/armnn/layers/ResizeLayer.cpp \ |
Mohamed Nour Abouelseoud | a1d3c6a | 2018-12-27 12:39:16 +0000 | [diff] [blame] | 164 | src/armnn/layers/RsqrtLayer.cpp \ |
Aron Virginas-Tar | 636ab40 | 2019-09-16 14:27:45 +0100 | [diff] [blame] | 165 | src/armnn/layers/SliceLayer.cpp \ |
| 166 | src/armnn/layers/SoftmaxLayer.cpp \ |
Mohamed Nour Abouelseoud | a1d3c6a | 2018-12-27 12:39:16 +0000 | [diff] [blame] | 167 | src/armnn/layers/SpaceToBatchNdLayer.cpp \ |
Aron Virginas-Tar | 972af15 | 2019-06-11 14:14:03 +0100 | [diff] [blame] | 168 | src/armnn/layers/SpaceToDepthLayer.cpp \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 169 | src/armnn/layers/SplitterLayer.cpp \ |
Matthew Jackson | 2b8c1da | 2019-07-04 14:59:16 +0100 | [diff] [blame] | 170 | src/armnn/layers/StackLayer.cpp \ |
Derek Lamberti | 013c390 | 2019-10-21 10:46:16 +0100 | [diff] [blame] | 171 | src/armnn/layers/StandInLayer.cpp \ |
Conor Kennedy | 430b5d8 | 2018-11-14 15:28:28 +0000 | [diff] [blame] | 172 | src/armnn/layers/StridedSliceLayer.cpp \ |
Mohamed Nour Abouelseoud | a1d3c6a | 2018-12-27 12:39:16 +0000 | [diff] [blame] | 173 | src/armnn/layers/SubtractionLayer.cpp \ |
Sadik Armagan | eff363d | 2019-04-05 15:25:46 +0100 | [diff] [blame] | 174 | src/armnn/layers/SwitchLayer.cpp \ |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 175 | src/armnn/layers/TransposeConvolution2dLayer.cpp \ |
| 176 | src/profiling/BufferManager.cpp \ |
| 177 | src/profiling/CommandHandler.cpp \ |
| 178 | src/profiling/CommandHandlerFunctor.cpp \ |
| 179 | src/profiling/CommandHandlerKey.cpp \ |
| 180 | src/profiling/CommandHandlerRegistry.cpp \ |
| 181 | src/profiling/ConnectionAcknowledgedCommandHandler.cpp \ |
| 182 | src/profiling/CounterDirectory.cpp \ |
Keith Davis | 3201eea | 2019-10-24 17:30:41 +0100 | [diff] [blame] | 183 | src/profiling/DirectoryCaptureCommandHandler.cpp \ |
| 184 | src/profiling/FileOnlyProfilingConnection.cpp \ |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 185 | src/profiling/Holder.cpp \ |
Jim Flynn | ab84575 | 2019-10-25 13:17:30 +0100 | [diff] [blame] | 186 | src/profiling/LabelsAndEventClasses.cpp \ |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 187 | src/profiling/PacketBuffer.cpp \ |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 188 | src/profiling/PacketVersionResolver.cpp \ |
| 189 | src/profiling/PeriodicCounterCapture.cpp \ |
| 190 | src/profiling/PeriodicCounterSelectionCommandHandler.cpp \ |
Matteo Martincigh | 994b534 | 2019-10-11 17:19:56 +0100 | [diff] [blame] | 191 | src/profiling/PerJobCounterSelectionCommandHandler.cpp \ |
Jim Flynn | c4728ad | 2019-10-07 15:15:12 +0100 | [diff] [blame] | 192 | src/profiling/ProfilingConnectionDumpToFileDecorator.cpp \ |
| 193 | src/profiling/ProfilingConnectionFactory.cpp \ |
| 194 | src/profiling/ProfilingService.cpp \ |
| 195 | src/profiling/ProfilingStateMachine.cpp \ |
| 196 | src/profiling/ProfilingUtils.cpp \ |
| 197 | src/profiling/RequestCounterDirectoryCommandHandler.cpp \ |
| 198 | src/profiling/SendCounterPacket.cpp \ |
Matteo Martincigh | cdfb941 | 2019-11-08 11:23:06 +0000 | [diff] [blame] | 199 | src/profiling/SendTimelinePacket.cpp \ |
Matteo Martincigh | 830101c | 2019-10-22 11:07:45 +0100 | [diff] [blame] | 200 | src/profiling/SocketProfilingConnection.cpp \ |
Narumol Prangnawarat | df31cfe | 2019-11-22 11:26:06 +0000 | [diff] [blame] | 201 | src/profiling/TimelinePacketWriterFactory.cpp \ |
Matteo Martincigh | 830101c | 2019-10-22 11:07:45 +0100 | [diff] [blame] | 202 | src/profiling/TimelineUtilityMethods.cpp |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 203 | |
| 204 | LOCAL_STATIC_LIBRARIES := \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 205 | armnn-arm_compute \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 206 | libboost_log \ |
| 207 | libboost_system \ |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 208 | libboost_thread \ |
| 209 | libboost_filesystem |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 210 | |
| 211 | LOCAL_SHARED_LIBRARIES := \ |
| 212 | liblog |
| 213 | |
| 214 | LOCAL_CFLAGS := \ |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 215 | -std=$(CPP_VERSION) \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 216 | -fexceptions \ |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 217 | -Wno-unused-parameter \ |
Matteo Martincigh | bccc345 | 2019-10-18 14:59:19 +0100 | [diff] [blame] | 218 | -frtti |
Guillaume Gardet | 5ae7829 | 2019-10-15 08:47:26 +0200 | [diff] [blame] | 219 | |
Matteo Martincigh | d95e906 | 2019-01-31 15:35:59 +0000 | [diff] [blame] | 220 | # The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk |
| 221 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
| 222 | LOCAL_CFLAGS += \ |
| 223 | -DARMCOMPUTECL_ENABLED |
| 224 | endif # ARMNN_COMPUTE_CL_ENABLED == 1 |
| 225 | # The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk |
| 226 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) |
| 227 | LOCAL_CFLAGS += \ |
| 228 | -DARMCOMPUTENEON_ENABLED |
| 229 | endif # ARMNN_COMPUTE_NEON_ENABLED == 1 |
Matteo Martincigh | edd6fdc | 2019-08-29 18:27:18 +0100 | [diff] [blame] | 230 | # The variable to enable/disable the REFERENCE backend (ARMNN_REF_ENABLED) is declared in android-nn-driver/Android.mk |
| 231 | ifeq ($(ARMNN_REF_ENABLED),1) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 232 | LOCAL_CFLAGS += \ |
Matteo Martincigh | db16dd3 | 2019-08-27 16:41:11 +0100 | [diff] [blame] | 233 | -DARMNNREF_ENABLED |
Matteo Martincigh | edd6fdc | 2019-08-29 18:27:18 +0100 | [diff] [blame] | 234 | endif # ARMNN_REF_ENABLED == 1 |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 235 | |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 236 | ifeq ($(Q_OR_LATER),1) |
| 237 | LOCAL_CFLAGS += \ |
Sadik Armagan | e131a0b | 2019-11-22 12:52:28 +0000 | [diff] [blame] | 238 | -DARMNN_MIXED_PRECISION_FP16_POOLING \ |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 239 | -DBOOST_NO_AUTO_PTR |
| 240 | endif # PLATFORM_VERSION == Q or later |
| 241 | |
surmeh01 | 4c7098b | 2018-07-05 14:03:08 +0100 | [diff] [blame] | 242 | include $(BUILD_STATIC_LIBRARY) |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 243 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 244 | ############### |
| 245 | # armnn-tests # |
| 246 | ############### |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 247 | include $(CLEAR_VARS) |
| 248 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 249 | LOCAL_MODULE := armnn-tests |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 250 | ifeq ($(Q_OR_LATER),1) |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 251 | # "eng" is deprecated in Android Q |
| 252 | LOCAL_MODULE_TAGS := optional |
| 253 | else |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 254 | LOCAL_MODULE_TAGS := eng optional |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 255 | endif |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 256 | LOCAL_ARM_MODE := arm |
| 257 | LOCAL_PROPRIETARY_MODULE := true |
| 258 | |
Aron Virginas-Tar | ceae3aa | 2018-10-18 10:39:38 +0100 | [diff] [blame] | 259 | # placeholder to hold all backend unit test source files |
| 260 | ARMNN_BACKEND_TEST_SOURCES := |
| 261 | |
| 262 | # |
| 263 | # iterate through the backend common and specific include paths, include them into the current |
| 264 | # makefile and append the sources held by the COMMON_TEST_SOURCES and BACKEND_TEST_SOURCES |
| 265 | # (included from the given makefile) to the ARMNN_BACKEND_TEST_SOURCES list |
| 266 | # |
| 267 | $(foreach mkPath,$(ARMNN_BACKEND_COMMON_MAKEFILE_DIRS), \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 268 | $(eval include $(LOCAL_PATH)/$(mkPath)/common.mk) \ |
| 269 | $(eval ARMNN_BACKEND_TEST_SOURCES := $(ARMNN_BACKEND_TEST_SOURCES) \ |
| 270 | $(patsubst %,$(mkPath)/%,$(COMMON_TEST_SOURCES)))) |
Aron Virginas-Tar | ceae3aa | 2018-10-18 10:39:38 +0100 | [diff] [blame] | 271 | |
| 272 | $(foreach mkPath,$(ARMNN_BACKEND_MAKEFILE_DIRS), \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 273 | $(eval include $(LOCAL_PATH)/$(mkPath)/backend.mk) \ |
| 274 | $(eval ARMNN_BACKEND_TEST_SOURCES := $(ARMNN_BACKEND_TEST_SOURCES) \ |
| 275 | $(patsubst %,$(mkPath)/%,$(BACKEND_TEST_SOURCES)))) |
Aron Virginas-Tar | ceae3aa | 2018-10-18 10:39:38 +0100 | [diff] [blame] | 276 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 277 | # Mark source files as dependent on Android.mk |
| 278 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 279 | |
| 280 | LOCAL_C_INCLUDES := \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 281 | $(OPENCL_HEADER_PATH) \ |
| 282 | $(NN_HEADER_PATH) \ |
| 283 | $(ARMNN_HEADER_PATH) \ |
| 284 | $(ARMNN_MAIN_HEADER_PATH) \ |
| 285 | $(ARMNN_SOURCE_HEADER_PATH) \ |
| 286 | $(ARMNN_SOURCE_UTILS_HEADER_PATH) \ |
janeil01 | 55e488a | 2019-11-08 12:03:58 +0000 | [diff] [blame] | 287 | $(ARMNN_PROFILING_HEADER_PATH) \ |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 288 | $(ARMNN_BACKENDS_HEADER_PATH) |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 289 | |
| 290 | LOCAL_CFLAGS := \ |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 291 | -std=$(CPP_VERSION) \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 292 | -fexceptions \ |
| 293 | -frtti \ |
Matteo Martincigh | bccc345 | 2019-10-18 14:59:19 +0100 | [diff] [blame] | 294 | -isystem vendor/arm/android-nn-driver/boost_1_64_0 |
Guillaume Gardet | 5ae7829 | 2019-10-15 08:47:26 +0200 | [diff] [blame] | 295 | |
Matteo Martincigh | d95e906 | 2019-01-31 15:35:59 +0000 | [diff] [blame] | 296 | # The variable to enable/disable the CL backend (ARMNN_COMPUTE_CL_ENABLED) is declared in android-nn-driver/Android.mk |
| 297 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
| 298 | LOCAL_CFLAGS += \ |
| 299 | -DARMCOMPUTECL_ENABLED |
| 300 | endif # ARMNN_COMPUTE_CL_ENABLED == 1 |
| 301 | # The variable to enable/disable the NEON backend (ARMNN_COMPUTE_NEON_ENABLED) is declared in android-nn-driver/Android.mk |
| 302 | ifeq ($(ARMNN_COMPUTE_NEON_ENABLED),1) |
| 303 | LOCAL_CFLAGS += \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 304 | -DARMCOMPUTENEON_ENABLED |
Matteo Martincigh | d95e906 | 2019-01-31 15:35:59 +0000 | [diff] [blame] | 305 | endif # ARMNN_COMPUTE_NEON_ENABLED == 1 |
Matteo Martincigh | edd6fdc | 2019-08-29 18:27:18 +0100 | [diff] [blame] | 306 | # The variable to enable/disable the REFERENCE backend (ARMNN_REF_ENABLED) is declared in android-nn-driver/Android.mk |
| 307 | ifeq ($(ARMNN_REF_ENABLED),1) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 308 | LOCAL_CFLAGS += \ |
Matteo Martincigh | db16dd3 | 2019-08-27 16:41:11 +0100 | [diff] [blame] | 309 | -DARMNNREF_ENABLED |
Matteo Martincigh | edd6fdc | 2019-08-29 18:27:18 +0100 | [diff] [blame] | 310 | endif # ARMNN_REF_ENABLED == 1 |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 311 | |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 312 | ifeq ($(Q_OR_LATER),1) |
| 313 | LOCAL_CFLAGS += \ |
| 314 | -DBOOST_NO_AUTO_PTR |
| 315 | endif # PLATFORM_VERSION == Q or later |
| 316 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 317 | LOCAL_SRC_FILES := \ |
Aron Virginas-Tar | ceae3aa | 2018-10-18 10:39:38 +0100 | [diff] [blame] | 318 | $(ARMNN_BACKEND_TEST_SOURCES) \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 319 | src/armnn/test/EndToEndTest.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 320 | src/armnn/test/GraphTests.cpp \ |
narpra01 | 6f37f83 | 2018-12-21 18:30:00 +0000 | [diff] [blame] | 321 | src/armnn/test/GraphUtils.cpp \ |
Matteo Martincigh | bf0e722 | 2019-06-20 17:17:45 +0100 | [diff] [blame] | 322 | src/armnn/test/InferOutputTests.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 323 | src/armnn/test/InstrumentTests.cpp \ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 324 | src/armnn/test/NetworkTests.cpp \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 325 | src/armnn/test/ObservableTest.cpp \ |
Matteo Martincigh | bf0e722 | 2019-06-20 17:17:45 +0100 | [diff] [blame] | 326 | src/armnn/test/OptionalTest.cpp \ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 327 | src/armnn/test/ProfilingEventTest.cpp \ |
| 328 | src/armnn/test/SubgraphViewTests.cpp \ |
| 329 | src/armnn/test/TensorHandleStrategyTest.cpp \ |
| 330 | src/armnn/test/TensorTest.cpp \ |
Derek Lamberti | 84da38b | 2019-06-13 11:40:08 +0100 | [diff] [blame] | 331 | src/armnn/test/TestUtils.cpp \ |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 332 | src/armnn/test/UnitTests.cpp \ |
Narumol Prangnawarat | df31cfe | 2019-11-22 11:26:06 +0000 | [diff] [blame] | 333 | src/armnn/test/UtilsTests.cpp \ |
| 334 | src/profiling/test/ProfilingTestUtils.cpp |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 335 | |
Matteo Martincigh | edd6fdc | 2019-08-29 18:27:18 +0100 | [diff] [blame] | 336 | ifeq ($(ARMNN_REF_ENABLED),1) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 337 | LOCAL_SRC_FILES += \ |
| 338 | src/armnn/test/DebugCallbackTest.cpp \ |
| 339 | src/armnn/test/RuntimeTests.cpp |
| 340 | endif |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 341 | |
| 342 | LOCAL_STATIC_LIBRARIES := \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 343 | libneuralnetworks_common \ |
| 344 | libboost_log \ |
| 345 | libboost_system \ |
| 346 | libboost_unit_test_framework \ |
| 347 | libboost_thread \ |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 348 | libboost_filesystem \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 349 | armnn-arm_compute |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 350 | |
David Beck | 3cc9a62 | 2018-10-12 10:38:31 +0100 | [diff] [blame] | 351 | LOCAL_WHOLE_STATIC_LIBRARIES := libarmnn |
| 352 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 353 | LOCAL_SHARED_LIBRARIES := \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 354 | libbase \ |
| 355 | libhidlbase \ |
| 356 | libhidltransport \ |
| 357 | libhidlmemory \ |
| 358 | liblog \ |
| 359 | libutils \ |
| 360 | android.hardware.neuralnetworks@1.0 \ |
| 361 | android.hidl.allocator@1.0 \ |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 362 | android.hidl.memory@1.0 |
| 363 | |
Sadik Armagan | 96a709d | 2019-06-26 09:47:51 +0100 | [diff] [blame] | 364 | ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 365 | LOCAL_SHARED_LIBRARIES += \ |
Matteo Martincigh | 2135015 | 2018-11-28 16:22:22 +0000 | [diff] [blame] | 366 | libOpenCL |
Sadik Armagan | bab2626 | 2019-05-15 12:52:19 +0100 | [diff] [blame] | 367 | endif |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 368 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 369 | include $(BUILD_EXECUTABLE) |