* Switch from the github.com/tensorflow/tensorflow repository to the new github.com/google-ai-edge/LiteRT repository for TFLite sources.
* Fix up include paths.
* More fixes.
* Fix more paths.
* Re-add missing python fixes.
* Re-add missing python fixes.
* Re-run `bazel run //third_party:python_requirements.update -- --upgrade` with Python 3.12.
* Revert third_party/python_requirements.txt.
---------
Co-authored-by: Esun Kim <veblush@google.com>
- Upgraded the Bazel BuildTool to the latest version (8.2.1).
- Updated the `tflm-ci` Docker image and pushed the new tag (0.6.1) to the `ghcr.io/tflm-bot/tflm-ci registry`.
- Updated the WORKSPACE to load `rules_cc` and `rules_shell` explicitly
- Ran `buildifier` to ensure all BUILD files to have all the fixes.
BUG=Clean-up
* Explicitly delete shared TFL/TFLM files prior to sync'ing so that stale files are deleted.
* Added a bazel build to the project generation CI. This catches errors like http://b/261106859 that were not caught with the Makefile.
* Manually ran the sync script: `ci/sync_from_upstream_tf.sh` and included the changes as a separate commit (https://github.com/tensorflow/tflite-micro/pull/1606/commits/99c7ff8a5f2907379002603fc13c40f5077f46dc)
Tested:
* Confirmed that the new bazel build in test_project_generation would have caught http://b/261106859 by uploading commits with the stale files and seeing that the presubmit checks fail with errors like:
```
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/_objs/libtflm/0/common.pic.o: previous definition here
/usr/bin/ld.gold: error: bazel-out/k8-fastbuild/bin/_objs/libtflm/1/common.pic.o: multiple definition of 'TfLiteOpaqueDelegateDelete'
/usr/bin/ld.gold: bazel-out/k8-fastbuild/bin/_objs/libtflm/0/common.pic.o: previous definition here
collect2: error: ld returned 1 exit status
Target //:libtflm failed to build
```
BUG=http://b/261106859
* added the new files to be sync'd to `ci/tflite_files.txt`
* manually ran the sync script: `ci/sync_from_upstream_tf.sh`
* update BUILD files to match changes from http://cl/488654028
Note that the changes from e6b9bd0190 are also included in this PR due to running sync script.
NO_CHECK_TFLITE_FILES=manual sync from upstream TF
BUG=http://b/259507701
The automatic sync job from tflite to tflm is failing due to some incompatibility in cpp version. TFLM uses c++11. The three commits can be described as
1. The output of the sync_from_upstream_tf.sh. This script pull in the differences from the tflite repo to tflm repo.
2. http://b/255803710: In cpp11 constexpr methods should have one return statement.
3. http://b/254707165: Need reinterpret_cast to be able to compile with cpp11.
BUG=http://b/254707165 / http://b/255803710
NO_CHECK_TFLITE_FILES=automated sync file changes with some bug fixes
* Sync from upstream TF.
* Generate C++ bindings for schema as part of the import.
Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
Co-authored-by: Advait Jain <advaitjain@google.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Remove obsolete common.c
As noted in PR #935, upstream rename common.cc to common.c.
PR #935 import common.cc, but did not remove common.c.
This PR removes common.c from tflite_micro repo.
BUG=offline observation
* Update BUILD
This PR:
1. Update the tflite_files.txt with two additional files to be
pulled in
2. Add build rules to include context_util, builtin_op_data.h
and builtin_ops.h
3. Sync from upstream manually
BUG=observe errors in automatically
sync from upstream
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Use SUB kernels instead of ADD kernels with negative multiplier.
The change will allow to restrict multipliers to positive integers in MultiplyByQuantizedMultiplier.
* Manually run sync from TF to TFLM to get the changes from https://github.com/tensorflow/tensorflow/pull/50615
Co-authored-by: Advait Jain <advaitjain@google.com>
* Add NonPersistentMemoryPlanner integration test with MicroAllocator
Add a buffer_request_count to keep track of buffer request to do error
checking.
Also rename variable names in NonpersistentMemoryPlannerShim per extra
review comments.
This corresponds to internal cl/403489054
BUG=http://b/199230276
* Add build file format check and fix in test_code.sh
Also run format fix on all BUILD and bzl files.
After this PR, BUILD and bzl files will be checked in presubmit.
BUG=http://b/203803273
* Move change in test_code_style.sh into a separate PR