blob: 159ceee96712321211d663a212150cdd4dd3e331 [file] [log] [blame]
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -07001/*
2 * Copyright 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Bob Badourb12f1782021-02-26 03:03:27 -080017package {
Bob Badour58f681f2022-01-24 17:45:12 -080018 // Inherits all licenses from parent to get Apache 2.0 and package name
19 default_applicable_licenses: [
20 "packages_modules_NeuralNetworks_license",
21 ],
Bob Badourb12f1782021-02-26 03:03:27 -080022}
23
Jean-Luc Brouillet873c0082017-07-25 00:17:50 -070024cc_library_headers {
25 name: "libneuralnetworks_common_headers",
Ray Hernandeza8564282021-08-11 21:29:20 +000026 host_supported: true,
Jean-Luc Brouillet873c0082017-07-25 00:17:50 -070027 export_include_dirs: ["include"],
28}
29
Chih-Hung Hsiehcebf3e92021-09-17 11:45:15 -070030// The following files took too much time to compile with clang-tidy.
31tidy_disabled_common_operations_files = [
Michael Butler762af8c2022-03-08 21:01:17 -080032 "cpu_operations/Activation.cpp",
33 "cpu_operations/Broadcast.cpp",
34 "cpu_operations/Concatenation.cpp",
35 "cpu_operations/Conv2D.cpp",
36 "cpu_operations/FullyConnected.cpp",
37 "cpu_operations/L2Normalization.cpp",
38 "cpu_operations/LocalResponseNormalization.cpp",
39 "cpu_operations/PRelu.cpp",
40 "cpu_operations/Pooling.cpp",
41 "cpu_operations/Reshape.cpp",
42 "cpu_operations/SimpleMath.cpp",
43 "cpu_operations/Softmax.cpp",
44 "cpu_operations/Transpose.cpp",
Chih-Hung Hsiehcebf3e92021-09-17 11:45:15 -070045]
46
Slava Shklyaeva6944252018-11-06 15:32:44 +000047cc_defaults {
48 name: "neuralnetworks_operations",
Ray Hernandeza8564282021-08-11 21:29:20 +000049 host_supported: true,
Michael Butler762af8c2022-03-08 21:01:17 -080050 local_include_dirs: ["types/operations/include"],
Slava Shklyaeva6944252018-11-06 15:32:44 +000051 srcs: [
52 "OperationResolver.cpp",
Michael Butler762af8c2022-03-08 21:01:17 -080053 "cpu_operations/Activation.cpp",
54 "cpu_operations/BatchMatmul.cpp",
55 "cpu_operations/BidirectionalSequenceRNN.cpp",
56 "cpu_operations/Broadcast.cpp",
57 "cpu_operations/ChannelShuffle.cpp",
58 "cpu_operations/Comparisons.cpp",
59 "cpu_operations/Concatenation.cpp",
60 "cpu_operations/Conv2D.cpp",
61 "cpu_operations/Densify.cpp",
62 "cpu_operations/DepthwiseConv2D.cpp",
63 "cpu_operations/Dequantize.cpp",
64 "cpu_operations/Elementwise.cpp",
65 "cpu_operations/Elu.cpp",
66 "cpu_operations/Fill.cpp",
67 "cpu_operations/FullyConnected.cpp",
68 "cpu_operations/Gather.cpp",
69 "cpu_operations/GenerateProposals.cpp",
70 "cpu_operations/HeatmapMaxKeypoint.cpp",
71 "cpu_operations/InstanceNormalization.cpp",
72 "cpu_operations/L2Normalization.cpp",
73 "cpu_operations/LocalResponseNormalization.cpp",
74 "cpu_operations/LogSoftmax.cpp",
75 "cpu_operations/LogicalAndOr.cpp",
76 "cpu_operations/LogicalNot.cpp",
77 "cpu_operations/MirrorPad.cpp",
78 "cpu_operations/Neg.cpp",
79 "cpu_operations/PRelu.cpp",
80 "cpu_operations/Pack.cpp",
81 "cpu_operations/Pooling.cpp",
82 "cpu_operations/QLSTM.cpp",
83 "cpu_operations/Quantize.cpp",
84 "cpu_operations/Rank.cpp",
85 "cpu_operations/Reduce.cpp",
86 "cpu_operations/ResizeImageOps.cpp",
87 "cpu_operations/Reverse.cpp",
88 "cpu_operations/RoiAlign.cpp",
89 "cpu_operations/RoiPooling.cpp",
90 "cpu_operations/Select.cpp",
91 "cpu_operations/Slice.cpp",
92 "cpu_operations/Softmax.cpp",
93 "cpu_operations/Squeeze.cpp",
94 "cpu_operations/StridedSlice.cpp",
95 "cpu_operations/TopK_V2.cpp",
96 "cpu_operations/Transpose.cpp",
97 "cpu_operations/TransposeConv2D.cpp",
98 "cpu_operations/UnidirectionalSequenceLSTM.cpp",
99 "cpu_operations/UnidirectionalSequenceRNN.cpp",
Slava Shklyaeva6944252018-11-06 15:32:44 +0000100 ],
Chih-Hung Hsiehcebf3e92021-09-17 11:45:15 -0700101 tidy_disabled_srcs: tidy_disabled_common_operations_files,
Slava Shklyaeva6944252018-11-06 15:32:44 +0000102}
103
Michael Butler8e5fb872021-10-28 01:54:26 +0000104// libneuralnetworks_common* provides common utilities for the NNAPI runtime, drivers, and tests to
Michael Butler1e3b3f82021-11-15 13:21:17 -0800105// use. Two variants of the common library are provided:
Michael Butlera671aa92021-11-03 21:55:59 -0700106// - libneuralnetworks_common: the common library, used by NNAPI runtime and tests.
107// - libneuralnetworks_common_experimental: the common library with NN_EXPERIMENTAL_FEATURE flag
108// turned on, used by NNAPI drivers and tests for experimental features.
Michael Butler8e5fb872021-10-28 01:54:26 +0000109//
Michael Butler1e3b3f82021-11-15 13:21:17 -0800110// Both variants of the common library also link against all versions (1.0-3) of the NNAPI HIDL
Michael Butlera671aa92021-11-03 21:55:59 -0700111// library.
Michael Butler8e5fb872021-10-28 01:54:26 +0000112//
rayhdez06a60972021-08-13 22:46:33 +0000113cc_defaults {
Michael Butler6852e832021-11-01 17:50:09 -0700114 name: "libneuralnetworks_common_defaults",
Michael Butler4aba01d2019-07-26 12:33:07 -0700115 defaults: [
116 "neuralnetworks_defaults",
117 "neuralnetworks_operations",
118 ],
Ray Hernandeza8564282021-08-11 21:29:20 +0000119 host_supported: true,
Przemyslaw Szczepaniak739ca9e2020-02-05 14:36:44 +0000120 apex_available: [
Slava Shklyaevfec92812020-02-13 13:07:44 +0000121 "//apex_available:platform",
Przemyslaw Szczepaniak739ca9e2020-02-05 14:36:44 +0000122 "com.android.neuralnetworks",
123 "test_com.android.neuralnetworks",
124 ],
Yifan Hongd1b6f902017-07-27 16:15:02 -0700125 vendor_available: true,
Miao Wangccab3f42018-06-18 23:32:17 -0700126 // b/109953668, disable OpenMP
127 // openmp: true,
Michael K. Sandersecba4dd2018-12-07 14:30:34 +0000128 export_include_dirs: [
129 "include",
130 ],
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700131 srcs: [
Michael Butler9c003ce2021-12-15 16:03:18 -0800132 "ActivationFunctor.cpp",
Xusong Wangaeb9cf52020-02-03 16:24:35 -0800133 "BufferTracker.cpp",
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700134 "CpuExecutor.cpp",
Michael Butler8a6edbd2019-01-17 17:54:51 -0800135 "ExecutionBurstController.cpp",
136 "ExecutionBurstServer.cpp",
David Gross7ba34632017-12-04 11:29:28 -0800137 "GraphDump.cpp",
Michael Butler5cbc18a2021-01-06 20:00:06 -0800138 "HalBufferTracker.cpp",
Slava Shklyaev52d535c2018-10-30 12:17:23 +0000139 "IndexedShapeWrapper.cpp",
Slava Shklyaev5d85d5a2020-11-16 12:24:07 +0000140 "LegacyHalUtils.cpp",
Slava Shklyaevd5dd4342020-11-13 14:12:24 +0000141 "LegacyUtils.cpp",
Slava Shklyaev79534bc2019-05-22 11:10:13 +0100142 "MemoryUtils.cpp",
David Gross25ffe522019-07-26 14:39:14 -0700143 "MetaModel.cpp",
Michael Butler9e8def62022-01-12 18:18:27 -0800144 "ModelUtils.cpp",
Michael Butlerad444962022-01-31 13:30:14 -0800145 "OperationsExecutionUtils.cpp",
Viet Dangd0137f72019-12-04 16:18:08 +0000146 "QuantUtils.cpp",
Xusong Wang81f3feb2019-01-14 18:53:00 -0800147 "TokenHasher.cpp",
Jean-Luc Brouilletc6af0942017-10-11 22:28:55 -0700148 "ValidateHal.cpp",
Michael Butler762af8c2022-03-08 21:01:17 -0800149 "cpu_operations/ArgMinMax.cpp",
150 "cpu_operations/BidirectionalSequenceLSTM.cpp",
151 "cpu_operations/Cast.cpp",
152 "cpu_operations/EmbeddingLookup.cpp",
153 "cpu_operations/ExpandDims.cpp",
154 "cpu_operations/GroupedConv2D.cpp",
155 "cpu_operations/HashtableLookup.cpp",
156 "cpu_operations/LSHProjection.cpp",
157 "cpu_operations/LSTM.cpp",
158 "cpu_operations/MaximumMinimum.cpp",
159 "cpu_operations/Multinomial.cpp",
160 "cpu_operations/Pow.cpp",
161 "cpu_operations/QuantizedLSTM.cpp",
162 "cpu_operations/RNN.cpp",
163 "cpu_operations/Reshape.cpp",
164 "cpu_operations/SVDF.cpp",
165 "cpu_operations/SimpleMath.cpp",
166 "cpu_operations/Split.cpp",
167 "cpu_operations/Tile.cpp",
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700168 ],
Jean-Luc Brouillet873c0082017-07-25 00:17:50 -0700169 shared_libs: [
Jean-Luc Brouillet873c0082017-07-25 00:17:50 -0700170 "android.hardware.neuralnetworks@1.0",
Michael Butler307d4012018-01-23 11:05:43 -0800171 "android.hardware.neuralnetworks@1.1",
Slava Shklyaev2be33b02018-09-14 13:34:31 +0100172 "android.hardware.neuralnetworks@1.2",
Lev Proleev26f67052019-09-11 11:21:46 +0100173 "android.hardware.neuralnetworks@1.3",
Jean-Luc Brouillet873c0082017-07-25 00:17:50 -0700174 "android.hidl.allocator@1.0",
175 "android.hidl.memory@1.0",
Michael Butler4aba01d2019-07-26 12:33:07 -0700176 "libbase",
177 "libcutils",
178 "libfmq",
179 "libhidlbase",
180 "libhidlmemory",
Michael Butler4aba01d2019-07-26 12:33:07 -0700181 "liblog",
Michael Butler4aba01d2019-07-26 12:33:07 -0700182 "libutils",
Jean-Luc Brouillet873c0082017-07-25 00:17:50 -0700183 ],
Ray Hernandeza8564282021-08-11 21:29:20 +0000184 target: {
185 android: {
186 shared_libs: ["libnativewindow"],
187 },
188 host: {
189 cflags: [
Ray Hernandeza8564282021-08-11 21:29:20 +0000190 "-D__INTRODUCED_IN(x)=",
Ray Hernandeza8564282021-08-11 21:29:20 +0000191 ],
192 },
193 },
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700194 header_libs: [
Michael Butler4aba01d2019-07-26 12:33:07 -0700195 "gemmlowp_headers",
196 "libeigen",
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700197 "libneuralnetworks_headers",
Yang Ni43656612017-08-22 16:18:50 -0700198 "libtextclassifier_hash_headers",
Michael K. Sandersa9f0fa62018-09-25 11:53:55 +0100199 "philox_random_headers",
Miao Wang658dc372017-12-14 15:01:31 -0800200 "tensorflow_headers",
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700201 ],
Miao Wang658dc372017-12-14 15:01:31 -0800202 whole_static_libs: [
Miao Wang484e9702019-01-16 13:42:15 -0800203 "libarect",
Miao Wang658dc372017-12-14 15:01:31 -0800204 "libtflite_kernel_utils",
Slava Shklyaev9f29f432020-08-13 13:16:03 +0100205 "neuralnetworks_types",
206 "neuralnetworks_utils_hal_1_0", // TODO(b/160669116): Remove VNDK dependencies.
207 "neuralnetworks_utils_hal_1_1",
208 "neuralnetworks_utils_hal_1_2",
209 "neuralnetworks_utils_hal_1_3",
210 "neuralnetworks_utils_hal_common",
Michael K. Sandersa9f0fa62018-09-25 11:53:55 +0100211 "philox_random",
Miao Wang658dc372017-12-14 15:01:31 -0800212 ],
Przemyslaw Szczepaniak303ab572020-01-31 16:50:59 +0000213 static_libs: [
214 "libcrypto_static",
Lev Proleev82112fb2021-02-25 13:36:02 +0000215 "libruy_static",
Przemyslaw Szczepaniak303ab572020-01-31 16:50:59 +0000216 "libtextclassifier_hash_static",
Michael Butlerad444962022-01-31 13:30:14 -0800217 "neuralnetworks_types",
Przemyslaw Szczepaniak303ab572020-01-31 16:50:59 +0000218 ],
Miao Wang9d04c2d2017-07-25 17:06:18 -0700219 cflags: [
Yang Ni43656612017-08-22 16:18:50 -0700220 "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
Michael Butler4aba01d2019-07-26 12:33:07 -0700221 "-DNN_INCLUDE_CPU_IMPLEMENTATION",
Miao Wang4eaedb22019-01-17 20:11:20 -0800222 "-DTF_LITE_DISABLE_X86_NEON",
Miao Wang9d04c2d2017-07-25 17:06:18 -0700223 ],
Jean-Luc Brouilleta09d6992017-07-12 01:37:27 -0700224}
Yang Ni52d179b2017-08-21 11:16:39 -0700225
Michael Butler8e5fb872021-10-28 01:54:26 +0000226cc_library_static {
rayhdez06a60972021-08-13 22:46:33 +0000227 name: "libneuralnetworks_common",
Michael Butler8e5fb872021-10-28 01:54:26 +0000228 defaults: [
Michael Butler6852e832021-11-01 17:50:09 -0700229 "libneuralnetworks_common_defaults",
Michael Butler8e5fb872021-10-28 01:54:26 +0000230 ],
rayhdez06a60972021-08-13 22:46:33 +0000231}
232
233cc_library_static {
234 name: "libneuralnetworks_common_experimental",
Michael Butler8e5fb872021-10-28 01:54:26 +0000235 defaults: [
Michael Butler6852e832021-11-01 17:50:09 -0700236 "libneuralnetworks_common_defaults",
Michael Butler8e5fb872021-10-28 01:54:26 +0000237 ],
Michael Butler0da83872021-11-05 14:20:12 -0700238 exclude_static_libs: [
239 "neuralnetworks_types",
240 ],
241 static_libs: [
242 "neuralnetworks_types_experimental",
243 ],
Michael Butler8e5fb872021-10-28 01:54:26 +0000244 cflags: [
245 "-DNN_EXPERIMENTAL_FEATURE",
246 ],
rayhdez06a60972021-08-13 22:46:33 +0000247}
248
Stefano Galarraga8ec28fb2019-06-27 09:52:09 +0100249cc_defaults {
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000250 name: "neuralnetworks_cl_defaults",
251 host_supported: false,
252 vendor_available: false,
253 stl: "libc++_static",
254 sdk_version: "current",
Slava Shklyaev458b5642021-02-25 10:47:08 +0000255 min_sdk_version: "29",
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000256 cflags: [
257 "-DNN_COMPATIBILITY_LIBRARY_BUILD",
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000258 ],
259}
260
Slava Shklyaev84829a92021-02-26 12:05:38 +0000261cc_defaults {
262 name: "libneuralnetworks_common_cl_defaults",
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000263 defaults: [
264 "neuralnetworks_cl_defaults",
265 "neuralnetworks_defaults",
266 "neuralnetworks_operations",
267 ],
Ray Hernandeza8564282021-08-11 21:29:20 +0000268 host_supported: false,
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000269 apex_available: [
270 "//apex_available:platform",
271 "com.android.neuralnetworks",
272 "test_com.android.neuralnetworks",
273 ],
274 // b/109953668, disable OpenMP
275 // openmp: true,
276 export_include_dirs: [
277 "include",
278 ],
279 srcs: [
280 "BufferTracker.cpp",
281 "CpuExecutor.cpp",
282 "GraphDump.cpp",
283 "IndexedShapeWrapper.cpp",
284 "LegacyUtils.cpp",
285 "MetaModel.cpp",
Michael Butler9e8def62022-01-12 18:18:27 -0800286 "ModelUtils.cpp",
Michael Butlerad444962022-01-31 13:30:14 -0800287 "OperationsExecutionUtils.cpp",
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000288 "TokenHasher.cpp",
289 ],
290 header_libs: [
291 "libneuralnetworks_headers_ndk",
292 ],
293 static_libs: [
294 "libbase_ndk",
295 "libcrypto_static",
Michael Butlerad444962022-01-31 13:30:14 -0800296 "neuralnetworks_types_cl",
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000297 ],
298 shared_libs: [
299 "libnativewindow",
300 ],
301 cflags: [
302 "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
303 "-DTF_LITE_DISABLE_X86_NEON",
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000304 ],
305}
306
Slava Shklyaev84829a92021-02-26 12:05:38 +0000307cc_library_static {
308 name: "libneuralnetworks_common_cl",
309 defaults: ["libneuralnetworks_common_cl_defaults"],
310}
311
312cc_library_static {
313 name: "libneuralnetworks_common_cl_cpu",
314 defaults: ["libneuralnetworks_common_cl_defaults"],
Michael Butler762af8c2022-03-08 21:01:17 -0800315 local_include_dirs: ["types/operations/include"],
Slava Shklyaev84829a92021-02-26 12:05:38 +0000316 header_libs: [
317 "gemmlowp_headers",
318 "libeigen",
319 "libruy_headers",
320 "libtextclassifier_hash_headers",
321 "philox_random_headers",
322 "tensorflow_headers",
323 ],
324 whole_static_libs: [
Michael Butlerc96ab332022-02-02 18:16:41 -0800325 "philox_random_cl",
Slava Shklyaev84829a92021-02-26 12:05:38 +0000326 ],
327 static_libs: [
328 "libcrypto_static",
329 "libtextclassifier_hash_static",
330 ],
331 srcs: [
Michael Butler9c003ce2021-12-15 16:03:18 -0800332 "ActivationFunctor.cpp",
Slava Shklyaev84829a92021-02-26 12:05:38 +0000333 "QuantUtils.cpp",
Michael Butler762af8c2022-03-08 21:01:17 -0800334 "cpu_operations/ArgMinMax.cpp",
335 "cpu_operations/BidirectionalSequenceLSTM.cpp",
336 "cpu_operations/Cast.cpp",
337 "cpu_operations/EmbeddingLookup.cpp",
338 "cpu_operations/ExpandDims.cpp",
339 "cpu_operations/GroupedConv2D.cpp",
340 "cpu_operations/HashtableLookup.cpp",
341 "cpu_operations/LSHProjection.cpp",
342 "cpu_operations/LSTM.cpp",
343 "cpu_operations/MaximumMinimum.cpp",
344 "cpu_operations/Multinomial.cpp",
345 "cpu_operations/Pow.cpp",
346 "cpu_operations/QuantizedLSTM.cpp",
347 "cpu_operations/RNN.cpp",
348 "cpu_operations/Reshape.cpp",
349 "cpu_operations/SVDF.cpp",
350 "cpu_operations/SimpleMath.cpp",
351 "cpu_operations/Split.cpp",
352 "cpu_operations/Tile.cpp",
Slava Shklyaev84829a92021-02-26 12:05:38 +0000353 ],
354 cflags: [
355 "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
356 "-DNN_COMPATIBILITY_LIBRARY_BUILD",
357 "-DNN_INCLUDE_CPU_IMPLEMENTATION",
358 "-DTF_LITE_DISABLE_X86_NEON",
Slava Shklyaev84829a92021-02-26 12:05:38 +0000359 ],
360}
361
Slava Shklyaevc958cd82020-12-10 16:55:55 +0000362cc_defaults {
Stefano Galarraga8ec28fb2019-06-27 09:52:09 +0100363 name: "NeuralNetworksTest_common",
Michael Butler8e5fb872021-10-28 01:54:26 +0000364 defaults: [
365 "neuralnetworks_float16",
366 "neuralnetworks_use_latest_utils_hal_aidl",
367 ],
Ray Hernandeza8564282021-08-11 21:29:20 +0000368 host_supported: true,
Yang Ni4e28bc12017-08-11 16:09:51 -0700369 shared_libs: [
Michael K. Sandersa9f0fa62018-09-25 11:53:55 +0100370 "android.hidl.allocator@1.0",
371 "android.hidl.memory@1.0",
Ray Hernandeza8564282021-08-11 21:29:20 +0000372 "libcutils",
Przemyslaw Szczepaniakec8a3bd2019-09-19 17:40:18 +0100373 "libhidlbase",
Michael Butler4aba01d2019-07-26 12:33:07 -0700374 "libhidlmemory",
Michael Butler4aba01d2019-07-26 12:33:07 -0700375 "libneuralnetworks",
Przemyslaw Szczepaniakb1de3cc2019-09-04 10:36:58 +0100376 "libneuralnetworks_packageinfo",
Xusong Wang40c9f592020-07-31 16:12:31 -0700377 "libutils",
Yang Ni4e28bc12017-08-11 16:09:51 -0700378 ],
379 static_libs: [
Przemyslaw Szczepaniakec8a3bd2019-09-19 17:40:18 +0100380 "android.hardware.neuralnetworks@1.0",
381 "android.hardware.neuralnetworks@1.1",
382 "android.hardware.neuralnetworks@1.2",
Lev Proleev26f67052019-09-11 11:21:46 +0100383 "android.hardware.neuralnetworks@1.3",
Lev Proleev7f4d4c72018-11-08 12:06:38 +0000384 "libbase",
Yang Ni4e28bc12017-08-11 16:09:51 -0700385 "libgmock",
Lev Proleev7f4d4c72018-11-08 12:06:38 +0000386 "liblog",
Michael K. Sandersa9f0fa62018-09-25 11:53:55 +0100387 "libneuralnetworks_common",
Michael Butlerad444962022-01-31 13:30:14 -0800388 "neuralnetworks_types",
Yang Ni4e28bc12017-08-11 16:09:51 -0700389 ],
Ray Hernandeza8564282021-08-11 21:29:20 +0000390 target: {
391 android: {
392 shared_libs: [
393 "libnativewindow",
394 ],
395 },
396 host: {
397 cflags: [
398 "-D__ANDROID_API_S__=31",
Ray Hernandeza8564282021-08-11 21:29:20 +0000399 "-D__INTRODUCED_IN(n)=",
Ray Hernandeza8564282021-08-11 21:29:20 +0000400 ],
401 },
402 },
Michael Butler4aba01d2019-07-26 12:33:07 -0700403 local_include_dirs: ["include"],
Stefano Galarraga8ec28fb2019-06-27 09:52:09 +0100404}
405
406cc_test {
407 name: "NeuralNetworksTest_operations",
Michael Butler4aba01d2019-07-26 12:33:07 -0700408 defaults: ["NeuralNetworksTest_common"],
Michael Butler762af8c2022-03-08 21:01:17 -0800409 local_include_dirs: ["types/operations/include"],
Miao Wangba69adf2018-01-26 02:30:50 -0800410 srcs: [
Michael Butler762af8c2022-03-08 21:01:17 -0800411 "cpu_operations/*Test.cpp",
Yang Nia7b8f5d2017-08-11 14:29:39 -0700412 ],
Yang Ni9780bd62017-10-05 15:05:49 -0700413 header_libs: [
Lev Proleev8bd6eb72020-02-06 14:39:41 +0000414 "gemmlowp_headers",
Michael K. Sandersa9f0fa62018-09-25 11:53:55 +0100415 "libeigen",
416 "philox_random_headers",
Yang Ni9780bd62017-10-05 15:05:49 -0700417 "tensorflow_headers",
418 ],
Yang Nia7b8f5d2017-08-11 14:29:39 -0700419}
Lev Proleev8e3e09f2018-10-18 14:33:39 +0100420
421cc_test {
422 name: "NeuralNetworksTest_utils",
Michael Butler4aba01d2019-07-26 12:33:07 -0700423 defaults: ["NeuralNetworksTest_common"],
Lev Proleev8e3e09f2018-10-18 14:33:39 +0100424 srcs: [
425 "UtilsTest.cpp",
426 ],
Lev Proleev8e3e09f2018-10-18 14:33:39 +0100427 header_libs: [
Lev Proleev8bd6eb72020-02-06 14:39:41 +0000428 "gemmlowp_headers",
429 "libeigen",
Lev Proleev8e3e09f2018-10-18 14:33:39 +0100430 "tensorflow_headers",
431 ],
Lev Proleevbb24c9e2020-04-08 16:29:59 +0100432 test_suites: [
433 "general-tests",
434 ],
Stefano Galarraga8ec28fb2019-06-27 09:52:09 +0100435}
436
437cc_test {
438 name: "NeuralNetworksTest_logtag",
Michael Butler4aba01d2019-07-26 12:33:07 -0700439 defaults: ["NeuralNetworksTest_common"],
Stefano Galarraga8ec28fb2019-06-27 09:52:09 +0100440 srcs: [
441 "LogTagTest.cpp",
Michael Butler4aba01d2019-07-26 12:33:07 -0700442 "LogTagTestExtra.cpp",
Stefano Galarraga8ec28fb2019-06-27 09:52:09 +0100443 ],
Lev Proleev8e3e09f2018-10-18 14:33:39 +0100444}