2 include(CheckIncludeFiles)
4 include_directories(SYSTEM "${THIRD_PARTY_INCLUDE_DIRS}")
6 # Setup the inference test framework
7 set(inference_test_sources
8 ClassifierTestCaseData.hpp
13 InferenceTestImage.hpp
14 InferenceTestImage.cpp)
15 add_library_ex(inferenceTest STATIC ${inference_test_sources})
16 target_include_directories(inferenceTest PRIVATE ../src/armnnUtils)
18 if(BUILD_CAFFE_PARSER)
19 macro(CaffeParserTest testName sources)
20 add_executable_ex(${testName} ${sources})
21 target_include_directories(${testName} PRIVATE ../src/armnnUtils)
22 set_target_properties(${testName} PROPERTIES COMPILE_FLAGS "${CAFFE_PARSER_TEST_ADDITIONAL_COMPILE_FLAGS}")
24 target_link_libraries(${testName} inferenceTest)
25 target_link_libraries(${testName} armnnCaffeParser)
26 target_link_libraries(${testName} armnn)
27 target_link_libraries(${testName} ${CMAKE_THREAD_LIBS_INIT})
29 target_link_libraries(${testName} ${OPENCL_LIBRARIES})
31 target_link_libraries(${testName}
32 ${Boost_SYSTEM_LIBRARY}
33 ${Boost_FILESYSTEM_LIBRARY}
34 ${Boost_PROGRAM_OPTIONS_LIBRARY})
35 addDllCopyCommands(${testName})
38 set(CaffeCifar10AcrossChannels-Armnn_sources
39 CaffeCifar10AcrossChannels-Armnn/CaffeCifar10AcrossChannels-Armnn.cpp
42 CaffeParserTest(CaffeCifar10AcrossChannels-Armnn "${CaffeCifar10AcrossChannels-Armnn_sources}")
44 set(CaffeMnist-Armnn_sources
45 CaffeMnist-Armnn/CaffeMnist-Armnn.cpp
48 CaffeParserTest(CaffeMnist-Armnn "${CaffeMnist-Armnn_sources}")
50 set(CaffeAlexNet-Armnn_sources
51 CaffeAlexNet-Armnn/CaffeAlexNet-Armnn.cpp
54 CaffeParserTest(CaffeAlexNet-Armnn "${CaffeAlexNet-Armnn_sources}")
56 set(MultipleNetworksCifar10_SRC
57 MultipleNetworksCifar10/MultipleNetworksCifar10.cpp
60 CaffeParserTest(MultipleNetworksCifar10 "${MultipleNetworksCifar10_SRC}")
62 set(CaffeResNet-Armnn_sources
63 CaffeResNet-Armnn/CaffeResNet-Armnn.cpp
66 CaffeParserTest(CaffeResNet-Armnn "${CaffeResNet-Armnn_sources}")
68 set(CaffeVGG-Armnn_sources
69 CaffeVGG-Armnn/CaffeVGG-Armnn.cpp
72 CaffeParserTest(CaffeVGG-Armnn "${CaffeVGG-Armnn_sources}")
74 set(CaffeInception_BN-Armnn_sources
75 CaffeInception_BN-Armnn/CaffeInception_BN-Armnn.cpp
78 CaffeParserTest(CaffeInception_BN-Armnn "${CaffeInception_BN-Armnn_sources}")
80 set(CaffeYolo-Armnn_sources
81 CaffeYolo-Armnn/CaffeYolo-Armnn.cpp
84 YoloInferenceTest.hpp)
85 CaffeParserTest(CaffeYolo-Armnn "${CaffeYolo-Armnn_sources}")
89 macro(TfParserTest testName sources)
90 add_executable_ex(${testName} ${sources})
91 target_include_directories(${testName} PRIVATE ../src/armnnUtils)
93 target_link_libraries(${testName} inferenceTest)
94 target_link_libraries(${testName} armnnTfParser)
95 target_link_libraries(${testName} armnn)
96 target_link_libraries(${testName} ${CMAKE_THREAD_LIBS_INIT})
98 target_link_libraries(${testName} ${OPENCL_LIBRARIES})
100 target_link_libraries(${testName}
101 ${Boost_SYSTEM_LIBRARY}
102 ${Boost_FILESYSTEM_LIBRARY}
103 ${Boost_PROGRAM_OPTIONS_LIBRARY})
104 addDllCopyCommands(${testName})
107 set(TfMnist-Armnn_sources
108 TfMnist-Armnn/TfMnist-Armnn.cpp
111 TfParserTest(TfMnist-Armnn "${TfMnist-Armnn_sources}")
113 set(TfCifar10-Armnn_sources
114 TfCifar10-Armnn/TfCifar10-Armnn.cpp
117 TfParserTest(TfCifar10-Armnn "${TfCifar10-Armnn_sources}")
119 set(TfMobileNet-Armnn_sources
120 TfMobileNet-Armnn/TfMobileNet-Armnn.cpp
121 MobileNetDatabase.hpp
122 MobileNetDatabase.cpp)
123 TfParserTest(TfMobileNet-Armnn "${TfMobileNet-Armnn_sources}")
125 set(TfInceptionV3-Armnn_sources
126 TfInceptionV3-Armnn/TfInceptionV3-Armnn.cpp
127 MobileNetDatabase.hpp
128 MobileNetDatabase.cpp)
129 TfParserTest(TfInceptionV3-Armnn "${TfInceptionV3-Armnn_sources}")
131 set(TfResNext-Armnn_sources
132 TfResNext_Quantized-Armnn/TfResNext_Quantized-Armnn.cpp
134 ImageNetDatabase.cpp)
135 TfParserTest(TfResNext-Armnn "${TfResNext-Armnn_sources}")
138 if (BUILD_CAFFE_PARSER OR BUILD_TF_PARSER)
139 set(ExecuteNetwork_sources
140 ExecuteNetwork/ExecuteNetwork.cpp)
142 add_executable_ex(ExecuteNetwork ${ExecuteNetwork_sources})
143 target_include_directories(ExecuteNetwork PRIVATE ../src/armnnUtils)
145 if (BUILD_CAFFE_PARSER)
146 target_link_libraries(ExecuteNetwork armnnCaffeParser)
149 target_link_libraries(ExecuteNetwork armnnTfParser)
151 target_link_libraries(ExecuteNetwork armnn)
152 target_link_libraries(ExecuteNetwork ${CMAKE_THREAD_LIBS_INIT})
154 target_link_libraries(ExecuteNetwork ${OPENCL_LIBRARIES})
156 target_link_libraries(ExecuteNetwork
157 ${Boost_SYSTEM_LIBRARY}
158 ${Boost_FILESYSTEM_LIBRARY}
159 ${Boost_PROGRAM_OPTIONS_LIBRARY})
160 addDllCopyCommands(ExecuteNetwork)