diff --git a/tensorflow/lite/micro/tools/make/ext_libs/xi_tflmlib_vision_p6.patch b/tensorflow/lite/micro/tools/make/ext_libs/xi_tflmlib_vision_p6.patch new file mode 100644 index 00000000000..d7df52f8c14 --- /dev/null +++ b/tensorflow/lite/micro/tools/make/ext_libs/xi_tflmlib_vision_p6.patch @@ -0,0 +1,28 @@ +From ed92529a6be7a910462558edcf10070fbb0f2870 Mon Sep 17 00:00:00 2001 +From: Ryan Kuester +Date: Thu, 1 Aug 2024 12:48:12 -0500 +Subject: [PATCH] fix: use instead of to access INT_MAX and + friends + +For compatibility with the C++ library standard, use the header, +, to access constants such as INT_MAX. +--- + runtime/include/cnnrt_xi.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/include/cnnrt_xi.h b/runtime/include/cnnrt_xi.h +index f3a911e..00c74b8 100644 +--- a/runtime/include/cnnrt_xi.h ++++ b/runtime/include/cnnrt_xi.h +@@ -25,7 +25,7 @@ + # define INCLUDE_XI_CNN + #endif + +-#include ++#include + #include "xi_api.h" + #include "xi_cnn_api.h" + #include "xi_tile_manager.h" +-- +2.43.0 + diff --git a/tensorflow/lite/micro/tools/make/ext_libs/xtensa_download.sh b/tensorflow/lite/micro/tools/make/ext_libs/xtensa_download.sh index 034efa25a47..97269804e44 100755 --- a/tensorflow/lite/micro/tools/make/ext_libs/xtensa_download.sh +++ b/tensorflow/lite/micro/tools/make/ext_libs/xtensa_download.sh @@ -57,6 +57,7 @@ elif [[ ${2} == "vision_p6" ]]; then LIBRARY_URL="https://github.com/foss-xtensa/tflmlib_vision/raw/main/archive/xi_tflmlib_vision_p6_22_06_29.zip" LIBRARY_DIRNAME="xi_tflmlib_vision_p6" LIBRARY_MD5="fea3720d76fdb3a5a337ace7b6081b56" + PATCH="../../ext_libs/xi_tflmlib_vision_p6.patch" else echo "Attempting to download an unsupported xtensa variant: ${2}" exit 1