Fixing the markdown and disabling internal auto-formatting.
This commit is contained in:
parent
db14325178
commit
c702a443f5
@ -1,3 +1,5 @@
|
|||||||
|
<!-- mdformat off(b/169948621#comment2) -->
|
||||||
|
|
||||||
# Generic Cortex-Mx customizations
|
# Generic Cortex-Mx customizations
|
||||||
|
|
||||||
The customization requires a definition where the debug log goes to. The purpose
|
The customization requires a definition where the debug log goes to. The purpose
|
||||||
@ -13,42 +15,50 @@ See debug_log_callback.h
|
|||||||
|
|
||||||
# How to build
|
# How to build
|
||||||
|
|
||||||
Required parameters: - TARGET: cortex_m_generic - TARGET_ARCH: cortex-mXX (For
|
Required parameters:
|
||||||
all options see:
|
|
||||||
tensorflow/lite/micro/tools/make/targets/cortex_m_generic_makefile.inc)
|
|
||||||
|
|
||||||
Optional parameters: - TOOLCHAIN: armgcc (default) or armmclang - For
|
- TARGET: cortex_m_generic
|
||||||
Cortex-M55, ARM Compiler 6.14 or later is required.
|
- TARGET_ARCH: cortex-mXX (For all options see: tensorflow/lite/micro/tools/make/targets/cortex_m_generic_makefile.inc)
|
||||||
|
|
||||||
|
Optional parameters:
|
||||||
|
|
||||||
|
- TOOLCHAIN: armgcc (default) or armmclang
|
||||||
|
- For Cortex-M55, ARM Compiler 6.14 or later is required.
|
||||||
|
|
||||||
Some examples:
|
Some examples:
|
||||||
|
|
||||||
Building with arm-gcc ``` make -f tensorflow/lite/micro/tools/make/Makefile
|
Building with arm-gcc
|
||||||
TARGET=cortex_m_generic TARGET_ARCH=cortex-m7 microlite make -f
|
```
|
||||||
tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic
|
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m7 microlite
|
||||||
TARGET_ARCH=cortex-m7 TAGS=cmsis-nn microlite
|
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m7 TAGS=cmsis-nn microlite
|
||||||
|
|
||||||
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic
|
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m4 TAGS=cmsis-nn microlite
|
||||||
TARGET_ARCH=cortex-m4 TAGS=cmsis-nn microlite make -f
|
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m4+fp TAGS=cmsis-nn microlite
|
||||||
tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic
|
```
|
||||||
TARGET_ARCH=cortex-m4+fp TAGS=cmsis-nn microlite ```
|
|
||||||
|
|
||||||
Building with armclang `make -f tensorflow/lite/micro/tools/make/Makefile
|
Building with armclang
|
||||||
TOOLCHAIN=armclang TARGET=cortex_m_generic TARGET_ARCH=cortex-m55 microlite make
|
|
||||||
-f tensorflow/lite/micro/tools/make/Makefile TOOLCHAIN=armclang
|
```
|
||||||
TARGET=cortex_m_generic TARGET_ARCH=cortex-m55 TAGS=cmsis-nn microlite make -f
|
make -f tensorflow/lite/micro/tools/make/Makefile TOOLCHAIN=armclang TARGET=cortex_m_generic TARGET_ARCH=cortex-m55 microlite
|
||||||
tensorflow/lite/micro/tools/make/Makefile TOOLCHAIN=armclang
|
make -f tensorflow/lite/micro/tools/make/Makefile TOOLCHAIN=armclang TARGET=cortex_m_generic TARGET_ARCH=cortex-m55 TAGS=cmsis-nn microlite
|
||||||
TARGET=cortex_m_generic TARGET_ARCH=cortex-m55+nofp TAGS=cmsis-nn microlite`
|
make -f tensorflow/lite/micro/tools/make/Makefile TOOLCHAIN=armclang TARGET=cortex_m_generic TARGET_ARCH=cortex-m55+nofp TAGS=cmsis-nn microlite
|
||||||
|
```
|
||||||
|
|
||||||
The Tensorflow Lite Micro makefiles download a specific version of the arm-gcc
|
The Tensorflow Lite Micro makefiles download a specific version of the arm-gcc
|
||||||
compiler to tensorflow/lite/micro/tools/make/downloads/gcc_embedded. If desired,
|
compiler to tensorflow/lite/micro/tools/make/downloads/gcc_embedded.
|
||||||
a different version can be used by providing `TARGET_TOOLCHAIN_ROOT` option to
|
|
||||||
the Makefile. `make -f tensorflow/lite/micro/tools/make/Makefile
|
If desired, a different version can be used by providing `TARGET_TOOLCHAIN_ROOT`
|
||||||
TARGET=cortex_m_generic TARGET_ARCH=cortex-m4
|
option to the Makefile:
|
||||||
TARGET_TOOLCHAIN_ROOT=/path/to/arm-gcc/ microlite`
|
|
||||||
|
```
|
||||||
|
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m4+fp TARGET_TOOLCHAIN_ROOT=/path/to/arm-gcc/ microlite
|
||||||
|
```
|
||||||
|
|
||||||
Similarly, `TAGS=cmsis-nn` downloads a specific version of CMSIS to
|
Similarly, `TAGS=cmsis-nn` downloads a specific version of CMSIS to
|
||||||
tensorflow/lite/micro/tools/make/downloads/cmsis. While this is the only version
|
tensorflow/lite/micro/tools/make/downloads/cmsis. While this is the only version
|
||||||
that is regularly tested, you can use your own version of CMSIS as well by
|
that is regularly tested, you can use your own version of CMSIS as well by
|
||||||
providing `CMSIS_PATH` to the Makefile: `make -f
|
providing `CMSIS_PATH` to the Makefile:
|
||||||
tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic
|
|
||||||
TARGET_ARCH=cortex-m4 TAGS=cmsis-nn CMSIS_PATH=/path/to/own/cmsis microlite`
|
```
|
||||||
|
make -f tensorflow/lite/micro/tools/make/Makefile TARGET=cortex_m_generic TARGET_ARCH=cortex-m4+fp TAGS=cmsis-nn CMSIS_PATH=/path/to/own/cmsis microlite
|
||||||
|
```
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<!-- mdformat off(b/169948621#comment2) -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Semi-automated TOC generation with instructions from
|
Semi-automated TOC generation with instructions from
|
||||||
https://github.com/ekalinin/github-markdown-toc#auto-insert-and-update-toc
|
https://github.com/ekalinin/github-markdown-toc#auto-insert-and-update-toc
|
||||||
@ -38,13 +40,14 @@ sections:
|
|||||||
|
|
||||||
The illustration below represents typical allocations in TFLM:
|
The illustration below represents typical allocations in TFLM:
|
||||||
|
|
||||||
## ```
|
```
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
| | | | | HEAD |<-- TEMPORARY -->| TAIL |
|
| | | |
|
||||||
|
| HEAD |<-- TEMPORARY -->| TAIL |
|
||||||
## | | | |
|
| | | |
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
* Lowest Address Highest Address * ```
|
* Lowest Address Highest Address *
|
||||||
|
```
|
||||||
|
|
||||||
### Head Section
|
### Head Section
|
||||||
|
|
||||||
@ -129,20 +132,18 @@ interpreter.PrintAllocations();
|
|||||||
|
|
||||||
The output of this call will look something similar to this (output from the
|
The output of this call will look something similar to this (output from the
|
||||||
[memory_arena_threshold_test](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/memory_arena_threshold_test.cc#L205)):
|
[memory_arena_threshold_test](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/memory_arena_threshold_test.cc#L205)):
|
||||||
`sh [RecordingMicroAllocator] Arena allocation total 9568 bytes
|
|
||||||
|
```bash
|
||||||
|
[RecordingMicroAllocator] Arena allocation total 9568 bytes
|
||||||
[RecordingMicroAllocator] Arena allocation head 7744 bytes
|
[RecordingMicroAllocator] Arena allocation head 7744 bytes
|
||||||
[RecordingMicroAllocator] Arena allocation tail 1824 bytes
|
[RecordingMicroAllocator] Arena allocation tail 1824 bytes
|
||||||
[RecordingMicroAllocator] 'TfLiteEvalTensor data' used 360 bytes with alignment
|
[RecordingMicroAllocator] 'TfLiteEvalTensor data' used 360 bytes with alignment overhead (requested 360 bytes for 15 allocations)
|
||||||
overhead (requested 360 bytes for 15 allocations) [RecordingMicroAllocator]
|
[RecordingMicroAllocator] 'Persistent TfLiteTensor data' used 0 bytes with alignment overhead (requested 0 bytes for 0 tensors)
|
||||||
'Persistent TfLiteTensor data' used 0 bytes with alignment overhead (requested 0
|
[RecordingMicroAllocator] 'Persistent TfLiteTensor quantization data' used 0 bytes with alignment overhead (requested 0 bytes for 0 allocations)
|
||||||
bytes for 0 tensors) [RecordingMicroAllocator] 'Persistent TfLiteTensor
|
[RecordingMicroAllocator] 'TfLiteTensor variable buffer data' used 0 bytes with alignment overhead (requested 0 bytes for 0 allocations)
|
||||||
quantization data' used 0 bytes with alignment overhead (requested 0 bytes for 0
|
[RecordingMicroAllocator] 'NodeAndRegistration struct' used 392 bytes with alignment overhead (requested 392 bytes for 7 NodeAndRegistration structs)
|
||||||
allocations) [RecordingMicroAllocator] 'TfLiteTensor variable buffer data' used
|
[RecordingMicroAllocator] 'Operator runtime data' used 136 bytes with alignment overhead (requested 136 bytes for 5 OpData structs)
|
||||||
0 bytes with alignment overhead (requested 0 bytes for 0 allocations)
|
```
|
||||||
[RecordingMicroAllocator] 'NodeAndRegistration struct' used 392 bytes with
|
|
||||||
alignment overhead (requested 392 bytes for 7 NodeAndRegistration structs)
|
|
||||||
[RecordingMicroAllocator] 'Operator runtime data' used 136 bytes with alignment
|
|
||||||
overhead (requested 136 bytes for 5 OpData structs)`
|
|
||||||
|
|
||||||
### Allocation Section Details
|
### Allocation Section Details
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user