parent
be308cc157
commit
5035c862a9
@ -1,6 +1,8 @@
|
|||||||
|
<!-- mdformat off(b/169948621#comment2) -->
|
||||||
|
|
||||||
# Info
|
# 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
|
compiled by ARM's offline tool Vela is required for it to work. Armclang 6.14 is
|
||||||
required as compiler as well.
|
required as compiler as well.
|
||||||
|
|
||||||
@ -39,6 +41,6 @@ makefile.
|
|||||||
Compile a binary with Ethos-U kernel.
|
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>
|
TARGET=<ethos_u_enabled_target> NETWORK_MODEL=<ethos_u_enabled_tflite>
|
||||||
```
|
```
|
@ -103,16 +103,17 @@ MICROLITE_LIBS := -lm
|
|||||||
# 1. Convert to uppercase (TARGET=xtensa -> -DXTENSA)
|
# 1. Convert to uppercase (TARGET=xtensa -> -DXTENSA)
|
||||||
# 2. (Temporarily) Replace dash with underscore (OPTIMIZED_KERNEL_DIR=cmsis-nn -> -DCMSIS_NN)
|
# 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])
|
ADDITIONAL_DEFINES := -D$(shell echo $(TARGET) | tr [a-z] [A-Z])
|
||||||
|
|
||||||
ifneq ($(OPTIMIZED_KERNEL_DIR),)
|
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 - _)
|
ADDITIONAL_DEFINES += -D$(shell echo $(OPTIMIZED_KERNEL_DIR) | tr [a-z] [A-Z] | tr - _)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CO_PROCESSOR),)
|
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
|
endif
|
||||||
|
|
||||||
OPTIMIZATION_LEVEL := -O3
|
OPTIMIZATION_LEVEL := -O3
|
||||||
|
Loading…
Reference in New Issue
Block a user