Commit Graph

76 Commits

Author SHA1 Message Date
Christian Sigg
4838793e12 Comment out a number of google-internal targets when copybara-exporting instead of removing them.
PiperOrigin-RevId: 353848826
Change-Id: I0801c0e713a0c63597deb5aed31c8bdb37999c6a
2021-01-26 05:47:31 -08:00
A. Unique TensorFlower
985ad0276a PY2 removal cleanup
PiperOrigin-RevId: 352907145
Change-Id: I82de30d92dc9c2b53215d6d5732c67afe339c23d
2021-01-20 17:11:44 -08:00
Christian Sigg
daa61db597 [NFC] Expose a number of BUILD differences between Google and OSS through copybara:comment directives.
PiperOrigin-RevId: 352646325
Change-Id: I1d8923a574cdccb58dbc4d38d7d0aadb3171f5e7
2021-01-19 13:54:08 -08:00
A. Unique TensorFlower
034633f23b PY2 removal cleanup
PiperOrigin-RevId: 352106691
Change-Id: I382d53c64f0d29da430b8cb6d2395a2cb281509e
2021-01-15 16:48:57 -08:00
Karim Nosir
6119b93daf Fix TFLite tests quantization check
PiperOrigin-RevId: 348674459
Change-Id: Ie88c199e7d78b9f1b7a85554adb70cafa196c362
2020-12-22 12:29:17 -08:00
Meghna Natraj
f806d113c0 Fix TFLite tests quantization check
PiperOrigin-RevId: 348101989
Change-Id: Ibb56d93d3b149f9dd03e3adb086811ba85a05a51
2020-12-17 15:18:38 -08:00
David Rim
9ac878ba75 Add experimental custom parse_example op
PiperOrigin-RevId: 347934981
Change-Id: I2c11a013e48dd829ba51d16a69440814ea85250e
2020-12-16 18:15:57 -08:00
Thai Nguyen
2091277ccc Add MaxPoolWithArgmax as a TFLite custom op
This kernel is different than MaxPool as following:
- Returns both pooling and argmax results.
- Parameters are retrieved from custom option instead of builtin op data.

PiperOrigin-RevId: 347808061
Change-Id: I064b62c5313ba3860f6f52d965747fa13d3042b1
2020-12-16 06:11:16 -08:00
Mihai Maruseac
af93fc7294 Add experimental custom parse_example op
PiperOrigin-RevId: 347640612
Change-Id: If4c83fc598391e8972f6b71015caf9def4d4bb7a
2020-12-15 10:36:16 -08:00
Mihai Maruseac
e682c197a7 Remove unused import/load
PiperOrigin-RevId: 347634112
Change-Id: I1e20c98f3e6af13d1551e5882f7ca7b0a432358f
2020-12-15 10:02:54 -08:00
David Rim
04bc1fe759 Add experimental custom parse_example op
PiperOrigin-RevId: 347551866
Change-Id: I0c5aa0b0c9563a17842de85546d605b8399fe563
2020-12-14 23:57:48 -08:00
Fergus Henderson
2aefdee7b7 Add shim headers, to provide a place where you could substitute in a different
implementation of the TF Lite C API and C++ interpreter API.

Also, add TODO comments about eliminating what appears to be unnecessary
use of 'alwayslink = 1'.

PiperOrigin-RevId: 343449324
Change-Id: I55ffed2fd405376e205695350850faa1be4fbd37
2020-11-20 00:54:39 -08:00
Fergus Henderson
e54e804bc7 (lite) Fix typo in build target name.
PiperOrigin-RevId: 341516982
Change-Id: I9d0e5986db29b58762854b2dfc10f19e2e738fb2
2020-11-09 17:31:55 -08:00
Chao Mei
72be296413 Fix the OSS build rule regarding $location expansion that's introduced in cl/326576852.
PiperOrigin-RevId: 326689745
Change-Id: I5ea40130bd82ca9dcb2a322d7a24d7aa55177e1e
2020-08-14 11:11:58 -07:00
Chao Mei
f836239676 Use expanded results of $location directly.
PiperOrigin-RevId: 326576852
Change-Id: Ia20847d3bcea3c47ca6496b558429d4e5d817a24
2020-08-13 19:58:02 -07:00
Chao Mei
671844cd41 Support to generate zip tests (i.e. cc_test) against a particular delegate, like xnnpack delegate.
PiperOrigin-RevId: 324991483
Change-Id: I1876d23363a854791ddc8e24d398e9f49c625be3
2020-08-05 04:12:18 -07:00
Thai Nguyen
9efc52e47d Renable SAN tests on selective_build_test
Marking the test not portable for mobile platforms.

