Commit Graph

188 Commits

Author SHA1 Message Date
vaibhav
4c30a3734f removing unwanted space after bash 2020-12-28 09:47:21 +05:30
vaibhav
7483e3409f change license year from 2017 to 2020 2020-12-23 10:34:29 +05:30
vaibhav
0d66cb7ec7 RISC-V Linux port for TensorFlow Lite 2020-12-18 13:35:11 +05:30
vaibhav
b803338650 Provide a way to pass Make commands to TFLite build scripts 2020-12-18 13:33:28 +05:30
Thai Nguyen
1b3b6d7470 Rename JNI opresolver for other use cases
PiperOrigin-RevId: 346246704
Change-Id: I82de976781700759e40f31620a6a0f61df5b1981
2020-12-07 21:43:25 -08:00
Sachin Joglekar
d6e53e76f2 Implement a telemetry library for delegates to report their settings/status for A@S
PiperOrigin-RevId: 346165056
Change-Id: I31f3b14e9986d0d89d1d568f1c565bcfc6cf2783
2020-12-07 13:23:18 -08:00
Fergus Henderson
f42bd2184c Add flag for enabling delegate fallback to the TFLite C API.
This adds a new experimental flag to the C API interpreter options,
which provides functionality equivalent to the TF Lite C++ API's
tflite::delegates::InterpreterUtils::InvokeWithCPUFallback
from delegates/interpreter_utils.h.
PiperOrigin-RevId: 345757574
Change-Id: I91ee063babfc25a793535f7dd9d4541810e11650
2020-12-04 14:35:05 -08:00
T.J. Alumbaugh
cc44aecf06 Bump the references to github.com/google/ruy to commit 4790797d11a81f96baf24f3731fd3ca44c2c5f8b.
PiperOrigin-RevId: 345727725
Change-Id: I785a7e1e0106cc6e6835c7ba451ec22202da4cac
2020-12-04 12:07:00 -08:00
Terry Heo
684cec69db Fix Makefile build of label_image
Added missing dependencies.
This CL fixes the GitHub issue .

PiperOrigin-RevId: 344219364
Change-Id: I332b7fa9a5c248737a947738adbd6de84850d277
2020-11-25 03:00:52 -08:00
Terry Heo
a6241f0271 TFLite OpenCL: CMake build fix
Added serialization_generated.h and serialization_base_generated.h

The file is generated with the following command.
$ flatc -c --scoped-enums -I ./ tensorflow/lite/delegates/gpu/cl/serialization.fbs
$ flatc -c --scoped-enums -I ./ tensorflow/lite/delegates/gpu/common/task/serialization_base.fbs

PiperOrigin-RevId: 341594596
Change-Id: I2e80a1d01d3b48560c502279443107cce608f369
2020-11-10 04:44:02 -08:00
Terry Heo
98d5315048 Fix TFLite aarch64 Makefile build
Build cpuid only for x86_64 target.
This patch fixes issue .

PiperOrigin-RevId: 335987456
Change-Id: I7d23d9d2673fa8bfa2ceae16e3eff70d3f307b74
2020-10-07 17:35:53 -07:00
Jaesung Chung
17f94a78e8 Refactor reading builtin code in TFLite
This change is a preliminary work for resolving builtin code shortage problem.
It introduces a new utility build target, schema_utils, which will be used for
getting/setting builtin code operator value in TFLite flatbuffer in order to
have a single place to access actual fields for accessing values.

See also the RFC proposal draft,
https://github.com/tensorflow/community/pull/285

PiperOrigin-RevId: 335513647
Change-Id: I810a33425bbed3489cfe4a4a98a10dc4bd67a6ba
2020-10-05 15:36:21 -07:00
T.J. Alumbaugh
81ddb09077 Adds CpuBackendGemmx86, a backend to prefer Ruy when AVX or higher is available.
- By default, this backend is currently not enabled.

PiperOrigin-RevId: 334898563
Change-Id: I07c8b24d3b66249afb6186f25bf3f51b0f632595
2020-10-01 14:40:38 -07:00
T.J. Alumbaugh
cc738858f7 Adds CpuBackendGemmx86, a backend to prefer Ruy when AVX or higher is available.
- By default, this backend is currently not enabled.

