From 5035c862a901a9caae04b967dd8005c69ecdbd8d Mon Sep 17 00:00:00 2001 From: Advait Jain Date: Mon, 11 Jan 2021 15:59:57 -0800 Subject: [PATCH] Rename ethos-u to ethos_u. Addresses http://b/168824958 --- .../lite/micro/kernels/{ethos-u => ethos_u}/README.md | 6 ++++-- .../lite/micro/kernels/{ethos-u => ethos_u}/ethosu.cc | 0 tensorflow/lite/micro/tools/make/Makefile | 7 ++++--- .../micro/tools/make/ext_libs/{ethos-u.inc => ethos_u.inc} | 0 4 files changed, 8 insertions(+), 5 deletions(-) rename tensorflow/lite/micro/kernels/{ethos-u => ethos_u}/README.md (82%) rename tensorflow/lite/micro/kernels/{ethos-u => ethos_u}/ethosu.cc (100%) rename tensorflow/lite/micro/tools/make/ext_libs/{ethos-u.inc => ethos_u.inc} (100%) diff --git a/tensorflow/lite/micro/kernels/ethos-u/README.md b/tensorflow/lite/micro/kernels/ethos_u/README.md similarity index 82% rename from tensorflow/lite/micro/kernels/ethos-u/README.md rename to tensorflow/lite/micro/kernels/ethos_u/README.md index 8deb8f271d8..7a560bb8906 100644 --- a/tensorflow/lite/micro/kernels/ethos-u/README.md +++ b/tensorflow/lite/micro/kernels/ethos_u/README.md @@ -1,6 +1,8 @@ + + # Info -To use Ethos-U kernel add TAGS="ethos-u" to the make line. A tflite file +To use Ethos-U kernel add CO_PROCESSOR=ethos_u to the make line. A tflite file compiled by ARM's offline tool Vela is required for it to work. Armclang 6.14 is required as compiler as well. @@ -39,6 +41,6 @@ makefile. Compile a binary with Ethos-U kernel. ``` -make -f tensorflow/lite/micro/tools/make/Makefile network_tester_test TAGS="ethos-u" \ +make -f tensorflow/lite/micro/tools/make/Makefile network_tester_test CO_PROCESSOR=ethos_u \ TARGET= NETWORK_MODEL= ``` diff --git a/tensorflow/lite/micro/kernels/ethos-u/ethosu.cc b/tensorflow/lite/micro/kernels/ethos_u/ethosu.cc similarity index 100% rename from tensorflow/lite/micro/kernels/ethos-u/ethosu.cc rename to tensorflow/lite/micro/kernels/ethos_u/ethosu.cc diff --git a/tensorflow/lite/micro/tools/make/Makefile b/tensorflow/lite/micro/tools/make/Makefile index 509232e8248..68827f98ab6 100644 --- a/tensorflow/lite/micro/tools/make/Makefile +++ b/tensorflow/lite/micro/tools/make/Makefile @@ -103,16 +103,17 @@ MICROLITE_LIBS := -lm # 1. Convert to uppercase (TARGET=xtensa -> -DXTENSA) # 2. (Temporarily) Replace dash with underscore (OPTIMIZED_KERNEL_DIR=cmsis-nn -> -DCMSIS_NN) # -# Transformation 2 is needed because CMSIS-NN and ETHOS-U are not a valid macro names. - +# Transformation 2 is needed because CMSIS-NN is not a valid macro names. ADDITIONAL_DEFINES := -D$(shell echo $(TARGET) | tr [a-z] [A-Z]) ifneq ($(OPTIMIZED_KERNEL_DIR),) + # TODO(b/168824958): remove dash->underscore transformation once the cmsis-nn + # directory has been renamed. ADDITIONAL_DEFINES += -D$(shell echo $(OPTIMIZED_KERNEL_DIR) | tr [a-z] [A-Z] | tr - _) endif ifneq ($(CO_PROCESSOR),) - ADDITIONAL_DEFINES += -D$(shell echo $(CO_PROCESSOR) | tr [a-z] [A-Z] | tr - _) + ADDITIONAL_DEFINES += -D$(shell echo $(CO_PROCESSOR) | tr [a-z] [A-Z]) endif OPTIMIZATION_LEVEL := -O3 diff --git a/tensorflow/lite/micro/tools/make/ext_libs/ethos-u.inc b/tensorflow/lite/micro/tools/make/ext_libs/ethos_u.inc similarity index 100% rename from tensorflow/lite/micro/tools/make/ext_libs/ethos-u.inc rename to tensorflow/lite/micro/tools/make/ext_libs/ethos_u.inc