123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- /*
- * Copyright 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- cc_library_headers {
- name: "libneuralnetworks_common_headers",
- host_supported: false,
- export_include_dirs: ["include"],
- }
- cc_defaults {
- name: "neuralnetworks_operations",
- srcs: [
- "OperationResolver.cpp",
- "operations/Activation.cpp",
- "operations/BidirectionalSequenceRNN.cpp",
- "operations/Broadcast.cpp",
- "operations/ChannelShuffle.cpp",
- "operations/Comparisons.cpp",
- "operations/Concatenation.cpp",
- "operations/Conv2D.cpp",
- "operations/Dequantize.cpp",
- "operations/Elementwise.cpp",
- "operations/FullyConnected.cpp",
- "operations/Gather.cpp",
- "operations/GenerateProposals.cpp",
- "operations/HeatmapMaxKeypoint.cpp",
- "operations/InstanceNormalization.cpp",
- "operations/L2Normalization.cpp",
- "operations/LogicalAndOr.cpp",
- "operations/LogicalNot.cpp",
- "operations/LogSoftmax.cpp",
- "operations/Neg.cpp",
- "operations/Pooling.cpp",
- "operations/PRelu.cpp",
- "operations/Quantize.cpp",
- "operations/Reduce.cpp",
- "operations/ResizeImageOps.cpp",
- "operations/RoiAlign.cpp",
- "operations/RoiPooling.cpp",
- "operations/Select.cpp",
- "operations/Slice.cpp",
- "operations/Softmax.cpp",
- "operations/Transpose.cpp",
- "operations/TransposeConv2D.cpp",
- "operations/UnidirectionalSequenceLSTM.cpp",
- "operations/UnidirectionalSequenceRNN.cpp",
- ],
- }
- cc_library_static {
- name: "libneuralnetworks_utils",
- defaults: ["neuralnetworks_defaults", "neuralnetworks_operations"],
- host_supported: false,
- vendor_available: true,
- export_include_dirs: ["include"],
- srcs: [
- "Utils.cpp",
- "ExecutionBurstController.cpp",
- "ExecutionBurstServer.cpp",
- ],
- header_libs: [
- "libneuralnetworks_headers",
- "libeigen",
- "gemmlowp_headers",
- "tensorflow_headers",
- ],
- shared_libs: [
- "libhidltransport",
- "libhidlmemory",
- "libnativewindow",
- "libfmq",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- ],
- whole_static_libs: [
- "libarect",
- ],
- cflags: [
- "-DTF_LITE_DISABLE_X86_NEON",
- "-Werror",
- "-Wall",
- "-Wextra",
- "-Wno-extern-c-compat",
- "-Wno-sign-compare",
- "-Wno-unused-local-typedef",
- "-Wno-unused-parameter",
- "-Wno-unused-private-field",
- "-Wno-unused-variable",
- "-Wno-invalid-partial-specialization",
- ],
- }
- cc_library_static {
- name: "libneuralnetworks_common",
- defaults: ["neuralnetworks_defaults", "neuralnetworks_operations"],
- host_supported: false,
- vendor_available: true,
- // b/109953668, disable OpenMP
- // openmp: true,
- export_include_dirs: [
- "include",
- ],
- srcs: [
- "CpuExecutor.cpp",
- "ExecutionBurstController.cpp",
- "ExecutionBurstServer.cpp",
- "GraphDump.cpp",
- "IndexedShapeWrapper.cpp",
- "OperationsUtils.cpp",
- "TokenHasher.cpp",
- "Utils.cpp",
- "ValidateHal.cpp",
- "operations/ArgMinMax.cpp",
- "operations/BidirectionalSequenceLSTM.cpp",
- "operations/Cast.cpp",
- "operations/DepthwiseConv2D.cpp",
- "operations/EmbeddingLookup.cpp",
- "operations/ExpandDims.cpp",
- "operations/GroupedConv2D.cpp",
- "operations/HashtableLookup.cpp",
- "operations/LSHProjection.cpp",
- "operations/LSTM.cpp",
- "operations/MaximumMinimum.cpp",
- "operations/Multinomial.cpp",
- "operations/Normalization.cpp",
- "operations/Pow.cpp",
- "operations/TopK_V2.cpp",
- "operations/QuantizedLSTM.cpp",
- "operations/Reshape.cpp",
- "operations/RNN.cpp",
- "operations/SimpleMath.cpp",
- "operations/Split.cpp",
- "operations/StridedSlice.cpp",
- "operations/SVDF.cpp",
- "operations/Tile.cpp",
- ],
- shared_libs: [
- "libbase",
- "libcutils",
- "libhidlbase",
- "libhidltransport",
- "libhidlmemory",
- "libnativewindow",
- "libfmq",
- "libtextclassifier_hash",
- "libui",
- "liblog",
- "libutils",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- ],
- static_libs: [
- "libcrypto_static",
- ],
- header_libs: [
- "libneuralnetworks_headers",
- "libtextclassifier_hash_headers",
- "libeigen",
- "gemmlowp_headers",
- "philox_random_headers",
- "tensorflow_headers",
- ],
- whole_static_libs: [
- "libarect",
- "libtflite_kernel_utils",
- "philox_random",
- ],
- cflags: [
- "-DNN_INCLUDE_CPU_IMPLEMENTATION",
- "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
- "-DTF_LITE_DISABLE_X86_NEON",
- "-Werror",
- "-Wall",
- "-Wextra",
- "-Wno-extern-c-compat",
- "-Wno-sign-compare",
- "-Wno-unused-local-typedef",
- "-Wno-unused-parameter",
- "-Wno-unused-private-field",
- "-Wno-unused-variable",
- "-Wno-invalid-partial-specialization",
- "-Wno-array-bounds",
- ],
- }
- cc_test {
- name: "NeuralNetworksTest_operations",
- shared_libs: [
- "libhidlmemory",
- "libnativewindow",
- "libneuralnetworks",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- ],
- static_libs: [
- "libbase",
- "libgmock",
- "liblog",
- "libneuralnetworks_common",
- ],
- cflags: [
- "-Wno-extern-c-compat",
- "-Wno-unused-parameter",
- "-Wno-invalid-partial-specialization",
- ],
- srcs: [
- "operations/*Test.cpp",
- ],
- local_include_dirs: [ "include" ],
- header_libs: [
- "libeigen",
- "philox_random_headers",
- "tensorflow_headers",
- ],
- }
- cc_test {
- name: "NeuralNetworksTest_utils",
- shared_libs: [
- "libhidlmemory",
- "libnativewindow",
- "libneuralnetworks",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- "[email protected]",
- ],
- static_libs: [
- "libbase",
- "libgmock",
- "liblog",
- "libneuralnetworks_common",
- ],
- cflags: [
- "-Wno-extern-c-compat",
- "-Wno-unused-variable",
- ],
- srcs: [
- "UtilsTest.cpp",
- ],
- local_include_dirs: [ "include" ],
- header_libs: [
- "tensorflow_headers",
- ],
- }
|