PiperOrigin-RevId: 323507613
Change-Id: I26d29a57316a02726711460eaf56b6215bacb0e1
2020-07-27 22:23:52 -07:00
Chao Mei
03300ba696 Extract the KernelTestDelegateProviders into a separate library from test_util, and apply it in lite/testing/tflite_driver.
PiperOrigin-RevId: 323208799
Change-Id: I047f9aa54e32263c0b21aa673bea8cc7de751ba7
2020-07-25 21:40:43 -07:00
Tiezhen WANG
b0cec6bd77 TFLite selective registration: Add android target.
This includes build rule for
- libtensorflowlite_jni.so
- Android target
- AAR target

PiperOrigin-RevId: 322952184
Change-Id: If0fd97d9f50867dbce45a304758e3b9e9ac3eb0a
2020-07-24 01:15:56 -07:00
Peng Wang
96fcf55461 Some internal change
PiperOrigin-RevId: 322895707
Change-Id: I6300e2e55c8543478a3fca974aef3365cc0b2323
2020-07-23 17:27:57 -07:00
Anna R
0ff8f604fe Disable //tensorflow/lite/testing:selective_build_test on mac.
PiperOrigin-RevId: 322826690
Change-Id: Ie0512ca2125d18530353879843681ac3862c5568
2020-07-23 11:57:39 -07:00
Thai Nguyen
bd6b557c02 Support multiple models in TFLite selective build
PiperOrigin-RevId: 322756668
Change-Id: Ib09472f83b9b9a2865560c4df00a24f2961b38f0
2020-07-23 03:41:30 -07:00
Thai Nguyen
add80cd47a Make flex:delegate_data, init_tensorflow.h and init_tensorflow.cc visible for selective registration uses
PiperOrigin-RevId: 314099714
Change-Id: I2da62c0817475cfd268608f2ff32e8ed1a531310
2020-06-01 02:38:38 -07:00
A. Unique TensorFlower
5d3c548620 Resolve trivial aliases for portable TensorFlow targets.
PiperOrigin-RevId: 311548335
Change-Id: I837aa5a62500682783607841f0c993c2b6c238ed
2020-05-14 09:39:36 -07:00
A. Unique TensorFlower
3116ec3708 Resolve trivial aliases for portable TensorFlow targets.
PiperOrigin-RevId: 311142154
Change-Id: I702bddcc4b6dfb69d9a8747770fc88826603b1aa
2020-05-12 09:39:21 -07:00
Jaesung Chung
cf9d79b432 Move hash table op kernels out of experimental directory
PiperOrigin-RevId: 307999605
Change-Id: Ib59a2979db8f59c84f0c5c3ce6b25f320cd0e917
2020-04-23 01:18:54 -07:00
A. Unique TensorFlower
3768ba7306 Add quantized test cases for pack operator.
PiperOrigin-RevId: 293014634
Change-Id: I4d7cefc1e691b2b04f2ac1ad0913b93742f910af
2020-02-03 15:12:12 -08:00
A. Unique TensorFlower
5ce881f411 Add quantized test cases for expand_dims operator.
PiperOrigin-RevId: 292996653
Change-Id: Iafc2c802dedab1b13b95d78d8fd086069b876317
2020-02-03 13:55:17 -08:00
Jeremy Lau
5a7fb2ca62 Fix asan invalid-bool-load errors in zip_test_lstm by initializing lhs_cacheable
and rhs_cacheable before use.

PiperOrigin-RevId: 292983666
Change-Id: I05a625a9a5e4273436522eb8a9984c4b44c45fbc
2020-02-03 12:57:31 -08:00
Jeremy Lau
ca9cac48dd Temporarily disable failing tests.
PiperOrigin-RevId: 291015095
Change-Id: I60bf682c68d1b1114d5098a8e28de851d546b442
2020-01-22 13:15:22 -08:00
Jaesung Chung
03a2255949 Add a helper method for adding TFLite hashtable ops to op resolver.
Also added a python wrapper for TFLite hashtable ops.

PiperOrigin-RevId: 290565157
Change-Id: Ieb1be2c4c4129f1256599a22bbccba6a6fab8f69
2020-01-19 23:57:57 -08:00
Taehee Jeong
53843e51a7 Export the SerializeAsHexString functions from C++ to Python with pybind11 instead of swig. This is part of a larger effort to deprecate swig and eventually with modularization break pywrap_tensorflow into smaller components. It will also make exporting C++ ops to Python significantly easier. Please refer to https://github.com/tensorflow/community/blob/master/rfcs/20190208-pybind11.md for more information.
PiperOrigin-RevId: 288278210
Change-Id: Ie6e01d42e7b6155f88f2e4cd54953a785c58ac99
2020-01-06 04:27:59 -08:00
Karim Nosir
3d42bdcff7 - Update build rules for tflite diff to compile for iOS, and avoid compiling flex delegate for iOS.
- Add new method for GenerateTestSpec to generate testspec from TFLite.

