• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
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
17cc_library_headers {
18    name: "libneuralnetworks_common_headers",
19    host_supported: false,
20    export_include_dirs: ["include"],
21}
22
23cc_library_static {
24    name: "libneuralnetworks_common",
25    defaults: ["neuralnetworks_defaults"],
26    host_supported: false,
27    vendor_available: true,
28    export_include_dirs: ["include"],
29
30    srcs: [
31        "CpuExecutor.cpp",
32        "OperationsUtils.cpp",
33        "Utils.cpp",
34        "operations/Activation.cpp",
35        "operations/Concatenation.cpp",
36        "operations/Conv2D.cpp",
37        "operations/DepthwiseConv2D.cpp",
38        "operations/EmbeddingLookup.cpp",
39        "operations/FullyConnected.cpp",
40        "operations/HashtableLookup.cpp",
41        "operations/LSHProjection.cpp",
42        "operations/LSTM.cpp",
43        "operations/Normalization.cpp",
44        "operations/Pooling.cpp",
45        "operations/Reshape.cpp",
46        "operations/RNN.cpp",
47        "operations/SimpleMath.cpp",
48        "operations/SVDF.cpp",
49        "operations/internal/optimized/neon_tensor_utils.cc",
50        "operations/internal/reference/portable_tensor_utils.cc",
51        "operations/internal/tensor_utils.cc",
52    ],
53    shared_libs: [
54        "libbase",
55        "libhidlbase",
56        "libhidltransport",
57        "libhidlmemory",
58        "libtextclassifier_hash",
59        "liblog",
60        "libutils",
61        "android.hardware.neuralnetworks@1.0",
62        "android.hidl.allocator@1.0",
63        "android.hidl.memory@1.0",
64    ],
65    header_libs: [
66        "libneuralnetworks_headers",
67        "libgemmlowp",
68        "libfixedpoint",
69        "libtextclassifier_hash_headers",
70        "libeigen",
71    ],
72
73    cflags: [
74        "-DNAMESPACE_FOR_HASH_FUNCTIONS=farmhash",
75        "-Werror",
76        "-Wall",
77        "-Wextra",
78        "-Wno-unused-parameter",
79        "-Wno-unused-variable",
80    ],
81
82}
83
84cc_test {
85    name: "tensor_utils_test",
86    srcs: [
87        "operations/internal/tensor_utils_test.cc",
88    ],
89    shared_libs: [
90        "libneuralnetworks",
91    ],
92    local_include_dirs: [ "include" ],
93    header_libs: [
94        "libneuralnetworks_headers",
95    ],
96    static_libs: [
97        "libgmock",
98    ],
99}
100
101cc_test {
102    name: "embedding_lookup_test",
103    srcs: [
104        "operations/EmbeddingLookupTest.cpp",
105    ],
106    shared_libs: [
107        "libneuralnetworks",
108    ],
109    static_libs: [
110        "libgmock",
111    ],
112}
113
114cc_test {
115    name: "hashtable_lookup_test",
116    srcs: [
117        "operations/HashtableLookupTest.cpp",
118    ],
119    shared_libs: [
120        "libneuralnetworks",
121    ],
122    static_libs: [
123        "libgmock",
124    ],
125}
126
127cc_test {
128    name: "lsh_projection_test",
129    srcs: [
130        "operations/LSHProjectionTest.cpp",
131    ],
132    local_include_dirs: [ "include" ],
133    shared_libs: [
134        "libneuralnetworks",
135    ],
136    static_libs: [
137        "libgmock",
138    ],
139}
140
141cc_test {
142    name: "lstm_test",
143    srcs: [
144        "operations/LSTMTest.cpp",
145    ],
146    local_include_dirs: [ "include" ],
147    shared_libs: [
148        "libneuralnetworks",
149    ],
150    static_libs: [
151        "libgmock",
152    ],
153}
154
155cc_test {
156    name: "rnn_test",
157    srcs: [
158        "operations/RNNTest.cpp",
159    ],
160    local_include_dirs: [ "include" ],
161    shared_libs: [
162        "libneuralnetworks",
163    ],
164    static_libs: [
165        "libgmock",
166    ],
167}
168
169cc_test {
170    name: "svdf_test",
171    srcs: [
172        "operations/SVDFTest.cpp",
173    ],
174    local_include_dirs: [ "include" ],
175    shared_libs: [
176        "libneuralnetworks",
177    ],
178    static_libs: [
179        "libgmock",
180    ],
181}
182