Yunlu Li
a019f0d125
Change data accessor to return const ref to avoid copy.
...
PiperOrigin-RevId: 346664852
Change-Id: Ica1af6d41c9167b846758a0f4746481563c84a4e
2020-12-09 16:48:49 -08:00
Chao Mei
15dd772865
Skip applying default TfLite delegates for nnapi delegate tests.
...
PiperOrigin-RevId: 337440144
Change-Id: I1e1ea6259df21c8a3c001e1138d729f5606f6d32
2020-10-15 21:30:16 -07:00
Robert David
ba7e0b1848
Disable linter warnings.
...
PiperOrigin-RevId: 330637129
Change-Id: Ic473d6527a6f61591b4afdc8e2a8cb9a29100fff
2020-09-08 19:33:17 -07:00
Robert David
bec38f2829
Separate AddVariableInput and AddInput functions in test_util.h/.cc
...
Some of the usages were wrong before; the bool input was invoked as {}.
PiperOrigin-RevId: 330623020
Change-Id: I9505c199297d6a1e7465c0610184652168f61430
2020-09-08 17:45:35 -07:00
Yunlu Li
8744e4b2b9
Add builtin sparse LSTM kernel.
...
PiperOrigin-RevId: 329562447
Change-Id: I5c407b513fbc86d21f6ea2d626da7b69dcd38bc7
2020-09-01 12:57:17 -07:00
Jian Li
f0ebdf65c0
Move tensor allocation out of BuildInterpreter.
...
PiperOrigin-RevId: 328347139
Change-Id: Idf992cfa1d9a873133c43c14a6adce19f9cfa99e
2020-08-25 09:58:20 -07:00
A. Unique TensorFlower
c1244778c1
Support dynamic dimensions in NNAPI delegate
...
PiperOrigin-RevId: 325282966
Change-Id: I07cc91455c8bc72bd092b4cf257a59ad7809b5ee
2020-08-06 12:23:11 -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
Chao Mei
d956c282fb
Use the global delegate providers to drive the NNAPI delegate test.
...
PiperOrigin-RevId: 321271726
Change-Id: If50f8ca0bd712fbab9c041bf2db416b00820a251
2020-07-14 17:58:11 -07:00
Chao Mei
a6207b8f2e
Provide a way to utilize delegate providers to create TfLite delegates based on local-only parameters.
...
PiperOrigin-RevId: 321171749
Change-Id: Ib05bc8446af7a331f9beee4e746bc5aef1746275
2020-07-14 09:33:50 -07:00
Chao Mei
9ccaf9b39a
Support more delegate options in kernel tests by utilizing TFLite tooling's delegate registrar.
...
PiperOrigin-RevId: 320574793
Change-Id: If2168d94cd4a9bf17d3245b80dd4db319f62aa61
2020-07-10 03:21:15 -07:00
Mihai Maruseac
b867dec4e1
Support more delegate options in kernel tests by utilizing TFLite tooling's delegate registrar.
...
PiperOrigin-RevId: 320548671
Change-Id: I459f4992fa30bd9ab05736553b23ca6f4c35f847
2020-07-09 22:48:39 -07:00
Chao Mei
eddb295677
Support more delegate options in kernel tests by utilizing TFLite tooling's delegate registrar.
...
PiperOrigin-RevId: 320527595
Change-Id: I9caa7b4cf0a961c4aef90fd73840069b8ed1a32e
2020-07-09 19:24:17 -07:00
Karim Nosir
2a96849f47
Update source files with used includes.
...
PiperOrigin-RevId: 316589177
Change-Id: I0aba0ed1cf9ff478e7890fa53a7749bf844bd26d
2020-06-15 18:42:14 -07:00
Gaurav Menghani
204f6a1c5d
Add a helper error message when the tensor index is not found.
...
PiperOrigin-RevId: 316155846
Change-Id: I0754d7520e9ee3ec352fd26691581ac05f2caa3e
2020-06-12 12:45:11 -07:00
Robert David
45463fbd19
Simplify how used delegate is supplied to SingleOpModel-based tests.
...
PiperOrigin-RevId: 314761693
Change-Id: I19a160aad575e832c92a72e442e5fc49e8e2f45a
2020-06-04 11:12:35 -07:00
Robert David
8b61a1e246
Remove default parameters of BuildInterpreter, keep only two overloads: with only input shapes or input shapes plus all optional settings.
...
There were calls passing bools to num_threads. This change forces to spell out all optional parameters (or none), avoiding such issues.
PiperOrigin-RevId: 314746668
Change-Id: I445364bcc7bec8f0030b9c04ed140394df25edb7
2020-06-04 09:58:07 -07:00
Thai Nguyen
e9781e9b16
Support TFLite in the tool to print selective registration header
...
PiperOrigin-RevId: 314282031
Change-Id: Ie71b434c177d03e246a5cfde3d067ac695b71299
2020-06-02 00:49:20 -07:00
Lev Proleev
a26381f3dc
Add NNAPI delegate support for Fill
...
PiperOrigin-RevId: 314116176
Change-Id: I8216b776ec823ff9c0696410091291f6b2d3a385
2020-06-01 05:53:24 -07:00
Yunlu Li
c469d6a49e
Make test for sparse tensor more generic.
...
PiperOrigin-RevId: 309413673
Change-Id: I104b32cc502df9b91c721a138babcd4189ab4370
2020-05-01 08:54:58 -07:00
TensorFlower Gardener
114b8ef31a
Merge pull request #35946 from wwwind:conv2d_16x8
...
PiperOrigin-RevId: 307851318
Change-Id: Ie0d1c6dfcb3b6eca6c7b55a86c3a1b8fc9d407a9
2020-04-22 11:00:02 -07:00
A. Unique TensorFlower
c5fd4efc4c
Some const declarations changed to constexpr
...
PiperOrigin-RevId: 307629520
Change-Id: I22dcc35701417a184b77791ec3efe4a2957251bc
2020-04-21 10:21:10 -07:00
Jaesung Chung
845adc40a6
Add float64 tensor support in TFLite
...
PiperOrigin-RevId: 304756523
Change-Id: I6e9f3196a700b3b43cc9b9fb06b72938db651582
2020-04-03 23:20:03 -07:00
Elena Zhelezina
c8ffb36d8c
Updated test and fixed a build error.
2020-03-26 17:21:00 +00:00
Elena Zhelezina
a69f252fac
Merge branch 'upstream/master' into conv2d_16x8
2020-03-26 16:31:26 +00:00
Elena Zhelezina
eb00bf17d3
Fix for the warning.
2020-03-24 16:13:00 +00:00
Yunlu Li
f94c8b283a
Make default sparse FullyConnected kernel take the standard CSR format.
...
PiperOrigin-RevId: 297967339
Change-Id: I65e86496367e125c46729f828818cd53b4f91945
2020-02-28 17:05:11 -08:00
Elena Zhelezina
d8a634847e
Merge branch 'master' into conv2d_16x8
2020-02-26 09:52:00 +00:00
Yunlu Li
e318ac94b9
Use variable buffer type for sparse tensor metadata.
...
PiperOrigin-RevId: 296530052
Change-Id: Ieab047fb73d7b15c26d716bd43c18b8187acc3e0
2020-02-21 16:05:18 -08:00
Stefano Galarraga
1a7cdfedc0
Limit delegated ops to actually supported ones if a device name is specified or NNAPI CPU Fallback is disabled.
...
PiperOrigin-RevId: 292171790
Change-Id: I2e8e75ba20b4bc1ed286543b23739c4d7f0d6561
2020-01-29 11:13:20 -08:00
Stefano Galarraga
73675deef7
Limit delegated ops to actually supported ones if a device name is specified or NNAPI CPU Fallback is disabled.
...
PiperOrigin-RevId: 291979150
Change-Id: I380d4a879e4ae009cafe41925334608206257e9c
2020-01-28 11:40:08 -08:00
Stefano Galarraga
8f9ecf6dd2
Limit delegated ops to actually supported ones if a device name is specified or NNAPI CPU Fallback is disabled.
...
PiperOrigin-RevId: 291957162
Change-Id: I3dd084818eaea0fc7f8332bd162ba30519a07c68
2020-01-28 10:13:58 -08:00
Elena Zhelezina
69b82c0f48
Merge branch 'master' into conv2d_16x8
2020-01-28 17:14:04 +00:00
Peng Sun
454146d9ff
Add INT16 activations test code for operator kernels
...
- SPLIT
- SQUEEZE
- RESHAPE
- EXPAND_DIMS
Typed TEST, combined with for-loop value parameters
2020-01-24 12:15:32 +00:00
Yunlu Li
82a7f1a471
Make Densify op working.
...
PiperOrigin-RevId: 291249962
Change-Id: Ib1cbb27e7069d007c115a0be20d43e96512d736f
2020-01-23 14:58:33 -08:00
A. Unique TensorFlower
f2f9d3ffd7
Let expand_dims op handle string tensors.
...
For string tensors expand_dims needs to allocate the memory for the output tensor. The size cannot be deduced from the shape and types so ResizeTensor() does not do that for string tensors.
RELNOTES: n/a
PiperOrigin-RevId: 291205921
Change-Id: I35affd37b5c7caae9f553b9ea71add146f695a97
2020-01-23 11:20:01 -08:00
Elena Zhelezina
4457782513
Merge branch 'master' into conv2d_16x8
2020-01-20 13:43:18 +00:00
Elena Zhelezina
4d2263f7ab
Addressed reviewer comments.
2020-01-20 13:22:58 +00:00
Stefano Galarraga
ca9b58dfcf
Restoring change: If a target accelerator is specified, use its feature level to determine operations to delegate instead of SDK version.
...
PiperOrigin-RevId: 290573620
Change-Id: I4d87331932c9ff993ec65102e2ac72a68fbbed62
2020-01-20 01:14:18 -08:00
Feng Liu
6ef62c6d2e
Broadcast the scales in the int8 conv/dconv kernels if per-tensor quant parameters are used
...
When per-tensor quant parameters are specified, the kernel should be able to
broadcast the scales. This can help the QAT to use per-layer quantization
training and also save the model size.
PiperOrigin-RevId: 290441163
Change-Id: I51853cea44a4db20e38b44810986d347fed1c69f
2020-01-18 11:49:27 -08:00
Elena Zhelezina
6160059e1e
This PR is one of steps to extend 8-bit quantization to support symmetric 16-bit activations.
...
Each activation is of type int16 and symmetric around zero.
The weight tensor precision remains at 8-bit signed values.
The bias is set to int64 precision.
In this PR we introduce implementation and tests for CONV_2D kernel reference function.
2020-01-16 15:43:33 +00:00
A. Unique TensorFlower
15cbf88083
Broadcast the scales in the int8 conv/dconv kernels if per-tensor quant parameters are used
...
When per-tensor quant parameters are specified, the kernel should be able to
broadcast the scales. This can help the QAT to use per-layer quantization
training and also save the model size.
PiperOrigin-RevId: 289961941
Change-Id: I3f25bac1efcfa2021898efe9beda718be6accecc
2020-01-15 16:34:13 -08:00
Feng Liu
7a4743be92
Broadcast the scales in the int8 conv/dconv kernels if per-tensor quant parameters are used
...
When per-tensor quant parameters are specified, the kernel should be able to
broadcast the scales. This can help the QAT to use per-layer quantization
training and also save the model size.
PiperOrigin-RevId: 289936162
Change-Id: I928deff91fbc5636124416967cac8f36b80b5fd5
2020-01-15 14:27:13 -08:00
A. Unique TensorFlower
6279f81181
If a target accelerator is specified, use its feature level to determine operations to delegate instead of SDK version.
...
PiperOrigin-RevId: 289862790
Change-Id: I3b6c82d735fb884a1e9822f67b50fc4804462657
2020-01-15 08:23:11 -08:00
Stefano Galarraga
75e5afd100
If a target accelerator is specified, use its feature level to determine operations to delegate instead of SDK version.
...
PiperOrigin-RevId: 289853984
Change-Id: Ic482388cd9a15855d4347375f263213fd3e90eaf
2020-01-15 07:28:35 -08:00
Taehee Jeong
6749678234
Properly initialize per-channel quantized constant tensor
...
PiperOrigin-RevId: 288823170
Change-Id: I23d59bada675edf4a867570c785ec4b0eaab913c
2020-01-08 19:47:03 -08:00
Jian Li
7fb4d81d61
Extend test framework to handle intermediate tensors.
...
PiperOrigin-RevId: 283423593
Change-Id: Ie6d321823636d49cf05e6ed29a8d220ae0476b0a
2019-12-02 15:02:05 -08:00
Yu-Cheng Ling
e85bad8c79
Rename kOptionalTensor to kTfLiteOptionalTensor
...
PiperOrigin-RevId: 282168781
Change-Id: I594a05969789ce7b9d96c8b808c40f2afd7d53e6
2019-11-23 16:15:07 -08:00
Yunlu Li
a7de1a78fe
Add int8 transpose conv.
...
PiperOrigin-RevId: 281565221
Change-Id: I984c4e7e4dbb30a872c63778e52eac0bd91fd999
2019-11-20 14:02:09 -08:00
Robert David
b95119ea9b
Apply a few sanitizer-suggested fixes.
...
PiperOrigin-RevId: 274889851
Change-Id: Ie3af95907969d6bc9891bf17a8a93d55696927ea
2019-10-15 14:46:51 -07:00