Rename libs/util to libs/misc and update cmake (#3962)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 10 Dec 2018 11:23:19 +0000 (20:23 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 10 Dec 2018 11:23:19 +0000 (20:23 +0900)
Rename libs/util to libs/misc
Use static build only

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
56 files changed:
contrib/detection/CMakeLists.txt
contrib/kerneltesting/CMakeLists.txt
libs/misc/CMakeLists.txt [new file with mode: 0644]
libs/misc/examples/tensor_index_iterator.cpp [moved from libs/util/examples/tensor_index_iterator.cpp with 100% similarity]
libs/misc/include/util/EnvVar.h [moved from libs/util/include/util/EnvVar.h with 100% similarity]
libs/misc/include/util/benchmark.h [moved from libs/util/include/util/benchmark.h with 100% similarity]
libs/misc/include/util/environment.h [moved from libs/util/include/util/environment.h with 100% similarity]
libs/misc/include/util/feature/Index.h [moved from libs/util/include/util/feature/Index.h with 100% similarity]
libs/misc/include/util/feature/IndexIterator.h [moved from libs/util/include/util/feature/IndexIterator.h with 100% similarity]
libs/misc/include/util/feature/Object.h [moved from libs/util/include/util/feature/Object.h with 100% similarity]
libs/misc/include/util/feature/Reader.h [moved from libs/util/include/util/feature/Reader.h with 100% similarity]
libs/misc/include/util/feature/Shape.h [moved from libs/util/include/util/feature/Shape.h with 100% similarity]
libs/misc/include/util/feature/TextFormatter.h [moved from libs/util/include/util/feature/TextFormatter.h with 100% similarity]
libs/misc/include/util/fp32.h [moved from libs/util/include/util/fp32.h with 100% similarity]
libs/misc/include/util/kernel/IndexIterator.h [moved from libs/util/include/util/kernel/IndexIterator.h with 100% similarity]
libs/misc/include/util/kernel/RandomObject.h [moved from libs/util/include/util/kernel/RandomObject.h with 100% similarity]
libs/misc/include/util/kernel/Reader.h [moved from libs/util/include/util/kernel/Reader.h with 100% similarity]
libs/misc/include/util/kernel/Shape.h [moved from libs/util/include/util/kernel/Shape.h with 100% similarity]
libs/misc/include/util/matrix/IndexIterator.h [moved from libs/util/include/util/matrix/IndexIterator.h with 100% similarity]
libs/misc/include/util/matrix/Reader.h [moved from libs/util/include/util/matrix/Reader.h with 100% similarity]
libs/misc/include/util/matrix/Shape.h [moved from libs/util/include/util/matrix/Shape.h with 100% similarity]
libs/misc/include/util/profiling/profile_buffer.h [moved from libs/util/include/util/profiling/profile_buffer.h with 100% similarity]
libs/misc/include/util/profiling/profiler.h [moved from libs/util/include/util/profiling/profiler.h with 100% similarity]
libs/misc/include/util/profiling/profiling.h [moved from libs/util/include/util/profiling/profiling.h with 100% similarity]
libs/misc/include/util/profiling/time.h [moved from libs/util/include/util/profiling/time.h with 100% similarity]
libs/misc/include/util/tensor/Comparator.h [moved from libs/util/include/util/tensor/Comparator.h with 100% similarity]
libs/misc/include/util/tensor/Diff.h [moved from libs/util/include/util/tensor/Diff.h with 100% similarity]
libs/misc/include/util/tensor/Index.h [moved from libs/util/include/util/tensor/Index.h with 100% similarity]
libs/misc/include/util/tensor/IndexEnumerator.h [moved from libs/util/include/util/tensor/IndexEnumerator.h with 100% similarity]
libs/misc/include/util/tensor/IndexFormatter.h [moved from libs/util/include/util/tensor/IndexFormatter.h with 100% similarity]
libs/misc/include/util/tensor/IndexIterator.h [moved from libs/util/include/util/tensor/IndexIterator.h with 100% similarity]
libs/misc/include/util/tensor/NonIncreasingStride.h [moved from libs/util/include/util/tensor/NonIncreasingStride.h with 100% similarity]
libs/misc/include/util/tensor/Object.h [moved from libs/util/include/util/tensor/Object.h with 100% similarity]
libs/misc/include/util/tensor/Reader.h [moved from libs/util/include/util/tensor/Reader.h with 100% similarity]
libs/misc/include/util/tensor/Shape.h [moved from libs/util/include/util/tensor/Shape.h with 100% similarity]
libs/misc/include/util/tensor/Zipper.h [moved from libs/util/include/util/tensor/Zipper.h with 100% similarity]
libs/misc/include/util/vector.h [moved from libs/util/include/util/vector.h with 100% similarity]
libs/misc/include/util/vector/Object.h [moved from libs/util/include/util/vector/Object.h with 100% similarity]
libs/misc/include/util/vector/Reader.h [moved from libs/util/include/util/vector/Reader.h with 100% similarity]
libs/misc/src/environment.cpp [moved from libs/util/src/environment.cpp with 100% similarity]
libs/misc/src/profiling/.FORMATDENY [moved from libs/util/src/profiling/.FORMATDENY with 100% similarity]
libs/misc/src/profiling/time.cc [moved from libs/util/src/profiling/time.cc with 100% similarity]
libs/misc/src/tensor/Comparator.cpp [moved from libs/util/src/tensor/Comparator.cpp with 100% similarity]
libs/misc/src/tensor/IndexFormatter.cpp [moved from libs/util/src/tensor/IndexFormatter.cpp with 100% similarity]
libs/misc/src/tensor/NonIncreasingStride.cpp [moved from libs/util/src/tensor/NonIncreasingStride.cpp with 100% similarity]
libs/misc/src/tensor/Shape.cpp [moved from libs/util/src/tensor/Shape.cpp with 100% similarity]
libs/nnapi/CMakeLists.txt
libs/tflite/CMakeLists.txt
libs/util/CMakeLists.txt [deleted file]
runtimes/neurun/CMakeLists.txt
runtimes/neurun/src/backend/cpu/CMakeLists.txt
runtimes/neurun/src/kernel/cpu/CMakeLists.txt
runtimes/pure_arm_compute/CMakeLists.txt
tools/nnapi_quickcheck/CMakeLists.txt
tools/tflite_benchmark/CMakeLists.txt
tools/tflite_benchmark_model/CMakeLists.txt

index 23a529c..37d91b5 100644 (file)
@@ -7,5 +7,5 @@ nnfw_find_package(Tensorflow REQUIRED)
 list(APPEND SOURCES detection.cpp)
 
 add_executable(detection ${SOURCES})
-target_link_libraries(detection nnfw_util)
+target_link_libraries(detection nnfw_lib_misc)
 target_link_libraries(detection tensorflow-core)
index ba0d808..94e36df 100644 (file)
@@ -13,7 +13,7 @@ function(add_kerneltesting TESTNAME SRC_FILES)
     add_executable(${TESTNAME} ${SRC_FILES})
     target_include_directories(${TESTNAME} PUBLIC
                                ${NNFW_INCLUDE_DIR})
-    target_link_libraries(${TESTNAME} nnfw_util arm_compute_graph)
+    target_link_libraries(${TESTNAME} nnfw_lib_misc arm_compute_graph)
     install(TARGETS ${TESTNAME} DESTINATION bin)
 endfunction()
 
diff --git a/libs/misc/CMakeLists.txt b/libs/misc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..393e390
--- /dev/null
@@ -0,0 +1,14 @@
+# Library `nnfw_lib_misc`
+set(NNFW_UTILITY_SRCS src/environment.cpp)
+list(APPEND NNFW_UTILITY_SRCS src/tensor/Shape.cpp)
+list(APPEND NNFW_UTILITY_SRCS src/tensor/NonIncreasingStride.cpp)
+list(APPEND NNFW_UTILITY_SRCS src/tensor/IndexFormatter.cpp)
+list(APPEND NNFW_UTILITY_SRCS src/tensor/Comparator.cpp)
+list(APPEND NNFW_UTILITY_SRCS src/profiling/time.cc)
+
+add_library(nnfw_lib_misc STATIC ${NNFW_UTILITY_SRCS})
+target_include_directories(nnfw_lib_misc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
+set_target_properties(nnfw_lib_misc PROPERTIES POSITION_INDEPENDENT_CODE ON)
+
+add_executable(nnfw_tensor_index_iterator "examples/tensor_index_iterator.cpp")
+target_link_libraries(nnfw_tensor_index_iterator nnfw_lib_misc)
index 21f473b..94be0e9 100644 (file)
@@ -3,4 +3,4 @@ file(GLOB_RECURSE SOURCES "src/*.cpp")
 add_library(nnfw_lib_nnapi STATIC ${SOURCES})
 set_property(TARGET nnfw_lib_nnapi PROPERTY POSITION_INDEPENDENT_CODE ON)
 target_include_directories(nnfw_lib_nnapi PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include)
-target_link_libraries(nnfw_lib_nnapi static_nnfw_util)
+target_link_libraries(nnfw_lib_nnapi nnfw_lib_misc)
index 78193b1..3ec71f2 100644 (file)
@@ -6,7 +6,7 @@ add_library(nnfw_support_tflite STATIC ${SOURCES})
 set_target_properties(nnfw_support_tflite PROPERTIES POSITION_INDEPENDENT_CODE ON)
 target_include_directories(nnfw_support_tflite PUBLIC ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include)
 target_link_libraries(nnfw_support_tflite tensorflow-lite ${LIB_PTHREAD} dl)
-target_link_libraries(nnfw_support_tflite static_nnfw_util)
+target_link_libraries(nnfw_support_tflite nnfw_lib_misc)
 
 add_executable(nnfw_support_tflite_test_TensorView src/TensorView.test.cpp)
 target_link_libraries(nnfw_support_tflite_test_TensorView nnfw_support_tflite)
diff --git a/libs/util/CMakeLists.txt b/libs/util/CMakeLists.txt
deleted file mode 100644 (file)
index 718a096..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# Library `nnfw_util`
-set(NNFW_UTILITY_SRCS src/environment.cpp)
-list(APPEND NNFW_UTILITY_SRCS src/tensor/Shape.cpp)
-list(APPEND NNFW_UTILITY_SRCS src/tensor/NonIncreasingStride.cpp)
-list(APPEND NNFW_UTILITY_SRCS src/tensor/IndexFormatter.cpp)
-list(APPEND NNFW_UTILITY_SRCS src/tensor/Comparator.cpp)
-if(BUILD_TFLITE_BENCHMARK_MODEL)
-  list(APPEND NNFW_UTILITY_SRCS src/profiling/time.cc)
-endif()
-
-add_library(nnfw_util SHARED ${NNFW_UTILITY_SRCS})
-target_include_directories(nnfw_util PUBLIC ${NNFW_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include)
-
-add_library(static_nnfw_util STATIC ${NNFW_UTILITY_SRCS})
-target_include_directories(static_nnfw_util PUBLIC ${NNFW_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include)
-set_target_properties(static_nnfw_util PROPERTIES POSITION_INDEPENDENT_CODE ON)
-
-install(TARGETS nnfw_util
-        RUNTIME DESTINATION bin COMPONENT libraries
-        LIBRARY DESTINATION lib COMPONENT libraries)
-
-add_executable(nnfw_util_tensor_index_iterator "examples/tensor_index_iterator.cpp")
-target_link_libraries(nnfw_util_tensor_index_iterator nnfw_util)
index 60116dc..dd1f3e8 100644 (file)
@@ -35,7 +35,7 @@ target_include_directories(${LIB_NEURUN} PUBLIC ${NEURUN_INCLUDE_DIR})
 target_include_directories(${LIB_NEURUN} PUBLIC ${CMAKE_SOURCE_DIR}/externals/tensorflow)
 target_link_libraries(${LIB_NEURUN} arm_compute)
 target_link_libraries(${LIB_NEURUN} tensorflow-lite)
-target_link_libraries(${LIB_NEURUN} nnfw_util)
+target_link_libraries(${LIB_NEURUN} nnfw_lib_misc)
 target_link_libraries(${LIB_NEURUN} nnfw_lib_nnapi)
 
 # TODO This will be removed when backends are converted to plugins
index a163fc1..20c4f66 100644 (file)
@@ -8,7 +8,7 @@ target_include_directories(${LIB_NEURUN_BACKEND_CPU} PUBLIC ${CMAKE_SOURCE_DIR}/
 
 target_link_libraries(${LIB_NEURUN_BACKEND_CPU} arm_compute) # TODO We should not need this
 target_link_libraries(${LIB_NEURUN_BACKEND_CPU} tensorflow-lite)
-target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_util)
+target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_lib_misc)
 target_link_libraries(${LIB_NEURUN_BACKEND_CPU} nnfw_lib_cpp14)
 target_link_libraries(${LIB_NEURUN_BACKEND_CPU} ${LIB_NEURUN_KERNEL_CPU})
 # TODO remove this line once acl dependency is removed from PermuteLayer
index 542d462..c8ea85b 100644 (file)
@@ -8,7 +8,7 @@ target_include_directories(${LIB_NEURUN_KERNEL_CPU} PUBLIC ${CMAKE_SOURCE_DIR}/e
 
 target_link_libraries(${LIB_NEURUN_KERNEL_CPU} arm_compute) # TODO We should not need this
 target_link_libraries(${LIB_NEURUN_KERNEL_CPU} tensorflow-lite)
-target_link_libraries(${LIB_NEURUN_KERNEL_CPU} nnfw_util)
+target_link_libraries(${LIB_NEURUN_KERNEL_CPU} nnfw_lib_misc)
 
 set_target_properties(${LIB_NEURUN_KERNEL_CPU} PROPERTIES POSITION_INDEPENDENT_CODE ON)
 set_target_properties(${LIB_NEURUN_KERNEL_CPU} PROPERTIES OUTPUT_NAME kernel_cpu)
index df5fa72..bf6ca06 100644 (file)
@@ -16,7 +16,7 @@ if(BUILD_TFLITE_BENCHMARK_MODEL)
 endif()
 target_link_libraries(nnapi_pure_arm_compute arm_compute)
 target_link_libraries(nnapi_pure_arm_compute arm_compute_ex)
-target_link_libraries(nnapi_pure_arm_compute static_nnfw_util)
+target_link_libraries(nnapi_pure_arm_compute nnfw_lib_misc)
 target_link_libraries(nnapi_pure_arm_compute nnfw_lib_cpp14)
 
 if("${TARGET_OS}" STREQUAL "android")
index 9dd7f5b..68a7927 100644 (file)
@@ -8,7 +8,7 @@ list(REMOVE_ITEM NNAPI_QUICKCHECK_LIB_SOURCES ${NNAPI_QUICKCHECK_LIB_TESTS})
 
 add_library(nnapi_quickcheck_common ${NNAPI_QUICKCHECK_LIB_SOURCES})
 target_include_directories(nnapi_quickcheck_common PUBLIC "inc")
-target_link_libraries(nnapi_quickcheck_common nnfw_util)
+target_link_libraries(nnapi_quickcheck_common nnfw_lib_misc)
 target_link_libraries(nnapi_quickcheck_common nnfw_support_tflite)
 
 add_executable(nnapi_quickcheck_lib_env_test "lib/env.test.cpp")
index 8452123..89a93be 100644 (file)
@@ -1,5 +1,5 @@
 list(APPEND SOURCES "src/tflite_benchmark.cc")
 
 add_executable(tflite_benchmark ${SOURCES})
-target_link_libraries(tflite_benchmark nnfw_support_tflite tensorflow-lite ${LIB_PTHREAD} dl nnfw_util)
+target_link_libraries(tflite_benchmark nnfw_support_tflite tensorflow-lite ${LIB_PTHREAD} dl nnfw_lib_misc)
 install(TARGETS tflite_benchmark DESTINATION bin)
index dd54dc5..08c73b2 100644 (file)
@@ -9,5 +9,5 @@ list(APPEND SOURCES "${TENSORFLOW_LITE_BASE}/tools/benchmark/benchmark_main.cc"
 
 add_executable(tflite_benchmark_model ${SOURCES})
 target_compile_definitions(tflite_benchmark_model PUBLIC "TFLITE_PROFILING_ENABLED")
-target_link_libraries(tflite_benchmark_model tensorflow-lite ${LIB_PTHREAD} dl nnfw_util nnfw_support_tflite)
+target_link_libraries(tflite_benchmark_model tensorflow-lite ${LIB_PTHREAD} dl nnfw_lib_misc nnfw_support_tflite)
 install(TARGETS tflite_benchmark_model DESTINATION bin)