From 459569ac5a181e79fe6d1e5b9d61139077b83030 Mon Sep 17 00:00:00 2001 From: ddavis-2015 Date: Sun, 20 Oct 2024 19:17:43 -0700 Subject: [PATCH] use kernel optimzer level -O3 and -LNO:simd for Xtensa HIFI5 --- tensorflow/lite/micro/tools/make/ext_libs/xtensa.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tensorflow/lite/micro/tools/make/ext_libs/xtensa.inc b/tensorflow/lite/micro/tools/make/ext_libs/xtensa.inc index 70e1880c800..28378add2f1 100644 --- a/tensorflow/lite/micro/tools/make/ext_libs/xtensa.inc +++ b/tensorflow/lite/micro/tools/make/ext_libs/xtensa.inc @@ -58,6 +58,10 @@ else ifeq ($(TARGET_ARCH), hifi5) CCFLAGS += $(PLATFORM_FLAGS) CXXFLAGS += $(PLATFORM_FLAGS) + # override KERNEL_OPTIMIZATION_LEVEL to enable higher performance + # Xtensa intrinsics. + KERNEL_OPTIMIZATION_LEVEL := -O3 -LNO:simd + NNLIB_PATH := $(MAKEFILE_DIR)/downloads/xa_nnlib_hifi5 NDSPLIB_PATH := $(MAKEFILE_DIR)/downloads/ndsplib-hifi5