PiperOrigin-RevId: 285884997
Change-Id: I803bd619013f7410bd56283a715e46c8719d4810
2019-12-16 17:29:39 -08:00
Hye Soo Yang
bce28ef8f8 PY3 migration - Set py targets to "PY3" in tensorflow/lite/...
PiperOrigin-RevId: 284900555
Change-Id: I73157bf2570d2f66600bffc2cf31c42ac8de4cc5
2019-12-10 19:46:00 -08:00
Jared Duke
298ec44da3 Add a tflite_model_test build rule
This test runs an automated diff comparison of TF vs TFLite for a given
source model. It can also be used to run comparisons on-device with
delegates.

Also fix the tf_driver/tflite_diff tool to allow execution on mobile devices.

PiperOrigin-RevId: 284293992
Change-Id: Ia64927b4d76a195924e5dc2f16b7f4aa53481c0e
2019-12-06 17:35:14 -08:00
A. Unique TensorFlower
a3dc51f103 Add fully quantize test for tranpose operator.
PiperOrigin-RevId: 284047075
Change-Id: I83b211bc911567dae4a97c50817374b42052d13a
2019-12-05 14:09:20 -08:00
A. Unique TensorFlower
d059de3e87 Enable maximum/minimum single-op tests.
PiperOrigin-RevId: 282842467
Change-Id: Ia434183c1b218c6c32ecfa3fa150a3aadd12b252
2019-11-27 15:21:29 -08:00
A. Unique TensorFlower
c59a552173 Explicitly export files needed by other packages
PiperOrigin-RevId: 282578742
Change-Id: If6638809fd0986b780b7fe30b993772dabd91c0e
2019-11-26 09:17:38 -08:00
Yunlu Li
5686a3c261 Add simple transpose_conv tests with post-training quantization.
PiperOrigin-RevId: 281864531
Change-Id: I57795cd589387783602abcdcf393e781888991bc
2019-11-21 17:12:25 -08:00
Brian Atkinson
ac92f1a19a Remove placeholder comment
PiperOrigin-RevId: 279158397
Change-Id: Id4da98f78646af102bf1097e95b17620d4f359da
2019-11-07 14:00:31 -08:00
A. Unique TensorFlower
90f51a3706 Move resize_nearest_neighbor from end of the file to the proper position. Add int8 op tests.
PiperOrigin-RevId: 278746248
Change-Id: Idcfab4660f30fcd587d4de08339b7e458ac685b1
2019-11-05 18:15:40 -08:00
A. Unique TensorFlower
f237ffddd9 Add int8 quantized RELU and RELU_N1_TO_1 as well as their tests.
PiperOrigin-RevId: 277842439
Change-Id: Iaaf99e3d179fa1351a4dbd2a50365d8676dd7a36
2019-10-31 18:22:18 -07:00
A. Unique TensorFlower
ea404dc688 Add mean operator to tflite int8 quantization test.
PiperOrigin-RevId: 277362640
Change-Id: I291a20210d7ce86603f95dce9c1feaf64e9aee0d
2019-10-29 14:20:11 -07:00
Yunlu Li
d21270193b Fix implementation of quantized ReluX.
PiperOrigin-RevId: 277208160
Change-Id: I6f92a34cd07f7451baf6fe723f2001db647d00ac
2019-10-28 21:29:28 -07:00
A. Unique TensorFlower
5f26a30df1 Add quantize tests for activation op: sigmoid(aka logistic).
PiperOrigin-RevId: 276762422
Change-Id: I79303dbdb19178e144a673fa0ae87ba58147ee2c
2019-10-25 15:50:58 -07:00
A. Unique TensorFlower
543f61dcab Add quantize tests for activation ops: relu, relu1, relu6 fused with conv, and tanh not fused with conv.
PiperOrigin-RevId: 276569841
Change-Id: I3bdda2d46dc75babd61cbebb7fa5dbc6a3abd737
2019-10-24 15:09:00 -07:00
A. Unique TensorFlower
bfa9c754f5 Add more single-op tests with quantize option.
PiperOrigin-RevId: 276369706
Change-Id: I0e832d8644809c7ee8bd50fa7d03b114fc80e56e
2019-10-23 16:35:25 -07:00
A. Unique TensorFlower
b7ccdd10ca Add fully quantize maximum/minimum op tests with a bug fix for maximum and mininum.
PiperOrigin-RevId: 276093641
Change-Id: I7cc4c9a73f093deb1764261a1eb5d5b36ccbc38a
2019-10-22 11:09:39 -07:00
A. Unique TensorFlower
fe18373089 Add fully quantize maximum/minimum op tests with a bug fix for maximum and mininum.
PiperOrigin-RevId: 275345884
Change-Id: I8e5b887f14693ab5084e0c06ec6e21c8f463a8da
2019-10-17 15:06:29 -07:00
A. Unique TensorFlower
e3be9bbcad Refactor generate_examples_lib.py to split each op to separate files.
PiperOrigin-RevId: 275117423
Change-Id: I4ee19a6c388187fa231373eeaa4b14339e328680
2019-10-16 14:46:52 -07:00