diff options
author | 2018-08-16 12:30:14 -0700 | |
---|---|---|
committer | 2018-08-16 12:33:48 -0700 | |
commit | b09f347b6498edbd0aeeaa1001930e968e80dd49 (patch) | |
tree | 107119745508ea8a78201e1c4155e4ae5a6a89de /tensorflow/contrib/lite/util.h | |
parent | 1326f33515dac82fbdd7ef502d1df5e96986fc12 (diff) |
Refactoring: Extract IsEagerOp function to shared component.
PiperOrigin-RevId: 209027338
Diffstat (limited to 'tensorflow/contrib/lite/util.h')
-rw-r--r-- | tensorflow/contrib/lite/util.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/util.h b/tensorflow/contrib/lite/util.h index 3c4801183b..f5b208afbb 100644 --- a/tensorflow/contrib/lite/util.h +++ b/tensorflow/contrib/lite/util.h @@ -26,6 +26,16 @@ limitations under the License. namespace tflite { +// The prefix of Eager op custom code. +// This will be matched agains the `custom_code` field in `OperatorCode` +// Flatbuffer Table. +// WARNING: This is an experimental API and subject to change. +constexpr char kEagerCustomCodePrefix[] = "Eager"; + +// Checks whether the prefix of the custom name indicates the operation is an +// Eager operation. +bool IsEagerOp(const char* custom_name); + // Converts a `std::vector` to a `TfLiteIntArray`. The caller takes ownership // of the returned pointer. TfLiteIntArray* ConvertVectorToTfLiteIntArray(const std::vector<int>& input); |