0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-04 18:45:52 +00:00
termux-packages/packages/python-tflite-runtime/0002-include-neon2sse-for-xnnpack.patch
2024-10-27 23:11:38 +08:00

23 lines
736 B
Diff

--- a/tensorflow/lite/CMakeLists.txt
+++ b/tensorflow/lite/CMakeLists.txt
@@ -507,6 +507,11 @@
if(TFLITE_ENABLE_XNNPACK)
find_package(fp16_headers REQUIRED)
find_package(XNNPACK REQUIRED)
+ set(XNNPACK_NEON_2_SSE "")
+ if (NOT CMAKE_SYSTEM_PROCESSOR OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
+ find_package(NEON_2_SSE REQUIRED)
+ list(APPEND XNNPACK_NEON_2_SSE NEON_2_SSE::NEON_2_SSE)
+ endif()
populate_tflite_source_vars("delegates/xnnpack"
TFLITE_DELEGATES_XNNPACK_SRCS
FILTER ".*(_test|_tester)\\.(cc|h)"
@@ -533,6 +538,7 @@
flatbuffers::flatbuffers
gemmlowp::gemmlowp
ruy::ruy
+ ${XNNPACK_NEON_2_SSE}
)
list(APPEND TFLITE_TARGET_PUBLIC_OPTIONS "-DTFLITE_KERNEL_USE_XNNPACK")