Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 1 | # |
| 2 | # Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | |
| 6 | list(APPEND armnnBackendsCommonUnitTests_sources |
Aron Virginas-Tar | 8fccd86 | 2019-09-09 11:22:56 +0100 | [diff] [blame] | 7 | AbsEndToEndTestImpl.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 8 | ActivationFixture.hpp |
Narumol Prangnawarat | d1f5773 | 2019-10-31 14:24:02 +0000 | [diff] [blame] | 9 | ArgMinMaxEndToEndTestImpl.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 10 | BackendIdTests.cpp |
| 11 | BackendRegistryTests.cpp |
Matteo Martincigh | f02e6cd | 2019-05-17 12:15:30 +0100 | [diff] [blame] | 12 | CommonTestUtils.cpp |
narpra01 | b9546cf | 2018-11-20 15:21:28 +0000 | [diff] [blame] | 13 | CommonTestUtils.hpp |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 14 | ComparisonEndToEndTestImpl.hpp |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 15 | DataLayoutUtils.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 16 | DataTypeUtils.hpp |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 17 | DepthToSpaceEndToEndTestImpl.hpp |
Narumol Prangnawarat | 8c7324d | 2019-05-31 16:42:11 +0100 | [diff] [blame] | 18 | DequantizeEndToEndTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 19 | DetectionPostProcessEndToEndTestImpl.hpp |
Matteo Martincigh | ac60d28 | 2019-07-25 15:25:44 +0100 | [diff] [blame] | 20 | DynamicBackendTests.cpp |
| 21 | DynamicBackendTests.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 22 | EndToEndTestImpl.hpp |
narpra01 | db2b160 | 2019-01-23 15:23:11 +0000 | [diff] [blame] | 23 | GatherEndToEndTestImpl.hpp |
Sadik Armagan | 062e0e9 | 2019-10-14 10:31:43 +0100 | [diff] [blame] | 24 | InstanceNormalizationEndToEndTestImpl.cpp |
| 25 | InstanceNormalizationEndToEndTestImpl.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 26 | IsLayerSupportedTestImpl.hpp |
Aron Virginas-Tar | 69362cc | 2018-11-22 15:04:42 +0000 | [diff] [blame] | 27 | JsonPrinterTestImpl.cpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 28 | JsonPrinterTestImpl.hpp |
| 29 | LayerReleaseConstantDataTest.cpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 30 | LayerTests.hpp |
Sadik Armagan | 20bea00 | 2019-10-16 09:29:38 +0100 | [diff] [blame] | 31 | LogSoftmaxEndToEndTestImpl.cpp |
| 32 | LogSoftmaxEndToEndTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 33 | ConcatEndToEndTestImpl.hpp |
Matteo Martincigh | 88054f8 | 2019-05-17 12:15:30 +0100 | [diff] [blame] | 34 | MockBackend.cpp |
| 35 | MockBackend.hpp |
| 36 | MockBackendId.hpp |
Matteo Martincigh | f02e6cd | 2019-05-17 12:15:30 +0100 | [diff] [blame] | 37 | OptimizeSubgraphViewTests.cpp |
David Monahan | 005288d | 2019-05-14 10:42:38 +0100 | [diff] [blame] | 38 | OptimizationViewsTests.cpp |
Nikhil Raj | 747f586 | 2019-07-19 15:15:23 +0100 | [diff] [blame] | 39 | PreluEndToEndTestImpl.hpp |
Aron Virginas-Tar | 46ff1ca | 2019-09-12 11:03:09 +0100 | [diff] [blame] | 40 | QuantizedLstmEndToEndTestImpl.cpp |
Francis Murtagh | b3fc252 | 2019-08-09 13:20:50 +0100 | [diff] [blame] | 41 | QuantizedLstmEndToEndTestImpl.hpp |
Aron Virginas-Tar | fe15eff | 2019-07-01 16:12:58 +0100 | [diff] [blame] | 42 | ResizeEndToEndTestImpl.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 43 | RuntimeTestImpl.hpp |
Aron Virginas-Tar | f97f6da | 2019-10-01 18:35:44 +0100 | [diff] [blame] | 44 | SpaceToDepthEndToEndTestImpl.cpp |
Keith Davis | 9515c7e | 2019-06-21 09:33:59 +0100 | [diff] [blame] | 45 | SpaceToDepthEndToEndTestImpl.hpp |
Narumol Prangnawarat | 0be4338 | 2019-05-27 11:29:59 +0100 | [diff] [blame] | 46 | SplitterEndToEndTestImpl.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 47 | TensorCopyUtils.cpp |
| 48 | TensorCopyUtils.hpp |
Aron Virginas-Tar | 5605519 | 2018-11-12 18:10:43 +0000 | [diff] [blame] | 49 | WorkloadFactoryHelper.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 50 | WorkloadTestUtils.hpp |
Sadik Armagan | 9199e58 | 2019-09-05 17:35:31 +0100 | [diff] [blame] | 51 | layerTests/AbsTestImpl.cpp |
| 52 | layerTests/AbsTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 53 | layerTests/ActivationTestImpl.cpp |
| 54 | layerTests/ActivationTestImpl.hpp |
Aron Virginas-Tar | e89ebad | 2019-08-27 18:14:26 +0100 | [diff] [blame] | 55 | layerTests/AdditionTestImpl.cpp |
| 56 | layerTests/AdditionTestImpl.hpp |
Nikhil Raj | 68c2c90 | 2019-09-19 11:21:11 +0100 | [diff] [blame] | 57 | layerTests/ArgMinMaxTestImpl.cpp |
| 58 | layerTests/ArgMinMaxTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 59 | layerTests/BatchNormalizationTestImpl.cpp |
| 60 | layerTests/BatchNormalizationTestImpl.hpp |
| 61 | layerTests/BatchToSpaceNdTestImpl.hpp |
Aron Virginas-Tar | 3bc00ec | 2019-10-18 15:42:58 +0100 | [diff] [blame] | 62 | layerTests/ComparisonTestImpl.cpp |
Aron Virginas-Tar | 77bfb5e | 2019-10-16 17:45:38 +0100 | [diff] [blame] | 63 | layerTests/ComparisonTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 64 | layerTests/ConcatTestImpl.cpp |
| 65 | layerTests/ConcatTestImpl.hpp |
| 66 | layerTests/ConstantTestImpl.cpp |
| 67 | layerTests/ConstantTestImpl.hpp |
| 68 | layerTests/Conv2dTestImpl.cpp |
| 69 | layerTests/Conv2dTestImpl.hpp |
| 70 | layerTests/ConvertFp16ToFp32TestImpl.cpp |
| 71 | layerTests/ConvertFp16ToFp32TestImpl.hpp |
| 72 | layerTests/ConvertFp32ToFp16TestImpl.cpp |
| 73 | layerTests/ConvertFp32ToFp16TestImpl.hpp |
| 74 | layerTests/DebugTestImpl.cpp |
| 75 | layerTests/DebugTestImpl.hpp |
Aron Virginas-Tar | 73f6642 | 2019-09-23 19:11:59 +0100 | [diff] [blame] | 76 | layerTests/DepthToSpaceTestImpl.cpp |
| 77 | layerTests/DepthToSpaceTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 78 | layerTests/DequantizeTestImpl.cpp |
| 79 | layerTests/DequantizeTestImpl.hpp |
| 80 | layerTests/DetectionPostProcessTestImpl.hpp |
Aron Virginas-Tar | e89ebad | 2019-08-27 18:14:26 +0100 | [diff] [blame] | 81 | layerTests/DivisionTestImpl.cpp |
| 82 | layerTests/DivisionTestImpl.hpp |
| 83 | layerTests/ElementwiseTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 84 | layerTests/FakeQuantizationTestImpl.cpp |
| 85 | layerTests/FakeQuantizationTestImpl.hpp |
| 86 | layerTests/FloorTestImpl.cpp |
| 87 | layerTests/FloorTestImpl.hpp |
| 88 | layerTests/FullyConnectedTestImpl.cpp |
| 89 | layerTests/FullyConnectedTestImpl.hpp |
| 90 | layerTests/GatherTestImpl.cpp |
| 91 | layerTests/GatherTestImpl.hpp |
Aron Virginas-Tar | 8168f40 | 2019-10-04 13:10:16 +0100 | [diff] [blame] | 92 | layerTests/InstanceNormalizationTestImpl.cpp |
| 93 | layerTests/InstanceNormalizationTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 94 | layerTests/L2NormalizationTestImpl.cpp |
| 95 | layerTests/L2NormalizationTestImpl.hpp |
Aron Virginas-Tar | e89ebad | 2019-08-27 18:14:26 +0100 | [diff] [blame] | 96 | layerTests/LayerTestResult.hpp |
Aron Virginas-Tar | e662a94 | 2019-10-14 15:12:00 +0100 | [diff] [blame] | 97 | layerTests/LogSoftmaxTestImpl.cpp |
| 98 | layerTests/LogSoftmaxTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 99 | layerTests/LstmTestImpl.cpp |
| 100 | layerTests/LstmTestImpl.hpp |
Aron Virginas-Tar | e89ebad | 2019-08-27 18:14:26 +0100 | [diff] [blame] | 101 | layerTests/MaximumTestImpl.cpp |
| 102 | layerTests/MaximumTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 103 | layerTests/MeanTestImpl.hpp |
Aron Virginas-Tar | e89ebad | 2019-08-27 18:14:26 +0100 | [diff] [blame] | 104 | layerTests/MinimumTestImpl.cpp |
| 105 | layerTests/MinimumTestImpl.hpp |
| 106 | layerTests/MultiplicationTestImpl.cpp |
| 107 | layerTests/MultiplicationTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 108 | layerTests/NormalizationTestImpl.cpp |
| 109 | layerTests/NormalizationTestImpl.hpp |
| 110 | layerTests/PadTestImpl.cpp |
| 111 | layerTests/PadTestImpl.hpp |
| 112 | layerTests/PermuteTestImpl.hpp |
| 113 | layerTests/Pooling2dTestImpl.cpp |
| 114 | layerTests/Pooling2dTestImpl.hpp |
| 115 | layerTests/PreluTestImpl.hpp |
| 116 | layerTests/QuantizeTestImpl.cpp |
| 117 | layerTests/QuantizeTestImpl.hpp |
| 118 | layerTests/ReshapeTestImpl.cpp |
| 119 | layerTests/ReshapeTestImpl.hpp |
Aron Virginas-Tar | b3670b1 | 2019-10-28 16:06:50 +0000 | [diff] [blame] | 120 | layerTests/ResizeTestImpl.cpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 121 | layerTests/ResizeTestImpl.hpp |
| 122 | layerTests/RsqrtTestImpl.cpp |
| 123 | layerTests/RsqrtTestImpl.hpp |
Aron Virginas-Tar | 92b9f87 | 2019-09-17 17:27:04 +0100 | [diff] [blame] | 124 | layerTests/SliceTestImpl.cpp |
| 125 | layerTests/SliceTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 126 | layerTests/SoftmaxTestImpl.cpp |
| 127 | layerTests/SoftmaxTestImpl.hpp |
| 128 | layerTests/SpaceToBatchNdTestImpl.cpp |
| 129 | layerTests/SpaceToBatchNdTestImpl.hpp |
| 130 | layerTests/SpaceToDepthTestImpl.cpp |
| 131 | layerTests/SpaceToDepthTestImpl.hpp |
| 132 | layerTests/SplitterTestImpl.cpp |
| 133 | layerTests/SplitterTestImpl.hpp |
Matthew Jackson | e69c399 | 2019-09-09 14:31:21 +0100 | [diff] [blame] | 134 | layerTests/StackTestImpl.cpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 135 | layerTests/StackTestImpl.hpp |
| 136 | layerTests/StridedSliceTestImpl.cpp |
| 137 | layerTests/StridedSliceTestImpl.hpp |
Aron Virginas-Tar | e89ebad | 2019-08-27 18:14:26 +0100 | [diff] [blame] | 138 | layerTests/SubtractionTestImpl.cpp |
| 139 | layerTests/SubtractionTestImpl.hpp |
Aron Virginas-Tar | 00d306e | 2019-08-28 18:08:46 +0100 | [diff] [blame] | 140 | layerTests/TransposeConvolution2dTestImpl.hpp |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 141 | ) |
| 142 | |
Matteo Martincigh | db16dd3 | 2019-08-27 16:41:11 +0100 | [diff] [blame] | 143 | if (ARMNNREF) |
Matteo Martincigh | e67edb2 | 2019-08-14 14:05:46 +0100 | [diff] [blame] | 144 | list(APPEND armnnBackendsCommonUnitTests_sources |
| 145 | OptimizedNetworkTests.cpp |
| 146 | WorkloadDataValidation.cpp |
| 147 | ) |
| 148 | endif() |
| 149 | |
Jan Eilers | 146b2e1 | 2019-08-16 10:45:30 +0100 | [diff] [blame] | 150 | if(ARMCOMPUTENEON AND ARMCOMPUTECL) |
| 151 | list(APPEND armnnBackendsCommonUnitTests_sources |
| 152 | CompatibilityTests.cpp) |
| 153 | endif() |
| 154 | |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 155 | add_library(armnnBackendsCommonUnitTests OBJECT ${armnnBackendsCommonUnitTests_sources}) |
Aron Virginas-Tar | 29fe58b | 2018-10-26 15:37:23 +0100 | [diff] [blame] | 156 | target_include_directories(armnnBackendsCommonUnitTests PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 157 | target_include_directories(armnnBackendsCommonUnitTests PRIVATE ${PROJECT_SOURCE_DIR}/src/armnnUtils) |
Nattapat Chaimanowong | 1216b58 | 2018-11-23 15:33:41 +0000 | [diff] [blame] | 158 | target_include_directories(armnnBackendsCommonUnitTests PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
Matteo Martincigh | 986c186 | 2019-07-26 15:12:47 +0100 | [diff] [blame] | 159 | |
| 160 | # Dummy shared object for testing. |
| 161 | # This is a simple library used to test the utility functions that will be used to handle the shared objects. |
| 162 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 163 | list(APPEND testSharedObject_sources |
Matteo Martincigh | 986c186 | 2019-07-26 15:12:47 +0100 | [diff] [blame] | 164 | TestSharedObject.cpp |
| 165 | TestSharedObject.hpp |
| 166 | ) |
| 167 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 168 | add_library_ex(TestSharedObject MODULE ${testSharedObject_sources}) |
| 169 | set_target_properties(TestSharedObject PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testSharedObject) |
| 170 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/testSharedObject/libNoSharedObject.txt "This is not a shared object") |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 171 | |
| 172 | # Dummy dynamic backends for testing. |
| 173 | # Both a valid and a number of invalid dummy dynamic backends (covering various use cases) share the |
| 174 | # same source code. The various test cases are put together in the code using compiler directives. |
| 175 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 176 | list(APPEND testDynamicBackend_sources |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 177 | TestDynamicBackend.cpp |
| 178 | TestDynamicBackend.hpp |
| 179 | ) |
| 180 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 181 | add_library_ex(ValidTestDynamicBackend MODULE ${testDynamicBackend_sources}) |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 182 | target_compile_definitions(ValidTestDynamicBackend PRIVATE -DVALID_TEST_DYNAMIC_BACKEND_1) |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 183 | target_include_directories(ValidTestDynamicBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 184 | target_include_directories(ValidTestDynamicBackend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 185 | target_link_libraries(ValidTestDynamicBackend armnn) |
| 186 | set_target_properties(ValidTestDynamicBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 187 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 188 | add_library_ex(InvalidTestDynamicBackend1 MODULE ${testDynamicBackend_sources}) |
| 189 | target_compile_definitions(InvalidTestDynamicBackend1 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_1) |
| 190 | target_include_directories(InvalidTestDynamicBackend1 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 191 | target_include_directories(InvalidTestDynamicBackend1 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 192 | target_link_libraries(InvalidTestDynamicBackend1 armnn) |
| 193 | set_target_properties(InvalidTestDynamicBackend1 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 194 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 195 | add_library_ex(InvalidTestDynamicBackend2 MODULE ${testDynamicBackend_sources}) |
| 196 | target_compile_definitions(InvalidTestDynamicBackend2 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_2) |
| 197 | target_include_directories(InvalidTestDynamicBackend2 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 198 | target_include_directories(InvalidTestDynamicBackend2 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 199 | target_link_libraries(InvalidTestDynamicBackend2 armnn) |
| 200 | set_target_properties(InvalidTestDynamicBackend2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 201 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 202 | add_library_ex(InvalidTestDynamicBackend3 MODULE ${testDynamicBackend_sources}) |
| 203 | target_compile_definitions(InvalidTestDynamicBackend3 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_3) |
| 204 | target_include_directories(InvalidTestDynamicBackend3 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 205 | target_include_directories(InvalidTestDynamicBackend3 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 206 | target_link_libraries(InvalidTestDynamicBackend3 armnn) |
| 207 | set_target_properties(InvalidTestDynamicBackend3 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 208 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 209 | add_library_ex(InvalidTestDynamicBackend4 MODULE ${testDynamicBackend_sources}) |
| 210 | target_compile_definitions(InvalidTestDynamicBackend4 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_4) |
| 211 | target_include_directories(InvalidTestDynamicBackend4 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 212 | target_include_directories(InvalidTestDynamicBackend4 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 213 | target_link_libraries(InvalidTestDynamicBackend4 armnn) |
| 214 | set_target_properties(InvalidTestDynamicBackend4 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 215 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 216 | add_library_ex(InvalidTestDynamicBackend5 MODULE ${testDynamicBackend_sources}) |
| 217 | target_compile_definitions(InvalidTestDynamicBackend5 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_5) |
| 218 | target_include_directories(InvalidTestDynamicBackend5 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 219 | target_include_directories(InvalidTestDynamicBackend5 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 220 | target_link_libraries(InvalidTestDynamicBackend5 armnn) |
| 221 | set_target_properties(InvalidTestDynamicBackend5 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 222 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 223 | add_library_ex(InvalidTestDynamicBackend6 MODULE ${testDynamicBackend_sources}) |
| 224 | target_compile_definitions(InvalidTestDynamicBackend6 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_6) |
| 225 | target_include_directories(InvalidTestDynamicBackend6 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 226 | target_include_directories(InvalidTestDynamicBackend6 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 227 | target_link_libraries(InvalidTestDynamicBackend6 armnn) |
| 228 | set_target_properties(InvalidTestDynamicBackend6 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | bc2e210 | 2019-07-24 14:56:13 +0100 | [diff] [blame] | 229 | |
Matteo Martincigh | d0dc770 | 2019-08-01 17:09:03 +0100 | [diff] [blame] | 230 | add_library_ex(InvalidTestDynamicBackend7 MODULE ${testDynamicBackend_sources}) |
| 231 | target_compile_definitions(InvalidTestDynamicBackend7 PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_7) |
| 232 | target_include_directories(InvalidTestDynamicBackend7 PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 233 | target_include_directories(InvalidTestDynamicBackend7 PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 234 | target_link_libraries(InvalidTestDynamicBackend7 armnn) |
| 235 | set_target_properties(InvalidTestDynamicBackend7 PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/testDynamicBackend) |
Matteo Martincigh | f0a0a9e | 2019-08-05 15:27:55 +0100 | [diff] [blame] | 236 | |
| 237 | # Dummy files and directories for testing the dynamic backend file parsing. |
| 238 | |
| 239 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 240 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.1 "Test file for dynamic backend file parsing") |
| 241 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.1.2 "Test file for dynamic backend file parsing") |
| 242 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.1.2.3 "Test file for dynamic backend file parsing") |
| 243 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.10.1.27 "Test file for dynamic backend file parsing") |
| 244 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.10.1.33. "Test file for dynamic backend file parsing") |
| 245 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.3.4..5 "Test file for dynamic backend file parsing") |
| 246 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend.so.1,1.1 "Test file for dynamic backend file parsing") |
| 247 | |
| 248 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm123_GpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 249 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc456_backend.so "Test file for dynamic backend file parsing") |
| 250 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm%Co_GpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 251 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_Gpu.Acc_backend.so "Test file for dynamic backend file parsing") |
| 252 | |
| 253 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/GpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 254 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/_GpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 255 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm__backend.so "Test file for dynamic backend file parsing") |
| 256 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc.so "Test file for dynamic backend file parsing") |
| 257 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/__backend.so "Test file for dynamic backend file parsing") |
| 258 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/__.so "Test file for dynamic backend file parsing") |
| 259 | |
| 260 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend "Test file for dynamic backend file parsing") |
| 261 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath1/Arm_GpuAcc_backend_v1.2.so "Test file for dynamic backend file parsing") |
| 262 | |
| 263 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath2/Arm_CpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 264 | add_custom_target(link_dummy_dynamic_backend ALL |
| 265 | COMMAND ${CMAKE_COMMAND} -E create_symlink Arm_CpuAcc_backend.so backendsTestPath2/Arm_CpuAcc_backend.so.1 |
| 266 | COMMAND ${CMAKE_COMMAND} -E create_symlink Arm_CpuAcc_backend.so.1 backendsTestPath2/Arm_CpuAcc_backend.so.1.2 |
| 267 | COMMAND ${CMAKE_COMMAND} -E create_symlink Arm_CpuAcc_backend.so.1.2 backendsTestPath2/Arm_CpuAcc_backend.so.1.2.3 |
| 268 | COMMAND ${CMAKE_COMMAND} -E create_symlink nothing backendsTestPath2/Arm_no_backend.so) |
| 269 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath2/Arm_GpuAcc_backend.so "Test file for dynamic backend file parsing") |
| 270 | |
| 271 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath3) |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 272 | |
| 273 | # Dummy dynamic backends for testing. |
| 274 | # These shared objects are used to test the creation of dynamic backend instances in ArmNN. |
| 275 | |
| 276 | add_library_ex(Arm_TestValid2_backend MODULE ${testDynamicBackend_sources}) |
| 277 | target_compile_definitions(Arm_TestValid2_backend PRIVATE -DVALID_TEST_DYNAMIC_BACKEND_2) |
| 278 | target_include_directories(Arm_TestValid2_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 279 | target_include_directories(Arm_TestValid2_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 280 | target_link_libraries(Arm_TestValid2_backend armnn) |
| 281 | set_target_properties(Arm_TestValid2_backend PROPERTIES PREFIX "") |
| 282 | set_target_properties(Arm_TestValid2_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath5) |
| 283 | add_custom_command(TARGET Arm_TestValid2_backend POST_BUILD |
| 284 | COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:Arm_TestValid2_backend> ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath6) |
| 285 | |
| 286 | add_library_ex(Arm_TestValid3_backend MODULE ${testDynamicBackend_sources}) |
| 287 | target_compile_definitions(Arm_TestValid3_backend PRIVATE -DVALID_TEST_DYNAMIC_BACKEND_3) |
| 288 | target_include_directories(Arm_TestValid3_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 289 | target_include_directories(Arm_TestValid3_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 290 | target_link_libraries(Arm_TestValid3_backend armnn) |
| 291 | set_target_properties(Arm_TestValid3_backend PROPERTIES PREFIX "") |
| 292 | set_target_properties(Arm_TestValid3_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath5) |
| 293 | |
| 294 | add_library_ex(Arm_TestInvalid8_backend MODULE ${testDynamicBackend_sources}) |
| 295 | target_compile_definitions(Arm_TestInvalid8_backend PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_8) |
| 296 | target_include_directories(Arm_TestInvalid8_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 297 | target_include_directories(Arm_TestInvalid8_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 298 | target_link_libraries(Arm_TestInvalid8_backend armnn) |
| 299 | set_target_properties(Arm_TestInvalid8_backend PROPERTIES PREFIX "") |
| 300 | set_target_properties(Arm_TestInvalid8_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath5) |
| 301 | |
| 302 | add_library_ex(Arm_TestValid4_backend MODULE ${testDynamicBackend_sources}) |
| 303 | target_compile_definitions(Arm_TestValid4_backend PRIVATE -DVALID_TEST_DYNAMIC_BACKEND_4) |
| 304 | target_include_directories(Arm_TestValid4_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 305 | target_include_directories(Arm_TestValid4_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 306 | target_link_libraries(Arm_TestValid4_backend armnn) |
| 307 | set_target_properties(Arm_TestValid4_backend PROPERTIES PREFIX "") |
| 308 | set_target_properties(Arm_TestValid4_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath6) |
| 309 | |
Matteo Martincigh | 0c2b289 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 310 | add_library_ex(Arm_TestValid5_backend MODULE ${testDynamicBackend_sources}) |
| 311 | target_compile_definitions(Arm_TestValid5_backend PRIVATE -DVALID_TEST_DYNAMIC_BACKEND_5) |
| 312 | target_include_directories(Arm_TestValid5_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 313 | target_include_directories(Arm_TestValid5_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 314 | target_link_libraries(Arm_TestValid5_backend armnn) |
| 315 | set_target_properties(Arm_TestValid5_backend PROPERTIES PREFIX "") |
| 316 | set_target_properties(Arm_TestValid5_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath6) |
| 317 | |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 318 | add_library_ex(Arm_TestInvalid9_backend MODULE ${testDynamicBackend_sources}) |
| 319 | target_compile_definitions(Arm_TestInvalid9_backend PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_9) |
| 320 | target_include_directories(Arm_TestInvalid9_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 321 | target_include_directories(Arm_TestInvalid9_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 322 | target_link_libraries(Arm_TestInvalid9_backend armnn) |
| 323 | set_target_properties(Arm_TestInvalid9_backend PROPERTIES PREFIX "") |
| 324 | set_target_properties(Arm_TestInvalid9_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath6) |
| 325 | |
Matteo Martincigh | 0c2b289 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 326 | add_library_ex(Arm_TestInvalid10_backend MODULE ${testDynamicBackend_sources}) |
| 327 | target_compile_definitions(Arm_TestInvalid10_backend PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_10) |
| 328 | target_include_directories(Arm_TestInvalid10_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 329 | target_include_directories(Arm_TestInvalid10_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 330 | target_link_libraries(Arm_TestInvalid10_backend armnn) |
| 331 | set_target_properties(Arm_TestInvalid10_backend PROPERTIES PREFIX "") |
| 332 | set_target_properties(Arm_TestInvalid10_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath9) |
| 333 | |
| 334 | add_library_ex(Arm_TestInvalid11_backend MODULE ${testDynamicBackend_sources}) |
| 335 | target_compile_definitions(Arm_TestInvalid11_backend PRIVATE -DINVALID_TEST_DYNAMIC_BACKEND_11) |
| 336 | target_include_directories(Arm_TestInvalid11_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/armnn) |
| 337 | target_include_directories(Arm_TestInvalid11_backend PRIVATE ${PROJECT_SOURCE_DIR}/src/backends) |
| 338 | target_link_libraries(Arm_TestInvalid11_backend armnn) |
| 339 | set_target_properties(Arm_TestInvalid11_backend PROPERTIES PREFIX "") |
| 340 | set_target_properties(Arm_TestInvalid11_backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath9) |
| 341 | |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 342 | file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/backendsTestPath7) |