Skip to contentSkip to conversation

tensorflow-lite: update to version 1.15

PATCH New Hongmei Gou 1 participant 1 message Oct 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/3 tensorflow-lite: update to version 1.15

---
v3 change: update the source link for gemmlowp

 ...kefile-add-label_image-example-1.15.patch} | 71 +++++++-------
 ...dification-for-tflite-1.15-to-eigen.patch} | 10 +-
 ...w-lite_1.12.bb => tensorflow-lite_1.15.bb} | 92 +++++++++----------
 3 files changed, 83 insertions(+), 90 deletions(-)
 rename meta-arago-extras/recipes-support/tensorflow-lite/files/{0001-Makefile-add-label_image-example.patch => 0001-Makefile-add-label_image-example-1.15.patch} (46%)
 rename meta-arago-extras/recipes-support/tensorflow-lite/files/{apply-modification-for-tflite-1.12-to-eigen.patch => apply-modification-for-tflite-1.15-to-eigen.patch} (45%)
 rename meta-arago-extras/recipes-support/tensorflow-lite/{tensorflow-lite_1.12.bb => tensorflow-lite_1.15.bb} (50%)
meta-arago-extras/recipes-support/tensorflow-lite/files/0001-Makefile-add-label_image-example-1.15.patch renamed from meta-arago-extras/recipes-support/tensorflow-lite/files/0001-Makefile-add-label_image-example.patch +32 -39
similarity index 46%
rename from meta-arago-extras/recipes-support/tensorflow-lite/files/0001-Makefile-add-label_image-example.patch
rename to meta-arago-extras/recipes-support/tensorflow-lite/files/0001-Makefile-add-label_image-example-1.15.patch
index 61f821e3..ef5e1cbf 100644
@@ -1,50 +1,41 @@
-From 87cf7e879640436f19f26e338dce6c343c19bfd8 Mon Sep 17 00:00:00 2001
+From 481c021e98c443195b73484fd0d9d50a2e0ae69a Mon Sep 17 00:00:00 2001
 From: Hongmei Gou <[email protected]>
-Date: Wed, 21 Aug 2019 18:03:17 -0400
+Date: Wed, 25 Sep 2019 18:07:04 -0400
 Subject: [PATCH] Makefile: add label_image example
 
 Upstream-Status: Pending
 
 Signed-off-by: Hongmei Gou <[email protected]>
 ---
- tensorflow/contrib/lite/tools/make/Makefile | 21 +++++++++++++++++++--
- 1 file changed, 19 insertions(+), 2 deletions(-)
+ tensorflow/lite/tools/make/Makefile | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
 
-diff --git a/tensorflow/contrib/lite/tools/make/Makefile b/tensorflow/contrib/lite/tools/make/Makefile
-index 16012a3fb1..a5e5cb3fc7 100644
---- a/tensorflow/contrib/lite/tools/make/Makefile
-+++ b/tensorflow/contrib/lite/tools/make/Makefile
-@@ -72,6 +72,11 @@ BENCHMARK_BINARY_NAME := benchmark_model
- MINIMAL_SRCS := \
- tensorflow/contrib/lite/examples/minimal/minimal.cc
+diff --git a/tensorflow/lite/tools/make/Makefile b/tensorflow/lite/tools/make/Makefile
+index 73c50d3272..e2f664e1eb 100644
+--- a/tensorflow/lite/tools/make/Makefile
++++ b/tensorflow/lite/tools/make/Makefile
+@@ -201,6 +201,12 @@ BENCHMARK_SRCS := $(filter-out \
+ 	$(BENCHMARK_SRCS_DIR)/benchmark_plus_flex_main.cc, \
+ 	$(BENCHMARK_ALL_SRCS))
  
 +# label image example
 +LABELIMAGE_SRCS := \
-+tensorflow/contrib/lite/examples/label_image/bitmap_helpers.cc \
-+tensorflow/contrib/lite/examples/label_image/label_image.cc
++	tensorflow/lite/examples/label_image/bitmap_helpers.cc \
++	tensorflow/lite/examples/label_image/label_image.cc \
++	$(EVALUATION_UTILS_SRCS)
 +
