1// 2// Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved. 3// SPDX-License-Identifier: MIT 4// 5 6//////////////////////////////////////////// 7// // 8// libarmnn.a // 9// // 10//////////////////////////////////////////// 11 12COMMON_SOURCES = [ 13 "src/backends/backendsCommon/TensorHandle.cpp", 14 "src/backends/backendsCommon/DynamicBackend.cpp", 15 "src/backends/backendsCommon/DynamicBackendUtils.cpp", 16 "src/backends/backendsCommon/IBackendInternal.cpp", 17 "src/backends/backendsCommon/ITensorHandleFactory.cpp", 18 "src/backends/backendsCommon/LayerSupportBase.cpp", 19 "src/backends/backendsCommon/MapWorkload.cpp", 20 "src/backends/backendsCommon/MemCopyWorkload.cpp", 21 "src/backends/backendsCommon/MemImportWorkload.cpp", 22 "src/backends/backendsCommon/MemoryManager.cpp", 23 "src/backends/backendsCommon/MemSyncWorkload.cpp", 24 "src/backends/backendsCommon/OptimizationViews.cpp", 25 "src/backends/backendsCommon/TensorHandleFactoryRegistry.cpp", 26 "src/backends/backendsCommon/UnmapWorkload.cpp", 27 "src/backends/backendsCommon/WorkloadData.cpp", 28 "src/backends/backendsCommon/WorkloadFactory.cpp", 29 "src/backends/backendsCommon/WorkloadUtils.cpp", 30 "src/backends/backendsCommon/memoryOptimizerStrategyLibrary/strategies/ConstantMemoryStrategy.cpp", 31 "src/backends/backendsCommon/memoryOptimizerStrategyLibrary/strategies/SingleAxisPriorityList.cpp", 32 "src/backends/backendsCommon/memoryOptimizerStrategyLibrary/strategies/StrategyValidator.cpp", 33 "src/backends/aclCommon/ArmComputeTensorUtils.cpp", 34 "src/backends/aclCommon/BaseMemoryManager.cpp", 35] 36 37ARMNN_SOURCES = [ 38 "profiling/common/src/CommandHandlerFunctor.cpp", 39 "profiling/common/src/CommandHandlerKey.cpp", 40 "profiling/common/src/CommandHandlerRegistry.cpp", 41 "profiling/common/src/CommonProfilingUtils.cpp", 42 "profiling/common/src/CounterDirectory.cpp", 43 "profiling/common/src/LabelsAndEventClasses.cpp", 44 "profiling/common/src/Logging.cpp", 45 "profiling/common/src/NetworkSockets.cpp", 46 "profiling/common/src/PacketVersionResolver.cpp", 47 "profiling/common/src/Processes.cpp", 48 "profiling/common/src/SwTrace.cpp", 49 "profiling/common/src/Threads.cpp", 50 "profiling/client/src/ActivateTimelineReportingCommandHandler.cpp", 51 "profiling/client/src/BufferManager.cpp", 52 "profiling/client/src/CommandHandler.cpp", 53 "profiling/client/src/ConnectionAcknowledgedCommandHandler.cpp", 54 "profiling/client/src/CounterIdMap.cpp", 55 "profiling/client/src/DeactivateTimelineReportingCommandHandler.cpp", 56 "profiling/client/src/FileOnlyProfilingConnection.cpp", 57 "profiling/client/src/Holder.cpp", 58 "profiling/client/src/IProfilingService.cpp", 59 "profiling/client/src/PacketBuffer.cpp", 60 "profiling/client/src/PeriodicCounterCapture.cpp", 61 "profiling/client/src/PeriodicCounterSelectionCommandHandler.cpp", 62 "profiling/client/src/PerJobCounterSelectionCommandHandler.cpp", 63 "profiling/client/src/ProfilingConnectionDumpToFileDecorator.cpp", 64 "profiling/client/src/ProfilingConnectionFactory.cpp", 65 "profiling/client/src/ProfilingService.cpp", 66 "profiling/client/src/ProfilingStateMachine.cpp", 67 "profiling/client/src/ProfilingUtils.cpp", 68 "profiling/client/src/RegisterBackendCounters.cpp", 69 "profiling/client/src/RequestCounterDirectoryCommandHandler.cpp", 70 "profiling/client/src/SendCounterPacket.cpp", 71 "profiling/client/src/SendThread.cpp", 72 "profiling/client/src/SendTimelinePacket.cpp", 73 "profiling/client/src/SocketProfilingConnection.cpp", 74 "profiling/client/src/TimelinePacketWriterFactory.cpp", 75 "profiling/client/src/TimelineUtilityMethods.cpp", 76 "profiling/client/src/backends/BackendProfiling.cpp", 77 "profiling/client/src/backends/IBackendProfiling.cpp", 78 "profiling/server/src/timelineDecoder/DirectoryCaptureCommandHandler.cpp", 79 "profiling/server/src/timelineDecoder/TimelineCaptureCommandHandler.cpp", 80 "profiling/server/src/timelineDecoder/TimelineDecoder.cpp", 81 "profiling/server/src/timelineDecoder/TimelineDirectoryCaptureCommandHandler.cpp", 82 "src/armnn/ArmNNProfilingServiceInitialiser.cpp", 83 "src/armnn/BackendHelper.cpp", 84 "src/armnn/BackendRegistry.cpp", 85 "src/armnn/Descriptors.cpp", 86 "src/armnn/Exceptions.cpp", 87 "src/armnn/Graph.cpp", 88 "src/armnn/ILayerSupport.cpp", 89 "src/armnn/InternalTypes.cpp", 90 "src/armnn/JsonPrinter.cpp", 91 "src/armnn/Layer.cpp", 92 "src/armnn/LoadedNetwork.cpp", 93 "src/armnn/Logging.cpp", 94 "src/armnn/Network.cpp", 95 "src/armnn/NetworkUtils.cpp", 96 "src/armnn/Observable.cpp", 97 "src/armnn/Optimizer.cpp", 98 "src/armnn/OutputHandler.cpp", 99 "src/armnn/ProfilingEvent.cpp", 100 "src/armnn/Profiling.cpp", 101 "src/armnn/Runtime.cpp", 102 "src/armnn/SerializeLayerParameters.cpp", 103 "src/armnn/SubgraphView.cpp", 104 "src/armnn/SubgraphViewSelector.cpp", 105 "src/armnn/Tensor.cpp", 106 "src/armnn/Threadpool.cpp", 107 "src/armnn/TypesUtils.cpp", 108 "src/armnn/Utils.cpp", 109 "src/armnn/WallClockTimer.cpp", 110 "src/armnn/WorkingMemHandle.cpp", 111 "src/armnnUtils/CompatibleTypes.cpp", 112 "src/armnnUtils/DataLayoutIndexed.cpp", 113 "src/armnnUtils/DotSerializer.cpp", 114 "src/armnnUtils/FloatingPointConverter.cpp", 115 "src/armnnUtils/HeapProfiling.cpp", 116 "src/armnnUtils/LeakChecking.cpp", 117 "src/armnnUtils/ParserHelper.cpp", 118 "src/armnnUtils/Permute.cpp", 119 "src/armnnUtils/TensorUtils.cpp", 120 "src/armnnUtils/VerificationHelpers.cpp", 121 "src/armnnUtils/Filesystem.cpp", 122 "src/armnnUtils/ProfilingOptionsConverter.cpp", 123 "src/armnnUtils/Transpose.cpp", 124 "src/armnn/layers/ActivationLayer.cpp", 125 "src/armnn/layers/AdditionLayer.cpp", 126 "src/armnn/layers/ArgMinMaxLayer.cpp", 127 "src/armnn/layers/BatchMatMulLayer.cpp", 128 "src/armnn/layers/BatchNormalizationLayer.cpp", 129 "src/armnn/layers/BatchToSpaceNdLayer.cpp", 130 "src/armnn/layers/CastLayer.cpp", 131 "src/armnn/layers/ChannelShuffleLayer.cpp", 132 "src/armnn/layers/ComparisonLayer.cpp", 133 "src/armnn/layers/ConcatLayer.cpp", 134 "src/armnn/layers/ConstantLayer.cpp", 135 "src/armnn/layers/Convolution2dLayer.cpp", 136 "src/armnn/layers/Convolution3dLayer.cpp", 137 "src/armnn/layers/ConvertFp16ToFp32Layer.cpp", 138 "src/armnn/layers/ConvertFp32ToFp16Layer.cpp", 139 "src/armnn/layers/DebugLayer.cpp", 140 "src/armnn/layers/DepthToSpaceLayer.cpp", 141 "src/armnn/layers/DepthwiseConvolution2dLayer.cpp", 142 "src/armnn/layers/DequantizeLayer.cpp", 143 "src/armnn/layers/DetectionPostProcessLayer.cpp", 144 "src/armnn/layers/DivisionLayer.cpp", 145 "src/armnn/layers/ElementwiseBaseLayer.cpp", 146 "src/armnn/layers/ElementwiseBinaryLayer.cpp", 147 "src/armnn/layers/ElementwiseUnaryLayer.cpp", 148 "src/armnn/layers/FakeQuantizationLayer.cpp", 149 "src/armnn/layers/FillLayer.cpp", 150 "src/armnn/layers/FloorLayer.cpp", 151 "src/armnn/layers/FullyConnectedLayer.cpp", 152 "src/armnn/layers/GatherLayer.cpp", 153 "src/armnn/layers/GatherNdLayer.cpp", 154 "src/armnn/layers/InputLayer.cpp", 155 "src/armnn/layers/InstanceNormalizationLayer.cpp", 156 "src/armnn/layers/L2NormalizationLayer.cpp", 157 "src/armnn/layers/LogicalBinaryLayer.cpp", 158 "src/armnn/layers/LogSoftmaxLayer.cpp", 159 "src/armnn/layers/LstmLayer.cpp", 160 "src/armnn/layers/MapLayer.cpp", 161 "src/armnn/layers/MaximumLayer.cpp", 162 "src/armnn/layers/MeanLayer.cpp", 163 "src/armnn/layers/MemCopyLayer.cpp", 164 "src/armnn/layers/MemImportLayer.cpp", 165 "src/armnn/layers/MergeLayer.cpp", 166 "src/armnn/layers/MinimumLayer.cpp", 167 "src/armnn/layers/MultiplicationLayer.cpp", 168 "src/armnn/layers/NormalizationLayer.cpp", 169 "src/armnn/layers/OutputLayer.cpp", 170 "src/armnn/layers/PadLayer.cpp", 171 "src/armnn/layers/PermuteLayer.cpp", 172 "src/armnn/layers/Pooling2dLayer.cpp", 173 "src/armnn/layers/Pooling3dLayer.cpp", 174 "src/armnn/layers/PreCompiledLayer.cpp", 175 "src/armnn/layers/PreluLayer.cpp", 176 "src/armnn/layers/QLstmLayer.cpp", 177 "src/armnn/layers/QuantizeLayer.cpp", 178 "src/armnn/layers/QuantizedLstmLayer.cpp", 179 "src/armnn/layers/RankLayer.cpp", 180 "src/armnn/layers/ReduceLayer.cpp", 181 "src/armnn/layers/ReshapeLayer.cpp", 182 "src/armnn/layers/ResizeLayer.cpp", 183 "src/armnn/layers/ShapeLayer.cpp", 184 "src/armnn/layers/SliceLayer.cpp", 185 "src/armnn/layers/SoftmaxLayer.cpp", 186 "src/armnn/layers/SpaceToBatchNdLayer.cpp", 187 "src/armnn/layers/SpaceToDepthLayer.cpp", 188 "src/armnn/layers/SplitterLayer.cpp", 189 "src/armnn/layers/StackLayer.cpp", 190 "src/armnn/layers/StandInLayer.cpp", 191 "src/armnn/layers/StridedSliceLayer.cpp", 192 "src/armnn/layers/SubtractionLayer.cpp", 193 "src/armnn/layers/SwitchLayer.cpp", 194 "src/armnn/layers/TransposeConvolution2dLayer.cpp", 195 "src/armnn/layers/TransposeLayer.cpp", 196 "src/armnn/layers/UnidirectionalSequenceLstmLayer.cpp", 197 "src/armnn/layers/UnmapLayer.cpp", 198 "src/armnnSerializer/Serializer.cpp", 199 "src/armnnSerializer/SerializerUtils.cpp", 200 "src/armnnDeserializer/Deserializer.cpp", 201] 202 203GPU_BACKEND_SOURCES = [ 204 "src/backends/aclCommon/ArmComputeTuningUtils.cpp", 205 "src/backends/cl/ClBackend.cpp", 206 "src/backends/cl/ClBackendContext.cpp", 207 "src/backends/cl/ClBackendModelContext.cpp", 208 "src/backends/cl/ClContextControl.cpp", 209 "src/backends/cl/ClContextDeserializer.cpp", 210 "src/backends/cl/ClContextSerializer.cpp", 211 "src/backends/cl/ClImportTensorHandleFactory.cpp", 212 "src/backends/cl/ClLayerSupport.cpp", 213 "src/backends/cl/ClRegistryInitializer.cpp", 214 "src/backends/cl/ClTensorHandleFactory.cpp", 215 "src/backends/cl/ClWorkloadFactory.cpp", 216 "src/backends/cl/OpenClTimer.cpp", 217 "src/backends/cl/workloads/ClAbsWorkload.cpp", 218 "src/backends/cl/workloads/ClActivationWorkload.cpp", 219 "src/backends/cl/workloads/ClAdditionWorkload.cpp", 220 "src/backends/cl/workloads/ClArgMinMaxWorkload.cpp", 221 "src/backends/cl/workloads/ClBatchMatMulWorkload.cpp", 222 "src/backends/cl/workloads/ClBatchNormalizationFloatWorkload.cpp", 223 "src/backends/cl/workloads/ClBatchToSpaceNdWorkload.cpp", 224 "src/backends/cl/workloads/ClCastWorkload.cpp", 225 "src/backends/cl/workloads/ClChannelShuffleWorkload.cpp", 226 "src/backends/cl/workloads/ClComparisonWorkload.cpp", 227 "src/backends/cl/workloads/ClConcatWorkload.cpp", 228 "src/backends/cl/workloads/ClConstantWorkload.cpp", 229 "src/backends/cl/workloads/ClConvertFp16ToFp32Workload.cpp", 230 "src/backends/cl/workloads/ClConvertFp32ToFp16Workload.cpp", 231 "src/backends/cl/workloads/ClConvolution2dWorkload.cpp", 232 "src/backends/cl/workloads/ClConvolution3dWorkload.cpp", 233 "src/backends/cl/workloads/ClDepthToSpaceWorkload.cpp", 234 "src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp", 235 "src/backends/cl/workloads/ClDequantizeWorkload.cpp", 236 "src/backends/cl/workloads/ClDivisionWorkload.cpp", 237 "src/backends/cl/workloads/ClExpWorkload.cpp", 238 "src/backends/cl/workloads/ClFillWorkload.cpp", 239 "src/backends/cl/workloads/ClFloorFloatWorkload.cpp", 240 "src/backends/cl/workloads/ClFullyConnectedWorkload.cpp", 241 "src/backends/cl/workloads/ClGatherWorkload.cpp", 242 "src/backends/cl/workloads/ClGatherNdWorkload.cpp", 243 "src/backends/cl/workloads/ClInstanceNormalizationWorkload.cpp", 244 "src/backends/cl/workloads/ClL2NormalizationFloatWorkload.cpp", 245 "src/backends/cl/workloads/ClLogWorkload.cpp", 246 "src/backends/cl/workloads/ClLogicalAndWorkload.cpp", 247 "src/backends/cl/workloads/ClLogicalNotWorkload.cpp", 248 "src/backends/cl/workloads/ClLogicalOrWorkload.cpp", 249 "src/backends/cl/workloads/ClLogSoftmaxWorkload.cpp", 250 "src/backends/cl/workloads/ClLstmFloatWorkload.cpp", 251 "src/backends/cl/workloads/ClMaximumWorkload.cpp", 252 "src/backends/cl/workloads/ClMeanWorkload.cpp", 253 "src/backends/cl/workloads/ClMinimumWorkload.cpp", 254 "src/backends/cl/workloads/ClMultiplicationWorkload.cpp", 255 "src/backends/cl/workloads/ClNegWorkload.cpp", 256 "src/backends/cl/workloads/ClNormalizationFloatWorkload.cpp", 257 "src/backends/cl/workloads/ClPadWorkload.cpp", 258 "src/backends/cl/workloads/ClPermuteWorkload.cpp", 259 "src/backends/cl/workloads/ClPooling2dWorkload.cpp", 260 "src/backends/cl/workloads/ClPooling3dWorkload.cpp", 261 "src/backends/cl/workloads/ClPreluWorkload.cpp", 262 "src/backends/cl/workloads/ClQLstmWorkload.cpp", 263 "src/backends/cl/workloads/ClQuantizedLstmWorkload.cpp", 264 "src/backends/cl/workloads/ClQuantizeWorkload.cpp", 265 "src/backends/cl/workloads/ClReduceWorkload.cpp", 266 "src/backends/cl/workloads/ClReshapeWorkload.cpp", 267 "src/backends/cl/workloads/ClResizeWorkload.cpp", 268 "src/backends/cl/workloads/ClRsqrtWorkload.cpp", 269 "src/backends/cl/workloads/ClSinWorkload.cpp", 270 "src/backends/cl/workloads/ClSliceWorkload.cpp", 271 "src/backends/cl/workloads/ClSoftmaxWorkload.cpp", 272 "src/backends/cl/workloads/ClSpaceToBatchNdWorkload.cpp", 273 "src/backends/cl/workloads/ClSpaceToDepthWorkload.cpp", 274 "src/backends/cl/workloads/ClSplitterWorkload.cpp", 275 "src/backends/cl/workloads/ClSqrtWorkload.cpp", 276 "src/backends/cl/workloads/ClStackWorkload.cpp", 277 "src/backends/cl/workloads/ClStridedSliceWorkload.cpp", 278 "src/backends/cl/workloads/ClSubtractionWorkload.cpp", 279 "src/backends/cl/workloads/ClTransposeConvolution2dWorkload.cpp", 280 "src/backends/cl/workloads/ClTransposeWorkload.cpp", 281 "src/backends/cl/workloads/ClUnidirectionalSequenceLstmFloatWorkload.cpp", 282] 283 284ARMNN_CFLAGS = [ 285 "-std=c++17", 286 "-fexceptions", 287 "-Wno-unused-parameter", 288 "-DFMT_HEADER_ONLY", 289 "-Wno-ignored-qualifiers", 290 "-Wno-macro-redefined", 291 "-Wno-unreachable-code-loop-increment", 292 "-DARMCOMPUTECL_ENABLED", // TODO: ifeq ($(ARMNN_COMPUTE_CL_ENABLED),1) 293 "-DARMNN_MIXED_PRECISION_FP16_POOLING", 294] 295 296package { 297 // See: http://go/android-license-faq 298 default_applicable_licenses: [ 299 "external_armnn_license", 300 ], 301} 302 303license { 304 name: "external_armnn_license", 305 visibility: [":__subpackages__"], 306 license_kinds: [ 307 "SPDX-license-identifier-BSD", 308 "SPDX-license-identifier-BSL-1.0", 309 "SPDX-license-identifier-MIT", 310 "SPDX-license-identifier-PSF-2.0", 311 "legacy_unencumbered", 312 ], 313 license_text: [ 314 "LICENSE", 315 ], 316} 317 318// cc_library_shared { 319cc_library_static { 320 name: "libarmnn", 321 rtti: true, 322 323 enabled : false, 324 arch: { 325 arm: { 326 enabled : true, 327 }, 328 arm64: { 329 enabled : true, 330 }, 331 }, 332 333 defaults: [ 334 "neuralnetworks_cl_defaults", 335 ], 336 337 local_include_dirs: [ 338 "generated", 339 "profiling", 340 "profiling/common/include", 341 "profiling/client/include", 342 "include", 343 "src/timelineDecoder", 344 "third-party", 345 "src", 346 "src/armnn", 347 "src/armnnUtils", 348 "src/profiling", 349 "src/backends", 350 "src/armnnSerializer", 351 "src/armnnDeserializer", 352 ], 353 354 include_dirs: [ 355 "external/ComputeLibrary", 356 ], 357 358 static_libs: [ 359 "libflatbuffers-cpp", 360 ], 361 362 whole_static_libs: [ 363 "arm_compute_library", 364 ], 365 366 shared_libs: ["liblog"], 367 368 ldflags: ["-Wl,-Map=libarmnnMapFile.map"], 369 370 cflags: ARMNN_CFLAGS + [ 371 "-DARMCOMPUTECL_ENABLED", 372 ], 373 374 srcs: ARMNN_SOURCES + COMMON_SOURCES + GPU_BACKEND_SOURCES, 375} 376