From 7447f8cc82c85384e44043f5206d212ae3913ccc Mon Sep 17 00:00:00 2001 From: Kris Date: Thu, 11 Aug 2022 11:23:01 +0800 Subject: [PATCH] update makefile image gen tool version, tflm sdk version and fix bug about offset function --- Makefile | 4 ++-- tensorflow/lite/kernels/internal/types.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f03de7b..6d93726 100644 --- a/Makefile +++ b/Makefile @@ -29,11 +29,11 @@ MODEL_LINK = https://www.himax.com.tw/we-i/himax_tflu_tree/model_setting_v03.zip MODEL_LOC = tensorflow/lite/micro/tools/make/downloads/ MODEL_NAME = model.zip -SDK_LINK = https://www.himax.com.tw/we-i/himax_we1_sdk_v18.zip +SDK_LINK = https://www.himax.com.tw/we-i/himax_we1_sdk_v20.zip SDK_LOC = . SDK_NAME = sdk.zip -TOOL_LINK = https://www.himax.com.tw/we-i/image_gen_linux_v2_1_10.zip +TOOL_LINK = https://www.himax.com.tw/we-i/image_gen_linux_v2_1_12.zip TOOL_LOC = . TOOL_NAME = image_gen.zip diff --git a/tensorflow/lite/kernels/internal/types.h b/tensorflow/lite/kernels/internal/types.h index 8be5e34..df37fa1 100644 --- a/tensorflow/lite/kernels/internal/types.h +++ b/tensorflow/lite/kernels/internal/types.h @@ -402,7 +402,11 @@ inline size_t ReducedOutputOffset(const int num_dims, const int* dims, inline int Offset(const RuntimeShape& shape, int i0, int i1, int i2, int i3) { TFLITE_DCHECK_EQ(shape.DimensionsCount(), 4); - const int* dims_data = reinterpret_cast(shape.DimsDataUpTo5D()); + #if (defined(__GNUC__) || defined(__GNUG__)) && !defined (__CCAC__) + volatile const int* dims_data = reinterpret_cast(shape.DimsDataUpTo5D()); + #else + const int* dims_data = reinterpret_cast(shape.DimsDataUpTo5D()); + #endif TFLITE_DCHECK(i0 >= 0 && i0 < dims_data[0]); TFLITE_DCHECK(i1 >= 0 && i1 < dims_data[1]); TFLITE_DCHECK(i2 >= 0 && i2 < dims_data[2]);