aboutsummaryrefslogtreecommitdiff
path: root/delegate/cmake/Modules/FindTfLite.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/cmake/Modules/FindTfLite.cmake')
-rw-r--r--delegate/cmake/Modules/FindTfLite.cmake95
1 files changed, 91 insertions, 4 deletions
diff --git a/delegate/cmake/Modules/FindTfLite.cmake b/delegate/cmake/Modules/FindTfLite.cmake
index 907c3847cb..22c583a323 100644
--- a/delegate/cmake/Modules/FindTfLite.cmake
+++ b/delegate/cmake/Modules/FindTfLite.cmake
@@ -24,22 +24,109 @@ if (TfLite_LIB MATCHES .a$)
message("-- Static tensorflow lite library found, using for ArmNN build")
find_library(TfLite_abseilstrings_LIB "libabsl_strings.a"
PATH ${TFLITE_LIB_ROOT}/_deps/abseil-cpp-build/absl/strings)
+ find_library(TfLite_abseil_synchronization_LIB "libabsl_synchronization.a"
+ PATH ${TFLITE_LIB_ROOT}/_deps/abseil-cpp-build/absl/synchronization)
+
+
find_library(TfLite_farmhash_LIB "libfarmhash.a"
PATH ${TFLITE_LIB_ROOT}/_deps/farmhash-build)
find_library(TfLite_fftsg_LIB "libfft2d_fftsg.a"
PATH ${TFLITE_LIB_ROOT}/_deps/fft2d-build)
find_library(TfLite_fftsg2d_LIB "libfft2d_fftsg2d.a"
PATH ${TFLITE_LIB_ROOT}/_deps/fft2d-build)
- find_library(TfLite_ruy_LIB "libruy.a" PATH
- ${TFLITE_LIB_ROOT}/_deps/ruy-build)
find_library(TfLite_flatbuffers_LIB "libflatbuffers.a"
PATH ${TFLITE_LIB_ROOT}/_deps/flatbuffers-build)
+ find_library(TfLite_cpuinfo_LIB "libcpuinfo.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/cpuinfo-build)
+ find_library(TfLite_clog_LIB "libclog.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/clog-build)
+
+ # All remaining libraries are part of libruy.
+ find_library(TfLite_ruy_allocator_LIB "libruy_allocator.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_apply_multiplier_LIB "libruy_apply_multiplier.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_blocking_counter_LIB "libruy_blocking_counter.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_block_map_LIB "libruy_block_map.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_context_LIB "libruy_context.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_context_get_ctx_LIB "libruy_context_get_ctx.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_cpuinfo_LIB "libruy_cpuinfo.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_ctx_LIB "libruy_ctx.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_denormal_LIB "libruy_denormal.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_frontend_LIB "libruy_frontend.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_have_built_path_for_avx2_fma_LIB "libruy_have_built_path_for_avx2_fma.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_have_built_path_for_avx512_LIB "libruy_have_built_path_for_avx512.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_have_built_path_for_avx_LIB "libruy_have_built_path_for_avx.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_kernel_arm_LIB "libruy_kernel_arm.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_kernel_avx2_fma_LIB "libruy_kernel_avx2_fma.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_kernel_avx512_LIB "libruy_kernel_avx512.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_kernel_avx_LIB "libruy_kernel_avx.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_pack_arm_LIB "libruy_pack_arm.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_pack_avx2_fma_LIB "libruy_pack_avx2_fma.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_pack_avx512_LIB "libruy_pack_avx512.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_pack_avx_LIB "libruy_pack_avx.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_prepacked_cache_LIB "libruy_prepacked_cache.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_prepare_packed_matrices_LIB "libruy_prepare_packed_matrices.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_system_aligned_alloc_LIB "libruy_system_aligned_alloc.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_threadpool_LIB "libruy_thread_pool.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_trmul_LIB "libruy_trmul.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_tune_LIB "libruy_tune.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_wait_LIB "libruy_wait.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy)
+ find_library(TfLite_ruy_profiler_LIB "libruy_profiler_instrumentation.a" PATH
+ ${TFLITE_LIB_ROOT}/_deps/ruy-build/ruy/profiler)
## Set TFLITE_FOUND if all libraries are satisfied for static lib
- find_package_handle_standard_args(TfLite DEFAULT_MSG TfLite_LIB TfLite_abseilstrings_LIB TfLite_ruy_LIB TfLite_fftsg_LIB TfLite_fftsg2d_LIB TfLite_farmhash_LIB TfLite_flatbuffers_LIB)
+ find_package_handle_standard_args(TfLite DEFAULT_MSG TfLite_LIB TfLite_abseilstrings_LIB TfLite_farmhash_LIB TfLite_fftsg_LIB TfLite_fftsg2d_LIB
+ TfLite_flatbuffers_LIB TfLite_ruy_allocator_LIB TfLite_ruy_apply_multiplier_LIB TfLite_ruy_blocking_counter_LIB
+ TfLite_ruy_block_map_LIB TfLite_ruy_context_LIB TfLite_ruy_context_get_ctx_LIB TfLite_ruy_cpuinfo_LIB
+ TfLite_ruy_ctx_LIB TfLite_ruy_denormal_LIB TfLite_ruy_frontend_LIB TfLite_ruy_have_built_path_for_avx2_fma_LIB
+ TfLite_ruy_have_built_path_for_avx512_LIB TfLite_ruy_have_built_path_for_avx_LIB TfLite_ruy_kernel_arm_LIB
+ TfLite_ruy_kernel_avx2_fma_LIB TfLite_ruy_kernel_avx512_LIB TfLite_ruy_kernel_avx_LIB TfLite_ruy_pack_arm_LIB
+ TfLite_ruy_pack_avx2_fma_LIB TfLite_ruy_pack_avx512_LIB TfLite_ruy_pack_avx_LIB TfLite_ruy_prepacked_cache_LIB
+ TfLite_ruy_prepare_packed_matrices_LIB TfLite_ruy_system_aligned_alloc_LIB TfLite_ruy_threadpool_LIB
+ TfLite_ruy_trmul_LIB TfLite_ruy_tune_LIB TfLite_ruy_wait_LIB TfLite_ruy_profiler_LIB TfLite_cpuinfo_LIB TfLite_clog_LIB
+ TfLite_abseil_synchronization_LIB)
# Set external variables for usage in CMakeLists.txt
if (TFLITE_FOUND)
- set(TfLite_LIB ${TfLite_LIB} ${TfLite_abseilstrings_LIB} ${TfLite_ruy_LIB} ${TfLite_fftsg_LIB} ${TfLite_fftsg2d_LIB} ${TfLite_farmhash_LIB} ${TfLite_flatbuffers_LIB})
+ # WARNING! The order of these libraries is critical. Moving them
+ # around will result in linker errors in DelegateUnitTests.
+ set(TfLite_LIB ${TfLite_LIB} ${TfLite_abseilstrings_LIB} ${TfLite_farmhash_LIB} ${TfLite_fftsg_LIB} ${TfLite_fftsg2d_LIB} ${TfLite_ruy_threadpool_LIB}
+ ${TfLite_flatbuffers_LIB} ${TfLite_ruy_allocator_LIB} ${TfLite_ruy_apply_multiplier_LIB} ${TfLite_ruy_blocking_counter_LIB}
+ ${TfLite_ruy_frontend_LIB} ${TfLite_ruy_trmul_LIB} ${TfLite_ruy_block_map_LIB} ${TfLite_ruy_context_LIB}
+ ${TfLite_ruy_context_get_ctx_LIB} ${TfLite_ruy_cpuinfo_LIB} ${TfLite_ruy_ctx_LIB} ${TfLite_ruy_denormal_LIB}
+ ${TfLite_ruy_have_built_path_for_avx2_fma_LIB} ${TfLite_ruy_have_built_path_for_avx512_LIB}
+ ${TfLite_ruy_have_built_path_for_avx_LIB} ${TfLite_ruy_kernel_arm_LIB} ${TfLite_ruy_kernel_avx2_fma_LIB}
+ ${TfLite_ruy_kernel_avx512_LIB} ${TfLite_ruy_kernel_avx_LIB} ${TfLite_ruy_pack_arm_LIB}
+ ${TfLite_ruy_pack_avx2_fma_LIB} ${TfLite_ruy_pack_avx512_LIB} ${TfLite_ruy_pack_avx_LIB} ${TfLite_ruy_prepacked_cache_LIB}
+ ${TfLite_ruy_prepare_packed_matrices_LIB} ${TfLite_ruy_system_aligned_alloc_LIB}
+ ${TfLite_ruy_tune_LIB} ${TfLite_ruy_wait_LIB} ${TfLite_ruy_profiler_LIB}
+ ${TfLite_cpuinfo_LIB} ${TfLite_clog_LIB} ${TfLite_abseil_synchronization_LIB})
endif ()
elseif (TfLite_LIB MATCHES .so$)
message("-- Dynamic tensorflow lite library found, using for ArmNN build")