Rename ethos-u to ethos_u.

Addresses http://b/168824958
This commit is contained in:
Advait Jain 2021-01-11 15:59:57 -08:00
parent be308cc157
commit 5035c862a9
4 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,8 @@
<!-- mdformat off(b/169948621#comment2) -->
# 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=<ethos_u_enabled_target> NETWORK_MODEL=<ethos_u_enabled_tflite>
```

View File

@ -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