Skip to content

Commit

Permalink
[hannk] Upgrade hannk to use TFLite 2.7.0 by default (#6393)
Browse files Browse the repository at this point in the history
* [hannk] Upgrade hannk to use TFLite 2.7.0 by default

* Fix unused-vars warnings
  • Loading branch information
steven-johnson committed Nov 9, 2021
1 parent b021f87 commit b189722
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/hannk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set(CMAKE_CXX_EXTENSIONS NO)
# (We need to do this even if HANNK_BUILD_TFLITE is off,
# so that the .tflite file parser can get the right schema)
set(TFLITE_VERSION_MAJOR "2" CACHE STRING "Major version of TFLite to assume")
set(TFLITE_VERSION_MINOR "6" CACHE STRING "Minor version of TFLite to assume")
set(TFLITE_VERSION_MINOR "7" CACHE STRING "Minor version of TFLite to assume")
set(TFLITE_VERSION_PATCH "0" CACHE STRING "Patch version of TFLite to assume")
set(TFLITE_VERSION "${TFLITE_VERSION_MAJOR}.${TFLITE_VERSION_MINOR}.${TFLITE_VERSION_PATCH}")

Expand Down
2 changes: 1 addition & 1 deletion apps/hannk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ clean:
# ---------------------- TFLite glue

TFLITE_VERSION_MAJOR ?= 2
TFLITE_VERSION_MINOR ?= 6
TFLITE_VERSION_MINOR ?= 7
TFLITE_VERSION_PATCH ?= 0

TFLITE_VERSION = $(TFLITE_VERSION_MAJOR).$(TFLITE_VERSION_MINOR).$(TFLITE_VERSION_PATCH)
Expand Down
2 changes: 1 addition & 1 deletion apps/hannk/delegate/hannk_delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,8 @@ class HannkDelegateKernel final {
auto input = GetTensorById(context, node->inputs->data[0]);
auto indices = GetTensorById(context, node->inputs->data[1]);
auto output = GetTensorById(context, node->outputs->data[0]);
const TfLiteReducerParams *params = (const TfLiteReducerParams *)(node->builtin_data);
#ifndef NDEBUG
const TfLiteReducerParams *params = (const TfLiteReducerParams *)(node->builtin_data);
const bool keep_dims = params ? params->keep_dims : false;
// TODO: I have yet to find any examples of keep_dims == false in the wild.
// If/when we do, handle it appropriately.
Expand Down
2 changes: 1 addition & 1 deletion apps/hannk/tflite/tflite_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ class Parser {
TensorPtr input = tensors_[op->inputs()->Get(0)];
TensorPtr indices = tensors_[op->inputs()->Get(1)];
TensorPtr output = tensors_[op->outputs()->Get(0)];
const tflite::ReducerOptions *options = op->builtin_options_as_ReducerOptions();
#ifndef NDEBUG
const tflite::ReducerOptions *options = op->builtin_options_as_ReducerOptions();
const bool keep_dims = options ? options->keep_dims() : false;
// TODO: I have yet to find any examples of keep_dims == false in the wild.
// If/when we do, handle it appropriately.
Expand Down

0 comments on commit b189722

Please sign in to comment.