Note that we will need to manually ensure that any new bazel package has the leyering_check disabled. The internal builds have layering_check turned on by default, while the open-source builds have them turned off by default. Ideally, we would explicitly turn them on for the open-source build. However, turning it on (with `layering_check` instead of `-layering_check`) and building with this command: ``` bazel build tensorflow/lite/micro/kernels:add_test --repo_env=CC=`which clang` ``` results in a number of additional build errors that will need much broader changes to the TFLM BUILD files to fix. As a result, we are currently turning off the layering_check to at least make the internal and external builds consistent. Fixes #46347 See http://b/177257332 for more internal-only context. |
||
---|---|---|
.. | ||
BUILD | ||
generate_flexbuffers_data.cc | ||
README.md |
Background
As a Custom operator, detection_postprocess is using Flexbuffers library. In the unit test there is a need to use flexbuffers::Builder since the operator itself use flexbuffers::Map. However flexbuffers::Builder can not be used for most targets (basically only on X86), since it is using std::vector and std::map. Therefore the flexbuffers::Builder data is pregenerated on X86.
How to generate new data:
```g++ -I../../../micro/tools/make/downloads/flatbuffers/include generate_flexbuffers_data.cc && ./a.out > ../flexbuffers_generated_data.cc```