PiperOrigin-RevId: 334596637
Change-Id: Ib43150539f36d15e6a6a7207583ef4a460c25282
2020-09-30 07:47:37 -07:00
T.J. Alumbaugh
07dd48763f Adds CpuBackendGemmx86, a backend to prefer Ruy when AVX or higher is available.
- By default, this backend is currently not enabled.

PiperOrigin-RevId: 334403236
Change-Id: I72cf5116b9fe2e13695859208459d67c8e0a7e50
2020-09-29 10:16:50 -07:00
Terry Heo
47afb26c2d Remove redundant target from Makefile
"$(OBJDIR)%.o: %.cpp" rule is defined twice.
This change fixes 

PiperOrigin-RevId: 328451421
Change-Id: I6dd9e39c149540d128633f28d895d6a3981eb3c7
2020-08-25 19:38:33 -07:00
Benoit Jacob
a3fc5b10c0 Bump the references to github.com/google/ruy to commit 5bb02fbf90824c2eb6cd7418f766c593106a332b.
PiperOrigin-RevId: 323784071
Change-Id: I8ed4d6e4447193c0eff03395e75fe70b9b572cc1
2020-07-29 07:45:44 -07:00
A. Unique TensorFlower
8ee14cf0ff Add a test to verify that the TF Lite C API headers can build, link,
and run successfully when compiled as C code.

PiperOrigin-RevId: 322114627
Change-Id: I3baf36fcc7f79dc782f38b6f3e63a6300b395f3d
2020-07-20 04:16:10 -07:00
Benoit Jacob
86ba317d72 Bump the references to github.com/google/ruy to commit d492ac890d982d7a153a326922f362b10de8d2ad.
PiperOrigin-RevId: 321799197
Change-Id: Ieb00eb7cb3c247d0585d725314accdd719a42cb7
2020-07-17 10:04:39 -07:00
Brian Zhao
aa633f3d09 Add a test to verify that the TF Lite C API headers can build, link,
and run successfully when compiled as C code.

PiperOrigin-RevId: 321603053
Change-Id: If866522197ff1c828591f9bb3342e06f0cf9fbda
2020-07-16 11:10:42 -07:00
A. Unique TensorFlower
39add97b3a Add a test to verify that the TF Lite C API headers can build, link,
and run successfully when compiled as C code.

PiperOrigin-RevId: 321428801
Change-Id: I0cc6fc82006e27a22c73450b9a0cb86d5c50a3f6
2020-07-15 13:42:56 -07:00
Benoit Jacob
791f4f2b77 Bump the references to github.com/google/ruy to commit 388ffd28ba00ffb9aacbe538225165c02ea33ee3.
PiperOrigin-RevId: 321386605
Change-Id: Icf91c0c46fa4260c0910e927ade04eb142d1c61a
2020-07-15 10:29:42 -07:00
Benoit Jacob
310cab50c6 Bump the references to github.com/google/ruy to commit 388ffd28ba00ffb9aacbe538225165c02ea33ee3.
PiperOrigin-RevId: 321165585
Change-Id: I4bd156419edcb62a5ff897c84955508953768ec5
2020-07-14 08:50:34 -07:00
T.J. Alumbaugh
60be0c3c0e Restore functionality of --define=tflite_with_ruy=true
PiperOrigin-RevId: 317677225
Change-Id: If6533fdfeb21f676dd4b77a536b1aca894a03003
2020-06-22 10:49:06 -07:00
YoungSeok Yoon
db121c7f4b Clean up Makefile based build scripts for TFLite iOS
For TFLite iOS, bazel has been the recommended way to build the static framework
and the Makefile based script is not even meeting feature parity with the bazel
build (e.g., no GPU delegate support).

PiperOrigin-RevId: 317587116
Change-Id: Idbdf60687f35e1ef0bdb074668317818eeaa95e5
2020-06-21 21:15:25 -07:00
YoungSeok Yoon
c004b03ab7 Temporarily fix the makefile build breakage by excluding ruy/prepare_packed_matrices.cc
Currently, the lite/tools/make/build_lib.sh fails with the following error.

    tensorflow/lite/tools/make/downloads/ruy/ruy/prepare_packed_matrices.cc:16:41: fatal error: ruy/prepare_packed_matrices.h: No such file or directory
    compilation terminated.

