Separate core, kernel and third party objects. (#168)
* Separate core, kernel and third party objects.
Add a second optimization level in the Makefile to enable different
levels between kernels and the rest of the TFLM code. This results in a
smaller binary with minimal performance impact compared with using a
single optimization level.
Allows the use of implicit patterns to compile all sources, choosing
different flags for core, kernel and third party sources.
The following measurements are taken using the hexagon toolchain +
hexagon-size and hexagon-sim.
For the keyword benchmark using -O2:
text data bss dec
58140 37639 46612 142391
Cycles: 1700364
For the keyword benchmark using -O2 for kernels and -Oz for framework:
text data bss dec
52796 37623 46612 137031
Cycles: 1759664
* Make the optimization level log an error.
Remove OPTIMIZATION_LEVEL setting for bluepill since core framework now automatically is compiled with -Os.
* Remove section that builds bluepill with -Os since default uses -Os.
* Disable -Werror=vla in order to pass stm32 bare lib presubmit.
* Chnage order so that -Wno-vla takes priority over -Wvla
Co-authored-by: NAdvait Jain <advaitjain@users.noreply.github.com>
Showing
想要评论请 注册 或 登录