xref: /aosp_15_r20/external/armnn/src/backends/tosaReference/backend.mk (revision 89c4ff92f2867872bb9e2354d150bf0c8c502810)
1#
2# Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3# SPDX-License-Identifier: MIT
4#
5
6# BACKEND_SOURCES contains the list of files to be included
7# in the Android build and it is picked up by the Android.mk
8# file in the root of ArmNN
9
10# The variable to enable/disable the TOSA Reference backend
11# (ARMNN_TOSA_REF_ENABLED is declared in android-nn-driver/Android.mk)
12ifeq ($(ARMNN_TOSA_REF_ENABLED),1)
13
14# ARMNN_TOSA_REF_ENABLED == 1
15# Include the source files for the TOSA reference backend
16
17BACKEND_SOURCES := \
18        TosaRefBackend.cpp \
19        TosaRefLayerSupport.cpp \
20        TosaRefMemoryManager.cpp \
21        TosaRefRegistryInitializer.cpp \
22        TosaRefTensorHandle.cpp \
23        TosaRefTensorHandleFactory.cpp \
24        TosaRefWorkloadFactory.cpp \
25        workloads/TosaRefPreCompiledWorkload.cpp
26else
27
28# ARMNN_TOSA_REF_ENABLED == 0
29# No source file will be compiled for the reference backend
30
31BACKEND_SOURCES :=
32
33endif
34
35# BACKEND_TEST_SOURCES contains the list of files to be included
36# in the Android unit test build (armnn-tests) and it is picked
37# up by the Android.mk file in the root of ArmNN
38
39# The variable to enable/disable the TOSA Reference backend
40# (ARMNN_TOSA_REF_ENABLED is declared in android-nn-driver/Android.mk)
41ifeq ($(ARMNN_TOSA_REF_ENABLED),1)
42
43# ARMNN_TOSA_REF_ENABLED == 1
44# Include the source files for the TOSA Reference backend tests
45
46BACKEND_TEST_SOURCES := \
47        test/TosaRefLayerSupportTests.cpp \
48        test/TosaRefLayerTests.cpp
49else
50
51# ARMNN_TOSA_REF_ENABLED == 0
52# No source file will be compiled for the TOSA reference backend tests
53
54BACKEND_TEST_SOURCES :=
55
56endif
57