Move benchmark into contrib (#3774)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 30 Nov 2018 06:58:49 +0000 (15:58 +0900)
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Fri, 30 Nov 2018 06:58:49 +0000 (15:58 +0900)
Move benchmark into contrib
Revise directory structure: use src directory
Revise cmake to reference src directory and check build option

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
CMakeLists.txt
benchmark/CMakeLists.txt [deleted file]
contrib/benchmark_acl/CMakeLists.txt [moved from benchmark/acl/CMakeLists.txt with 64% similarity]
contrib/benchmark_acl/src/Benchmark.cpp [moved from benchmark/acl/Benchmark.cpp with 100% similarity]
contrib/benchmark_acl/src/Benchmark.h [moved from benchmark/acl/Benchmark.h with 100% similarity]
contrib/benchmark_acl/src/benchmark_googlenet.cpp [moved from benchmark/acl/benchmark_googlenet.cpp with 100% similarity]
contrib/benchmark_acl/src/benchmark_inception_v3.cpp [moved from benchmark/acl/benchmark_inception_v3.cpp with 100% similarity]
contrib/benchmark_acl/src/benchmark_mobilenet.cpp [moved from benchmark/acl/benchmark_mobilenet.cpp with 100% similarity]

index 85a81dd..fe56952 100644 (file)
@@ -77,7 +77,6 @@ else("${TARGET_OS}" STREQUAL "android") # General case (non-android build)
   if(NOT OBS_BUILD)
     add_subdirectory(externals)
     add_subdirectory(tools)
-    add_subdirectory(benchmark)
     add_subdirectory(contrib)
   else(NOT OBS_BUILD)
     add_subdirectory(tools/tflite_benchmark)
diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt
deleted file mode 100644 (file)
index e36a0ec..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if(BUILD_BENCHMARK_ACL)
-  add_subdirectory(acl)
-endif(BUILD_BENCHMARK_ACL)
similarity index 64%
rename from benchmark/acl/CMakeLists.txt
rename to contrib/benchmark_acl/CMakeLists.txt
index 3bebc27..b5fa3e5 100644 (file)
@@ -1,20 +1,24 @@
+if(NOT BUILD_BENCHMARK_ACL)
+  return()
+endif(NOT BUILD_BENCHMARK_ACL)
+
 nnfw_find_package(ARMCompute REQUIRED)
 
-add_library(arm_compute_benchmark SHARED "Benchmark.cpp")
+add_library(arm_compute_benchmark SHARED "src/Benchmark.cpp")
 target_include_directories(arm_compute_benchmark PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
 target_link_libraries(arm_compute_benchmark arm_compute_graph)
 install(TARGETS arm_compute_benchmark DESTINATION lib)
 
 # GoogLeNet benchmark
-add_executable(benchmark_googlenet "benchmark_googlenet.cpp")
+add_executable(benchmark_googlenet "src/benchmark_googlenet.cpp")
 target_link_libraries(benchmark_googlenet arm_compute_benchmark)
 
 # GoogLeNet benchmark
-add_executable(benchmark_inception_v3 "benchmark_inception_v3.cpp")
+add_executable(benchmark_inception_v3 "src/benchmark_inception_v3.cpp")
 target_link_libraries(benchmark_inception_v3 arm_compute_benchmark)
 
 # MobileNet benchmark
-add_executable(benchmark_mobilenet "benchmark_mobilenet.cpp")
+add_executable(benchmark_mobilenet "src/benchmark_mobilenet.cpp")
 target_link_libraries(benchmark_mobilenet arm_compute_benchmark)
 
 install(TARGETS benchmark_googlenet benchmark_inception_v3 benchmark_mobilenet DESTINATION bin)