xref: /aosp_15_r20/external/ComputeLibrary/examples/BUILD.bazel (revision c217d954acce2dbc11938adb493fc0abd69584f3)
1# Copyright (c) 2023 Arm Limited.
2#
3# SPDX-License-Identifier: MIT
4#
5# Permission is hereby granted, free of charge, to any person obtaining a copy
6# of this software and associated documentation files (the "Software"), to
7# deal in the Software without restriction, including without limitation the
8# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9# sell copies of the Software, and to permit persons to whom the Software is
10# furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice shall be included in all
13# copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21# SOFTWARE.
22
23#---------------------------------------------------------------------
24# Neon examples
25
26cc_binary(
27    name = "neon_cnn",
28    srcs = ["neon_cnn.cpp"],
29    copts = ["-march=armv8.2-a+fp16"],
30    linkstatic = False,
31    deps = [
32        "//:arm_compute",
33        "//:arm_compute_graph",
34        "//include",
35        "//utils",
36    ],
37)
38
39cc_binary(
40    name = "neon_copy_objects",
41    srcs = ["neon_copy_objects.cpp"],
42    copts = ["-march=armv8.2-a+fp16"],
43    linkstatic = False,
44    deps = [
45        "//:arm_compute",
46        "//:arm_compute_graph",
47        "//include",
48        "//utils",
49    ],
50)
51
52cc_binary(
53    name = "neon_gemm_qasymm8",
54    srcs = ["neon_gemm_qasymm8.cpp"],
55    copts = ["-march=armv8.2-a+fp16"],
56    linkstatic = False,
57    deps = [
58        "//:arm_compute",
59        "//:arm_compute_graph",
60        "//include",
61        "//utils",
62    ],
63)
64
65cc_binary(
66    name = "neon_permute",
67    srcs = ["neon_permute.cpp"],
68    copts = ["-march=armv8.2-a+fp16"],
69    linkstatic = False,
70    deps = [
71        "//:arm_compute",
72        "//:arm_compute_graph",
73        "//include",
74        "//utils",
75    ],
76)
77
78cc_binary(
79    name = "neon_scale",
80    srcs = ["neon_scale.cpp"],
81    copts = ["-march=armv8.2-a+fp16"],
82    linkstatic = False,
83    deps = [
84        "//:arm_compute",
85        "//:arm_compute_graph",
86        "//include",
87        "//utils",
88    ],
89)
90
91cc_binary(
92    name = "neon_sgemm",
93    srcs = ["neon_sgemm.cpp"],
94    copts = ["-march=armv8.2-a+fp16"],
95    linkstatic = False,
96    deps = [
97        "//:arm_compute",
98        "//:arm_compute_graph",
99        "//include",
100        "//utils",
101    ],
102)
103
104#---------------------------------------------------------------------
105# Graph examples
106
107cc_binary(
108    name = "graph_alexnet",
109    srcs = ["graph_alexnet.cpp"],
110    copts = ["-march=armv8.2-a+fp16"],
111    linkstatic = False,
112    deps = [
113        "//:arm_compute",
114        "//:arm_compute_graph",
115        "//include",
116        "//utils",
117    ],
118)
119
120cc_binary(
121    name = "graph_deepspeech_v0_4_1",
122    srcs = ["graph_deepspeech_v0_4_1.cpp"],
123    copts = ["-march=armv8.2-a+fp16"],
124    linkstatic = False,
125    deps = [
126        "//:arm_compute",
127        "//:arm_compute_graph",
128        "//include",
129        "//utils",
130    ],
131)
132
133cc_binary(
134    name = "graph_edsr",
135    srcs = [
136        "graph_edsr.cpp",
137        "graph_edsr.h",
138    ],
139    copts = ["-march=armv8.2-a+fp16"],
140    linkstatic = False,
141    deps = [
142        "//:arm_compute",
143        "//:arm_compute_graph",
144        "//include",
145        "//utils",
146    ],
147)
148
149cc_binary(
150    name = "graph_googlenet",
151    srcs = ["graph_googlenet.cpp"],
152    copts = ["-march=armv8.2-a+fp16"],
153    linkstatic = False,
154    deps = [
155        "//:arm_compute",
156        "//:arm_compute_graph",
157        "//include",
158        "//utils",
159    ],
160)
161
162cc_binary(
163    name = "graph_inception_resnet_v1",
164    srcs = ["graph_inception_resnet_v1.cpp"],
165    copts = ["-march=armv8.2-a+fp16"],
166    linkstatic = False,
167    deps = [
168        "//:arm_compute",
169        "//:arm_compute_graph",
170        "//include",
171        "//utils",
172    ],
173)
174
175cc_binary(
176    name = "graph_inception_resnet_v2",
177    srcs = ["graph_inception_resnet_v2.cpp"],
178    copts = ["-march=armv8.2-a+fp16"],
179    linkstatic = False,
180    deps = [
181        "//:arm_compute",
182        "//:arm_compute_graph",
183        "//include",
184        "//utils",
185    ],
186)
187
188cc_binary(
189    name = "graph_inception_v3",
190    srcs = ["graph_inception_v3.cpp"],
191    copts = ["-march=armv8.2-a+fp16"],
192    linkstatic = False,
193    deps = [
194        "//:arm_compute",
195        "//:arm_compute_graph",
196        "//include",
197        "//utils",
198    ],
199)
200
201cc_binary(
202    name = "graph_inception_v4",
203    srcs = ["graph_inception_v4.cpp"],
204    copts = ["-march=armv8.2-a+fp16"],
205    linkstatic = False,
206    deps = [
207        "//:arm_compute",
208        "//:arm_compute_graph",
209        "//include",
210        "//utils",
211    ],
212)
213
214cc_binary(
215    name = "graph_lenet",
216    srcs = ["graph_lenet.cpp"],
217    copts = ["-march=armv8.2-a+fp16"],
218    linkstatic = False,
219    deps = [
220        "//:arm_compute",
221        "//:arm_compute_graph",
222        "//include",
223        "//utils",
224    ],
225)
226
227cc_binary(
228    name = "graph_mobilenet",
229    srcs = ["graph_mobilenet.cpp"],
230    copts = ["-march=armv8.2-a+fp16"],
231    linkstatic = False,
232    deps = [
233        "//:arm_compute",
234        "//:arm_compute_graph",
235        "//include",
236        "//utils",
237    ],
238)
239
240cc_binary(
241    name = "graph_mobilenet_v2",
242    srcs = ["graph_mobilenet_v2.cpp"],
243    copts = ["-march=armv8.2-a+fp16"],
244    linkstatic = False,
245    deps = [
246        "//:arm_compute",
247        "//:arm_compute_graph",
248        "//include",
249        "//utils",
250    ],
251)
252
253cc_binary(
254    name = "graph_resnet12",
255    srcs = ["graph_resnet12.cpp"],
256    copts = ["-march=armv8.2-a+fp16"],
257    linkstatic = False,
258    deps = [
259        "//:arm_compute",
260        "//:arm_compute_graph",
261        "//include",
262        "//utils",
263    ],
264)
265
266cc_binary(
267    name = "graph_resnet50",
268    srcs = ["graph_resnet50.cpp"],
269    copts = ["-march=armv8.2-a+fp16"],
270    linkstatic = False,
271    deps = [
272        "//:arm_compute",
273        "//:arm_compute_graph",
274        "//include",
275        "//utils",
276    ],
277)
278
279cc_binary(
280    name = "graph_resnet_v2_50",
281    srcs = ["graph_resnet_v2_50.cpp"],
282    copts = ["-march=armv8.2-a+fp16"],
283    linkstatic = False,
284    deps = [
285        "//:arm_compute",
286        "//:arm_compute_graph",
287        "//include",
288        "//utils",
289    ],
290)
291
292cc_binary(
293    name = "graph_resnext50",
294    srcs = ["graph_resnext50.cpp"],
295    copts = ["-march=armv8.2-a+fp16"],
296    linkstatic = False,
297    deps = [
298        "//:arm_compute",
299        "//:arm_compute_graph",
300        "//include",
301        "//utils",
302    ],
303)
304
305cc_binary(
306    name = "graph_shufflenet",
307    srcs = ["graph_shufflenet.cpp"],
308    copts = ["-march=armv8.2-a+fp16"],
309    linkstatic = False,
310    deps = [
311        "//:arm_compute",
312        "//:arm_compute_graph",
313        "//include",
314        "//utils",
315    ],
316)
317
318cc_binary(
319    name = "graph_squeezenet",
320    srcs = ["graph_squeezenet.cpp"],
321    copts = ["-march=armv8.2-a+fp16"],
322    linkstatic = False,
323    deps = [
324        "//:arm_compute",
325        "//:arm_compute_graph",
326        "//include",
327        "//utils",
328    ],
329)
330
331cc_binary(
332    name = "graph_squeezenet_v1_1",
333    srcs = ["graph_squeezenet_v1_1.cpp"],
334    copts = ["-march=armv8.2-a+fp16"],
335    linkstatic = False,
336    deps = [
337        "//:arm_compute",
338        "//:arm_compute_graph",
339        "//include",
340        "//utils",
341    ],
342)
343
344cc_binary(
345    name = "graph_srcnn955",
346    srcs = ["graph_srcnn955.cpp"],
347    copts = ["-march=armv8.2-a+fp16"],
348    linkstatic = False,
349    deps = [
350        "//:arm_compute",
351        "//:arm_compute_graph",
352        "//include",
353        "//utils",
354    ],
355)
356
357cc_binary(
358    name = "graph_ssd_mobilenet",
359    srcs = ["graph_ssd_mobilenet.cpp"],
360    copts = ["-march=armv8.2-a+fp16"],
361    linkstatic = False,
362    deps = [
363        "//:arm_compute",
364        "//:arm_compute_graph",
365        "//include",
366        "//utils",
367    ],
368)
369
370cc_binary(
371    name = "graph_vgg16",
372    srcs = ["graph_vgg16.cpp"],
373    copts = ["-march=armv8.2-a+fp16"],
374    linkstatic = False,
375    deps = [
376        "//:arm_compute",
377        "//:arm_compute_graph",
378        "//include",
379        "//utils",
380    ],
381)
382
383cc_binary(
384    name = "graph_vgg19",
385    srcs = ["graph_vgg19.cpp"],
386    copts = ["-march=armv8.2-a+fp16"],
387    linkstatic = False,
388    deps = [
389        "//:arm_compute",
390        "//:arm_compute_graph",
391        "//include",
392        "//utils",
393    ],
394)
395
396cc_binary(
397    name = "graph_vgg_vdsr",
398    srcs = ["graph_vgg_vdsr.cpp"],
399    copts = ["-march=armv8.2-a+fp16"],
400    linkstatic = False,
401    deps = [
402        "//:arm_compute",
403        "//:arm_compute_graph",
404        "//include",
405        "//utils",
406    ],
407)
408
409cc_binary(
410    name = "graph_yolov3",
411    srcs = ["graph_yolov3.cpp"],
412    copts = ["-march=armv8.2-a+fp16"],
413    linkstatic = False,
414    deps = [
415        "//:arm_compute",
416        "//:arm_compute_graph",
417        "//include",
418        "//utils",
419    ],
420)
421