Commit graph

30 commits

Author SHA1 Message Date
Nat Jeffries
13c69667be
Add features to cast, add slice, clean up split. (#568) 2021-10-04 15:33:41 -07:00
deqiangc
02898348ac
Add a hexagon build presubmit (#518)
* 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>
2021-09-20 22:59:30 +00:00
Nat Jeffries
6768147920
Generate cc and header files for micro_speech. (#429) 2021-08-27 22:18:07 +00:00
deqiangc
406a57cc24
Make size check workflow error out if memory footprint increase (#450)
* 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
2021-08-25 21:58:02 +00:00
deqiangc
9da0734d67
Fix event_name in size_check.yml and also fix permission of size_comp.py to be executable (#434)
BUG=http://b/196637015
2021-08-18 00:20:19 +00:00
deqiangc
b9dd7bad38
Create a binary size test. (#417)
* 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
2021-08-17 20:06:41 +00:00
Advait Jain
766063c53e
Add Pillow to Dockerfile.micro (#415)
* Add Pillow to Dockerfile.micro

Needed with the changes from https://github.com/tensorflow/tflite-micro/pull/410

BUG=http://b/196630709

* address review comments.
2021-08-17 16:18:59 +00:00
jwithers
d9b2263c84
Size comparison for binaries (#254)
* binary size check implementation

* doc comment changes

Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
2021-08-16 17:55:50 +00:00
nyadla-sys
e0ad084b65
Have a TFLM-specific version of lite/kernels/internal/portable_tensor… (#379)
Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
2021-08-09 18:02:34 +00:00
Advait Jain
d5430e855f
Remove files from the tflite_files list that should not be shared. (#340)
* Remove files from the tflite_files list that should not be shared.

This was added with
https://github.com/tensorflow/tflite-micro/pull/134/.

However, the correct approach would be to only pull in the portable
implementations from:
 * be7a4de6ad/tensorflow/lite/kernels/internal/reference/portable_tensor_utils.cc
 * be7a4de6ad/tensorflow/lite/kernels/internal/reference/portable_tensor_utils.h
 * be7a4de6ad/tensorflow/lite/kernels/internal/reference/portable_tensor_utils_impl.h

* Added the portable_tensor_utils to the files to sync.
2021-08-02 23:01:12 +00:00
Advait Jain
762ff80073
Groundwork to enable python format checks (via yapf) as part of the CI. (#314)
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
2021-07-22 21:21:00 +00:00
Advait Jain
454c072edb
Have a TFLM-specific version of lite/kernels/op_macros.h (#275)
* 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.
2021-07-14 17:57:12 +00:00
Advait Jain
2d465d7edc
Fixes to the check tflite files workflow (#270)
* 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.
2021-07-13 00:01:50 +00:00
jwithers
7ea0ff500a
fail PRs that overwrite a set of files from upstream (#195)
* 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>
2021-07-12 23:46:17 +00:00
Advait Jain
c0a2358a0d
Update sync script now that TFLM has been deleted from upstream Tensorflow. (#260) 2021-07-08 20:56:32 +00:00
jwithers
f897bca58c
dockerfile for hexagon testing tools (#186)
Co-authored-by: Advait Jain <advaitjain@users.noreply.github.com>
2021-06-17 16:53:37 +00:00
Advait Jain
f583f92992
Fix the style check docker container. (#156)
Following the pattern of #151 and fixes #11.
2021-06-09 19:54:51 +00:00
David Davis
e319e739b9
Add files from TfLite (#134)
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>
2021-06-07 18:42:15 +00:00
Ryan Kuester
8e2f711b4a
Sync reference implementation of SPACE_TO_DEPTH from lite (#114)
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.
2021-06-02 19:05:15 +00:00
Advait Jain
23f608fd2b
Updated sync and use of shared TFL/TFLM code. (#104)
* 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
2021-06-01 22:27:10 +00:00
Advait Jain
be84df4361
Sync micro_speech example from upstream TF. (#102)
Bug: http://b/184876027
2021-05-26 22:33:07 +00:00
Advait Jain
07b981ffdc
Visibility patch for the testing code is no longer needed. (#88)
More context in http://b/188226023
2021-05-20 12:10:52 -07:00
Advait Jain
1bdbbcb482
patch TFLM visibility updates from #73 prior to sync from upstream TF. (#77)
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).
2021-05-17 16:46:02 +00:00
Advait Jain
2613fb4b56
Enable person detection example. (#32)
The corresponding change in upstream TF is: https://github.com/tensorflow/tensorflow/pull/48809

Bug: http://b/184884735
2021-04-28 20:59:30 +00:00
Advait Jain
ecd995d654
Attempting to debug why Cortex-M continuous builds are failing. (#28)
* 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.
2021-04-27 17:17:52 +00:00
Advait Jain
1bccee1049
Increase CI converage to match upstream test_all.sh (#17) 2021-04-21 22:34:34 +00:00
Advait Jain
0c452e34e0
Make the neon check header empty since we do not need it for TFLM. (#8)
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.
2021-04-17 06:28:54 +00:00
Advait Jain
55a47c7dcb
Clean up of the BUILD files. (#6)
* 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).
2021-04-17 05:14:58 +00:00
Advait Jain
e6c0c1d357
Add script to sync code from upstream TF repo. (#4)
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
     ```
2021-04-09 13:28:11 -07:00
Advait Jain
d1a6c7900c
First steps towards getting CI going (#3)
Manually confirmed that the steps in CONTRIBUTING.md work:
```
docker build -t tflm-test -f ci/Dockerfile.micro .
docker run --rm tflm-test
```
2021-04-09 12:54:36 -07:00