Imported Upstream version 1.9.0
[platform/core/ml/nnfw.git] / compiler / luci-interpreter / src / kernels / CMakeLists.txt
1 find_package(Threads REQUIRED)
2 nnas_find_package(GTest REQUIRED)
3
4 set(SOURCES
5     Add.h
6     Add.cpp
7     ArgMax.h
8     ArgMax.cpp
9     AveragePool2D.h
10     AveragePool2D.cpp
11     Concatenation.h
12     Concatenation.cpp
13     Conv2D.h
14     Conv2D.cpp
15     DepthToSpace.h
16     DepthToSpace.cpp
17     DepthwiseConv2D.h
18     DepthwiseConv2D.cpp
19     Elu.h
20     Elu.cpp
21     FullyConnected.h
22     FullyConnected.cpp
23     If.h
24     If.cpp
25     L2Normalize.h
26     L2Normalize.cpp
27     L2Pool2D.h
28     L2Pool2D.cpp
29     LeakyRelu.h
30     LeakyRelu.cpp
31     LocalResponseNormalization.h
32     LocalResponseNormalization.cpp
33     Logistic.h
34     Logistic.cpp
35     MaxPool2D.h
36     MaxPool2D.cpp
37     Mean.h
38     Mean.cpp
39     Mul.h
40     Mul.cpp
41     Pad.h
42     Pad.cpp
43     Reshape.h
44     Reshape.cpp
45     Reverse.h
46     Reverse.cpp
47     Rsqrt.h
48     Rsqrt.cpp
49     Slice.h
50     Slice.cpp
51     Softmax.h
52     Softmax.cpp
53     SpaceToDepth.h
54     SpaceToDepth.cpp
55     Split.h
56     Split.cpp
57     StridedSlice.h
58     StridedSlice.cpp
59     Sqrt.h
60     Sqrt.cpp
61     Squeeze.h
62     Squeeze.cpp
63     Tanh.h
64     Tanh.cpp
65     Transpose.h
66     Transpose.cpp
67     TransposeConv.h
68     TransposeConv.cpp
69     Unpack.h
70     Unpack.cpp)
71
72 list(APPEND SOURCES Utils.h Utils.cpp ${TensorFlowSource_DIR}/tensorflow/lite/kernels/internal/quantization_util.cc)
73
74 add_library(luci_interpreter_kernels STATIC ${SOURCES})
75 set_target_properties(luci_interpreter_kernels PROPERTIES POSITION_INDEPENDENT_CODE ON)
76 target_include_directories(luci_interpreter_kernels PUBLIC ${LUCI_INTERPRETER_SOURCE_DIR})
77 target_include_directories(luci_interpreter_kernels SYSTEM PRIVATE
78     "${TensorFlowRuySource_DIR}"
79     "${TensorFlowGEMMLowpSource_DIR}"
80     "${TensorFlowEigenSource_DIR}"
81     "${TensorFlowSource_DIR}")
82 target_link_libraries(luci_interpreter_kernels
83     PUBLIC luci_interpreter_core
84     PRIVATE nncc_common Threads::Threads)
85
86
87 set(TEST_SOURCES
88     Add.test.cpp
89     ArgMax.test.cpp
90     AveragePool2D.test.cpp
91     Concatenation.test.cpp
92     Conv2D.test.cpp
93     DepthToSpace.test.cpp
94     DepthwiseConv2D.test.cpp
95     Elu.test.cpp
96     FullyConnected.test.cpp
97     If.test.cpp
98     L2Normalize.test.cpp
99     L2Pool2D.test.cpp
100     LeakyRelu.test.cpp
101     LocalResponseNormalization.test.cpp
102     Logistic.test.cpp
103     MaxPool2D.test.cpp
104     Mean.test.cpp
105     Mul.test.cpp
106     Pad.test.cpp
107     Reshape.test.cpp
108     Reverse.test.cpp
109     Rsqrt.test.cpp
110     Slice.test.cpp
111     Softmax.test.cpp
112     SpaceToDepth.test.cpp
113     Split.test.cpp
114     StridedSlice.test.cpp
115     Sqrt.test.cpp
116     Squeeze.test.cpp
117     Tanh.test.cpp
118     Transpose.test.cpp
119     TransposeConv.test.cpp
120     Unpack.test.cpp)
121
122 list(APPEND TEST_SOURCES TestUtils.h TestUtils.cpp)
123
124 GTest_AddTest(luci_interpreter_kernels_test ${TEST_SOURCES})
125 target_link_libraries(luci_interpreter_kernels_test luci_interpreter_kernels)