Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hannk] Upgrade hannk to use TFLite 2.7.0 by default #6393

Merged
merged 2 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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