- # What sources we want to compile, must be kept in sync with the main Bazel
- # build files.
- 
-@@ -108,7 +113,8 @@ $(wildcard tensorflow/contrib/lite/*/*test.cc) \
- $(wildcard tensorflow/contrib/lite/*/*/*test.cc) \
- $(wildcard tensorflow/contrib/lite/*/*/*/*test.cc) \
- $(wildcard tensorflow/contrib/lite/kernels/test_util.cc) \
--$(MINIMAL_SRCS)
-+$(MINIMAL_SRCS) \
-+$(LABELIMAGE_SRCS)
- ifeq ($(BUILD_TYPE),micro)
- CORE_CC_EXCLUDE_SRCS += \
- tensorflow/contrib/lite/mmap_allocation.cc \
-@@ -135,6 +141,7 @@ include $(wildcard $(MAKEFILE_DIR)/targets/*_makefile.inc)
+ # These target-specific makefiles should modify or replace options like
+ # CXXFLAGS or LIBS to work for a specific targetted architecture. All logic
+ # based on platforms or architectures should happen within these files, to
+@@ -209,6 +215,7 @@ include $(wildcard $(MAKEFILE_DIR)/targets/*_makefile.inc)
  
  ALL_SRCS := \
  	$(MINIMAL_SRCS) \
 +	$(LABELIMAGE_SRCS) \
  	$(PROFILER_SRCS) \
- 	$(PROFILER_SUMMARY_SRCS) \
+ 	$(PROFILER_SUMMARIZER_SRCS) \
  	$(TF_LITE_CC_SRCS) \
-@@ -150,6 +157,7 @@ LIB_PATH := $(LIBDIR)$(LIB_NAME)
+@@ -225,6 +232,7 @@ LIB_PATH := $(LIBDIR)$(LIB_NAME)
  BENCHMARK_LIB := $(LIBDIR)$(BENCHMARK_LIB_NAME)
  BENCHMARK_BINARY := $(BINDIR)$(BENCHMARK_BINARY_NAME)
  MINIMAL_BINARY := $(BINDIR)minimal
@@ -52,7 +43,7 @@ index 16012a3fb1..a5e5cb3fc7 100644
  
  CXX := $(CC_PREFIX)${TARGET_TOOLCHAIN_PREFIX}g++
  CC := $(CC_PREFIX)${TARGET_TOOLCHAIN_PREFIX}gcc
-@@ -158,6 +166,9 @@ AR := $(CC_PREFIX)${TARGET_TOOLCHAIN_PREFIX}ar
+@@ -233,6 +241,9 @@ AR := $(CC_PREFIX)${TARGET_TOOLCHAIN_PREFIX}ar
  MINIMAL_OBJS := $(addprefix $(OBJDIR), \
  $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(MINIMAL_SRCS))))
  
@@ -60,10 +51,10 @@ index 16012a3fb1..a5e5cb3fc7 100644
 +$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(LABELIMAGE_SRCS))))
 +
  LIB_OBJS := $(addprefix $(OBJDIR), \
- $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(TF_LITE_CC_SRCS))))
+ $(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(TF_LITE_CC_SRCS)))))
  
-@@ -174,7 +185,7 @@ $(OBJDIR)%.o: %.c
- 	$(CC) $(CCFLAGS) $(INCLUDES) -c $< -o $@
+@@ -252,7 +263,7 @@ $(OBJDIR)%.o: %.cpp
+ 	$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
  
  # The target that's compiled if there's no command-line arguments.
 -all: $(LIB_PATH)  $(MINIMAL_BINARY) $(BENCHMARK_BINARY)
@@ -71,9 +62,9 @@ index 16012a3fb1..a5e5cb3fc7 100644
  
  # The target that's compiled for micro-controllers
  micro: $(LIB_PATH)
-@@ -198,6 +209,12 @@ $(BENCHMARK_LIB) : $(LIB_PATH) $(BENCHMARK_OBJS)
- 	@mkdir -p $(dir $@)
- 	$(AR) $(ARFLAGS) $(BENCHMARK_LIB) $(LIB_OBJS) $(BENCHMARK_OBJS)
+@@ -276,6 +287,14 @@ $(MINIMAL_BINARY): $(MINIMAL_OBJS) $(LIB_PATH)
+ 
+ minimal: $(MINIMAL_BINARY)
  
 +$(LABELIMAGE_BINARY): $(LABELIMAGE_OBJS) $(LIB_PATH)
 +	@mkdir -p $(dir $@)
@@ -81,9 +72,11 @@ index 16012a3fb1..a5e5cb3fc7 100644
 +	-o $(LABELIMAGE_BINARY) $(LABELIMAGE_OBJS) \
 +	$(LIBFLAGS) $(LIB_PATH) $(LDFLAGS) $(LIBS)
 +
- benchmark_lib: $(BENCHMARK_LIB)
- 
- $(BENCHMARK_BINARY) : $(BENCHMARK_LIB)
++label_image: $(LABELIMAGE_BINARY)
++
+ $(BENCHMARK_LIB) : $(LIB_PATH) $(BENCHMARK_OBJS)
+ 	@mkdir -p $(dir $@)
+ 	$(AR) $(ARFLAGS) $(BENCHMARK_LIB) $(LIB_OBJS) $(BENCHMARK_OBJS)
 -- 
 2.17.1
 
meta-arago-extras/recipes-support/tensorflow-lite/files/apply-modification-for-tflite-1.15-to-eigen.patch renamed from meta-arago-extras/recipes-support/tensorflow-lite/files/apply-modification-for-tflite-1.12-to-eigen.patch +5 -5
similarity index 45%
rename from meta-arago-extras/recipes-support/tensorflow-lite/files/apply-modification-for-tflite-1.12-to-eigen.patch
rename to meta-arago-extras/recipes-support/tensorflow-lite/files/apply-modification-for-tflite-1.15-to-eigen.patch
index 1a8de78b..06c9c63a 100644
@@ -1,13 +1,13 @@
-diff --git a/tensorflow/contrib/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h b/tensorflow/contrib/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h
+diff --git a/tensorflow/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h b/tensorflow/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h
 index 306a309beb..4527a64c91 100644
---- a/tensorflow/contrib/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h
-+++ b/tensorflow/contrib/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h
-@@ -295,7 +295,7 @@ ptranspose(PacketBlock<Packet2cf,2>& kernel) {
+--- a/tensorflow/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h
++++ b/tensorflow/lite/tools/make/downloads/eigen/Eigen/src/Core/arch/NEON/Complex.h
+@@ -307,7 +307,7 @@
    static uint64x2_t p2ul_CONJ_XOR = {0x0, 0x8000000000000000};
  #else
    const uint64_t  p2ul_conj_XOR_DATA[] = { 0x0, 0x8000000000000000 };
 -  static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA );
 +  static uint64x2_t p2ul_CONJ_XOR;// = vld1q_u64( p2ul_conj_XOR_DATA ); - Removed by script
  #endif
- 
+
  struct Packet1cd
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb renamed from meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.12.bb +46 -46

150 lines not on this page · raw message

Signature · 1 line
2.17.1