* Add a hexagon build presubmit
Also update Hexagon Docker file
* Add a todo for to enable unit test for hexagon
Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
* Make size check workflow error out if memory footprint increase
between head of main and this PR.
This error can be disabled by putting MEM_CHANGE_OK= tag.
In either case, a memory footprint comparison report will be produced
as part of this workflow action.
The plan is for the code reviewer to audit the report when the
PR increase memory footprint and only
allow the PR that increase memory footprint to be merged with
MEM_CHANGE_OK=what_is_the_reason_for_this_increase_and_why_this_is_ok
The PR shall be up to date for the comparison to be accurate.
So before applying MEM_CHANGE_OK=, please make the PR branch up to date.
BUG=http://b/196637015
* Fix an if condition
* Create a test used for binary size test.
Also create a script to generate size report of a such binary.
Modify the size_comp.py to be more generic (not limited to xtensa).
what is tensorflow/lite/micro/tools/ci_build/binary_size_test will
be eventually removed once we verify the feature.
The next PR will update the yml file for the size_check.yml.
BUG=http://b/196637015
* Restore lines that are deleted by mistakes
* Update comments
With this change:
* we are set up to use yapf as part of the docker container
* pigweed patch is updated to use the google Python style (pep8 with indent of 2 spaces)
* some documentation updates.
The code still needs to be formatted, and then the Python formatting check will be turned on as part of ci.
BUG=http://b/194404216
* Have a TFLM-specific version of lite/kernels/op_macros.h
* After this change, we can remove the TFLM-specific code from upstream
Tensorflow.
* Both the TfLite and TFLM implementations of op_macros.h will be
simplified.
BUG=http://b/187728891
NO_CHECK_TFLITE_FILE=lite/kernels/kernel_util.cc will be modified in upstream as well
* Fix target-specific makefile build.
* modify a tflite file in the tflite-micro repository.
* fix the path
* Update workflow logic to complete workflow without error with NO_CHECK_TFLITE_FILES
* revert change to the tflite files.
* fail PRs that overwrite a set of files from upstream
* Change some names, modify Python script logic etc.
* small fixes.
* Use more restrictive TFLM-bot token.
Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
Co-authored-by: Advait Jain <advaitjain@google.com>
Added batch_matmul.h and tensor_utils_common.h that are needed for the BATCH_MATMUL operator.
Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
Add the header containing the reference implementation of op
SPACE_TO_DEPTH to the list of files which are synced from the
upstream TensorFlow repository. This reference is needed for the
forthcoming implementation of SPACE_TO_DEPTH here in micro.
* The TFLM Makefile globs all the shared TFL/TFLM code.
* This allows us to move the explicit list of sources and headers to the
sync script since that is where we determine what code needs to be
sync'd from upstream TF.
With this change, we are ready to have the tflite_micro repository be
the source of truth for all TFLM code and sync only the shared TFL/TFLM
code from the tensorflow repo.
Bug: http://b/182914089
These visibility changes are specific to the TFLM code in
github.com/tensorflow/tflite-micro and would be awkward to upstream to
github.com/tensorflow/tensorflow.
Additionally, we are getting close to switching the current repository
to be the source of truth for TFLM code and have thus made the decision
to temporarily add some patches during the sync from upstream TF to the
current repo.
Manually tested that running `ci/sync_from_upstream_tf.sh` with the
current change avoids reverting the changes from #73 (such as with #76).
* The tests all pass when run locally, but fail when run via actions.
* Removed readable_run and directly logging the build ouput since that
is more convenient with github actions.
* Separated the two Cortex-M tests into their own individual jobs.
Transformation between open-source and internal google is complicated by
the code in neon_check.h and since we do not need it for TFLM, we can
instead have the file be empty.
* removed unnecessary bits from tensorflow/BUILD
* updated the sync script accordingly.
* using test_all.sh instead of test_all_new.sh from Dockerfile.micro
(will not update test_all.sh bsed on upstream TF, and will manually
keep that consistent with upstream TF).
Currently, this script copies the shared TFL/TFLM code as well as the
entire micro sub-folder in Tensorflow. Once TFLM development switches to
using the current repo, the sync script will still be used to get the
shared TFL/TFLM code.
Also, updated the BUILD file to use glob so that there is one less place
to change when a new kernel is ported from TFL to TFLM.
Tested:
* ran the sync script (which updated reduce.h):
```
ci/sync_from_upstream_tf.sh
```
* confirmed that the docker container can run all the tests
successfully:
```
docker build -t tflm-test -f ci/Dockerfile.micro .
docker run --rm tflm-test
```