PiperOrigin-RevId: 316025435
Change-Id: I2f9909e8865cee0937efe4170114553319eb33e0
2020-06-11 19:32:00 -07:00
Benoit Jacob
35bd7ea5b5 Bump the references to github.com/google/ruy to commit 34ea9f4993955fa1ff4eb58e504421806b7f2e8f to get the rollback of a recent regression (55cb53aa332eb91a42f095908ea63a651f86ecf3).
PiperOrigin-RevId: 315959561
Change-Id: I112ae5eadf170ad649377d8722b6328781233208
2020-06-11 13:03:50 -07:00
Benoit Jacob
7622b2e07f Bump the ruy repository reference, to get better support for some ARM32 targets: support for the case where cpu==armv7a, as opposed to cpu==armeabi-v7a
PiperOrigin-RevId: 315765604
Change-Id: I20a83c7278340c89f8f6806e33f3ca3052c95941
2020-06-10 14:21:26 -07:00
Benoit Jacob
c254833717 Bump the ruy repository reference, getting in particular:
- Use of the cpuinfo thirdparty library to perform CPU feature detection, including detection of dot-product instructions on iOS and detection of cache sizes. Combined with the ARM64 build change below, this means that iPhone11/SE devices now use dot-product instructions. We measured 250 Gop/s on 1 Lightning core in iPhone 11 Pro.
- ARM32: @lissyx's fix in 
- ARM64: build the kNeonDotprod path unconditionally (used to be linux-only).
- x86-64: enabling AVX512 instructions in the general opensource build.

PiperOrigin-RevId: 315467315
Change-Id: I0788ddc68da8d0aa2eee71f820fb5d8c188d35b2
2020-06-09 05:59:44 -07:00
T.J. Alumbaugh
2635f0495e Permit runtime opt-in for caching of prepacked matrices in GEMMs.
PiperOrigin-RevId: 314832291
Change-Id: Id0362e33e4d65908a4899d54989658fcfbf7f04c
2020-06-04 17:10:17 -07:00
Gunhan Gulsoy
13e4d28155 Bump the ruy repository reference, getting in particular:
- ARM32: @lissyx's fix in 
- ARM64: enabling dotprod instructions outside of Linux.
- x86-64: enabling AVX512 instructions in the general opensource build. A previous version of this CL was rolled back due to lack of support for -march=skylake-avx512 in some toolchains. Hopefully this will fare better thanks to b68dcd8713 .

PiperOrigin-RevId: 314766242
Change-Id: I56027a328248f2d85c9c74d3d8e27328ac25f332
2020-06-04 11:23:08 -07:00
Benoit Jacob
f15d6e1efc Bump the ruy repository reference, getting in particular:
- ARM32: @lissyx's fix in 
- ARM64: enabling dotprod instructions outside of Linux.
- x86-64: enabling AVX512 instructions in the general opensource build. A previous version of this CL was rolled back due to lack of support for -march=skylake-avx512 in some toolchains. Hopefully this will fare better thanks to b68dcd8713 .

PiperOrigin-RevId: 314597853
Change-Id: Ia64d5aa5bb9e47140e084e0896a5685cac247886
2020-06-03 14:03:28 -07:00
Semun Lee
b22a765df3 Use proper mmap_allocator for TFLite
When BUILD_WITH_MMAP is ture, mmap_allocator.cc should be used

Change-Id: Iad36ae84cfa50b24b4cf1f4dfe8c46972bd1221b
2020-06-02 18:40:41 +09:00
TensorFlower Gardener
d2fe2e782c Merge pull request from jlz3008:lbimg_make
PiperOrigin-RevId: 314236421
Change-Id: I6dc00a98b57d399ddd42f6f43a7e5f599cc118b6
2020-06-01 17:33:26 -07:00
TensorFlower Gardener
6127b55d71 Merge pull request from seanchas116:tflite-makefile-add-c-cc
PiperOrigin-RevId: 314145909
Change-Id: I596971ab1f63a992db0905706d226bbfd38c2ed3
2020-06-01 09:47:17 -07:00
Vincent ABRIOU
242e60bf21 TFLite: add EXTRA_CFLAGS variable
Since commit SHA1: d28cf21aa5
Cross compilation of TFLite is failing.
Add an EXTRA_CFLAGS variable to allow cross compilation environment to
define extra CFLAGS when needed.

