Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tensorflow build in esp32 ci build #25

Closed
mocleiri opened this issue Aug 19, 2021 · 1 comment
Closed

Fix tensorflow build in esp32 ci build #25

mocleiri opened this issue Aug 19, 2021 · 1 comment

Comments

@mocleiri
Copy link
Owner

When I manually updated the tensorflow submodule reference the build broke with a GCC error:

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.

@mocleiri
Copy link
Owner Author

jcmvbkbc/gcc-xtensa#14 talks about a similar gcc error. It says there are problems with -O2 optimizations that trigger this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant