Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ci compilation bug for esp32 and tensorflow
Fixes #25 At the -O2 optimization level we get gcc compiler errors which break the build: root@907bbbd0af42:/opt/tflite-micro-micropython/tensorflow# xtensa-esp32-elf-g++ -DNDEBUG -std=c++11 -fstrict-vol atile-bitfields -mlongcalls -nostdlib -fno-rtti -fno-exceptions -fno-threadsafe-statics -Werror -fno-unwind-tables -ffunction-sections -fdata-sections -fmessage-length=0 -DTF_LITE_STATIC_MEMORY -DTF_LITE_DISABLE_X86_NEON -Wsign- compare -Wdouble-promotion -Wshadow -Wunused-variable -Wmissing-field-initializers -Wunused-function -Wswitch -Wvl a -Wall -Wextra -Wstrict-aliasing -Wno-unused-parameter -DESP -Wno-return-type -Wno-strict-aliasing -Wno-ignored-q ualifiers -Wno-return-type -Wno-strict-aliasing -O2 -I. -Itensorflow/lite/micro/tools/make/downloads/gemmlowp -Ite nsorflow/lite/micro/tools/make/downloads/flatbuffers/include -Itensorflow/lite/micro/tools/make/downloads/ruy -Ite nsorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_default/genfiles/ -Itensorflow/lite/micro/tools/make/downloads /kissfft -c tensorflow/lite/micro/kernels/l2_pool_2d.cc -o tensorflow/lite/micro/tools/make/gen/esp_xtensa-esp32_d efault/obj/kernels/tensorflow/lite/micro/kernels/l2_pool_2d.o tensorflow/lite/micro/kernels/l2_pool_2d.cc: In function 'TfLiteStatus tflite::{anonymous}::L2Eval(TfLiteContext*, TfLiteNode*)': tensorflow/lite/micro/kernels/l2_pool_2d.cc:128:1: error: insn does not satisfy its constraints: } ^ (insn 274 18 183 28 (set (reg/v:SF 20 f1 [orig:77 sum_squares ] [77]) (mem/u/c:SF (symbol_ref/u:SI ("*.LC28") [flags 0x2]) [0 S4 A32])) "./tensorflow/lite/kernels/internal/ref erence/pooling.h":169 47 {movsf_internal} (expr_list:REG_EQUAL (const_double:SF 0.0 [0x0.0p+0]) (nil))) during RTL pass: postreload tensorflow/lite/micro/kernels/l2_pool_2d.cc:128:1: internal compiler error: in extract_constrain_insn, at recog.c: 2210 Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. Also refer to: jcmvbkbc/gcc-xtensa#14 This failure doesn't happen without the micropython specific build options: -fstrict-volatile-bitfields -mlongcalls -nostdlib and it only happens at the -O2 optimization level. This commit works around the problem by switching to the -O3 optimization level.
- Loading branch information