Commit Graph

14 Commits

Author SHA1 Message Date
Yu-Cheng Ling
2f1a51263d Remove outdated TODOs.
Dynamic tensor support is already implemented in while.cc

PiperOrigin-RevId: 350792706
Change-Id: I02075ff3ad28349fa0d6c619e4f901cf6b90c148
2021-01-08 10:50:23 -08:00
Mihai Maruseac
1970c2158b [tflite]: Insert nullptr checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.

We also insert `nullptr` checks on usages of `tflite::GetVariableInput` and `tflite::GetOptionalInputTensor` but only in the cases where there is no obvious check that `nullptr` is acceptable (that is, we only insert the check for the output of these two functions if the tensor is accessed as if it is always not `nullptr`).

PiperOrigin-RevId: 332521299
Change-Id: I29af455bcb48d0b92e58132d951a3badbd772d56
2020-09-18 14:13:50 -07:00
Sachin Joglekar
430b00361b Audit and improve TfLiteType checks in kernels
PiperOrigin-RevId: 316720436
Change-Id: I2032e799ee6afa533b932385c2a70f7621f4ac1b
2020-06-16 11:31:02 -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
Jared Duke
4ce6a9b7a4 Rename lite/c/c_api_internal.h to lite/c/common.h
The C types in lite/c/c_api_internal.h are not actually internal,
rather, they are common types used throughout the C++ and C APIs.
Rename the header accordingly.

PiperOrigin-RevId: 282494601
Change-Id: Ia784f35724d774db256ffcbbcdc5bb00e6574417
2019-11-25 21:49:25 -08:00
Jared Duke
54cb56df75 Introduce builtin_op_kernels.h header to simplify op registration
Expose all builtin op registration methods in a single header. This
avoids the need for clients to forward declare use of existing builtins.

PiperOrigin-RevId: 273759940
2019-10-09 10:00:55 -07:00
Yu-Cheng Ling
eedf79ed37 Graduate TFLite control flow ops from experimental to builtin
PiperOrigin-RevId: 259150573
2019-07-20 15:51:38 -07:00
Yu-Cheng Ling
17521bcffd Fix invoking while multiple times when body is dynamic.
PiperOrigin-RevId: 257459721
2019-07-10 12:42:46 -07:00
Albin Joy
19069a720a Typo fix while.cc 2019-02-26 06:41:51 +05:30
Yu-Cheng Ling
e3069e6887 TFLite While: Propagate types instead of asserting.
PiperOrigin-RevId: 234834083
2019-02-20 11:30:42 -08:00
Yu-Cheng Ling
5fcf7320df Misc TFLite subgraph / control flow op fixes
* Fix dynamic tensor allocation when the tensor size is
  never changed (see subgraph.cc)
* Fix while op: condition output can be a 0D scalar tensor.
* Register while op in register.cc

PiperOrigin-RevId: 234625281
2019-02-19 10:30:25 -08:00
Yu-Cheng Ling
27e04b6a92 Bugfix - TFLite WHILE/IF: Ensure subgraph outputs is readable
PiperOrigin-RevId: 233540108
2019-02-11 22:02:56 -08:00
Yu-Cheng Ling
cd8e915071 Support dynamic sized subgraphs in WHILE op
PiperOrigin-RevId: 233431292
2019-02-11 10:36:56 -08:00
Yu-Cheng Ling
9913382f56 Initial implementation of WHILE op
PiperOrigin-RevId: 233138666
2019-02-08 16:48:27 -08:00