Signed-off-by: Vincent ABRIOU <vincent.abriou@st.com>
2020-05-28 10:26:21 +02:00
Andrew Selle
c53757b09d Fix makefile benchmark script to build on mac os.
Mac linker does not have -Wl,--whole-archive.

PiperOrigin-RevId: 312702308
Change-Id: Ie0a4b9e8453cea948f884c36c6d7cee96bb9ba86
2020-05-21 11:10:36 -07:00
TensorFlower Gardener
e3eb5101bb Merge pull request from marcin-sielski:master
PiperOrigin-RevId: 312420674
Change-Id: Ia8cde2c26dbb2bc56ff28dcb549d94ce4fd6d647
2020-05-19 22:23:24 -07:00
Ryohei Ikegami
977fd309a9 Build tensorflow/lite/c/*.cc in tflite Makefile 2020-05-19 12:05:03 +09:00
TensorFlower Gardener
b4300661a6 Merge pull request from mshr-h:fix-spelling
PiperOrigin-RevId: 310377644
Change-Id: I9e41cf7a4ddac22ae69a672c2886862c0d91156d
2020-05-07 09:41:34 -07:00
Benoit Jacob
d29bab993c Update ruy to get ReferenceMul.
PiperOrigin-RevId: 310218872
Change-Id: I6ce9dafcc9e448e5bdbbb706bae508d07b21e1d6
2020-05-06 13:42:59 -07:00
Benoit Jacob
8b998cab7b Update ruy to get the new cache API.
PiperOrigin-RevId: 309093615
Change-Id: Idc35370a44281a48a9f2b61afa5e8f915c989f0b
2020-04-29 14:15:49 -07:00
mshr-h
c55943eb30 Fix misspelling 2020-04-29 21:10:09 +09:00
TensorFlower Gardener
31bd69ec2c Merge pull request from periannath:introduce_ruy_profiler
PiperOrigin-RevId: 307948205
Change-Id: Iaa2d0747447e8da6ba616027dee0572922a7b39a
2020-04-22 18:40:24 -07:00
Chao Mei
d524812b82 Move delegate providers into a separate directory as they are used for both evaluation tools and benchmark tools.
PiperOrigin-RevId: 307549889
Change-Id: I9234d5e187155b52a7518586dff01266fb426168
2020-04-20 23:42:08 -07:00
periannath
3e6030a241 [TFLite] Introduce ruy_profiler to makefile
Introduce `BUILD_WITH_RUY_PROFILER` option to support ruy_profiler
2020-04-20 21:53:53 +09:00
Benoit Jacob
e9f5f1829a Adapt TFLite to Ruy API changes.
PiperOrigin-RevId: 306945572
Change-Id: I819760237a6f27ac119308731c175c29d4945203
2020-04-16 16:41:26 -07:00
Marcin Sielski
5e4ce4f077
Fix a bug related to build TF Lite on RPI Zero.
Why:

* Enable to build TF Lite on RPI Zero.

This change addresses the need by:

* Changing compiler from arm-linux-gnueabi- to arm-linux-gnueabihf-.
2020-04-13 16:46:53 +02:00
Chao Mei
f74b28c47e 1. Make delegate provider free of benchmark_model dependency.
2. Make common delegate-related parameters into a single delegate_provider module.
3. Changed the delegate provider API to clearly show default params and their values.

PiperOrigin-RevId: 305844062
Change-Id: Iebae441348197803d092d7af0fe84c2c04b90d0d
2020-04-10 01:39:26 -07:00
Chao Mei
020d0f0a49 1. Rename BenchmarkParam and BenchmarkParams to ToolParam and ToolParams respectively, and branch them to the upper-level directory.
2. Also branch the benchmark/logging.h to the upper level directory.

Note we still keep those in benchmark directory for backward compatibility but by reusing the new definitions here. These utility classes are helpful to and going to be used in other tflite-related tools.

PiperOrigin-RevId: 305834516
Change-Id: Id809398b060698b641cad0c8ac5fe9ca22b9ab40
2020-04-09 23:58:21 -07:00