All of lore.kernel.org
 help / color / mirror / Atom feed
* [thud/master] [PATCH 1/3] tensorflow-lite: correct typos when modifying the compilation flags
@ 2019-11-13  0:13 Hongmei Gou
  2019-11-13  0:13 ` [thud/master] [PATCH 2/3] tensorflow-lite: add scripts for benchmarking Hongmei Gou
  2019-11-13  0:13 ` [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite Hongmei Gou
  0 siblings, 2 replies; 5+ messages in thread
From: Hongmei Gou @ 2019-11-13  0:13 UTC (permalink / raw)
  To: meta-arago; +Cc: Hongmei Gou

Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
 .../tensorflow-lite/tensorflow-lite_1.15.bb          | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb
index 612440c3..c676177b 100644
--- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb
+++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb
@@ -40,17 +40,17 @@ SRC_URI[mobilenet_v1_quant.sha256sum] = "d32432d28673a936b2d6281ab0600c71cf7226d
 
 SRCREV = "590d6eef7e91a6a7392c8ffffb7b58f2e0c8bc6b"
 
-PR = "r0"
+PR = "r1"
 
 S = "${WORKDIR}/git"
 
 DEPENDS = "zlib"
 TARGET_CFLAGS_remove = "-O2"
-TARGET_CPPLAGS_remove = "-O2"
-TARGET_CXXLAGS_remove = "-O2"
-CCFLAGS_append = " -O3 -DNDEBUG -fPIC -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \
+TARGET_CPPFLAGS_remove = "-O2"
+TARGET_CXXFLAGS_remove = "-O2"
+CFLAGS_append = " -O3 -DNDEBUG -fPIC -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \
     -I${STAGING_INCDIR}"
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \
+CPPFLAGS_append = " -O3 -DNDEBUG -fPIC -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \
     -I${STAGING_INCDIR}"
 LDFLAGS_remove = "-Wl,-O1"
 CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK \
@@ -84,7 +84,7 @@ EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CPP=${CPP}' \
     'CFLAGS=${CFLAGS}' \
-    'CPPFLAGS=${CFLAGS}' \
+    'CPPFLAGS=${CPPFLAGS}' \
     'CXXFLAGS=${CXXFLAGS}' \
     'AR=${AR}' \
     'LD=${LD}' \
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [thud/master] [PATCH 2/3] tensorflow-lite: add scripts for benchmarking
  2019-11-13  0:13 [thud/master] [PATCH 1/3] tensorflow-lite: correct typos when modifying the compilation flags Hongmei Gou
@ 2019-11-13  0:13 ` Hongmei Gou
  2019-11-13  0:13 ` [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite Hongmei Gou
  1 sibling, 0 replies; 5+ messages in thread
From: Hongmei Gou @ 2019-11-13  0:13 UTC (permalink / raw)
  To: meta-arago; +Cc: Hongmei Gou

Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
 .../tensorflow-lite/files/tflite-benchmark.sh | 58 +++++++++++++++++++
 .../tensorflow-lite/tensorflow-lite_1.15.bb   |  6 +-
 2 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 meta-arago-extras/recipes-support/tensorflow-lite/files/tflite-benchmark.sh

diff --git a/meta-arago-extras/recipes-support/tensorflow-lite/files/tflite-benchmark.sh b/meta-arago-extras/recipes-support/tensorflow-lite/files/tflite-benchmark.sh
new file mode 100644
index 00000000..c37ca53f
--- /dev/null
+++ b/meta-arago-extras/recipes-support/tensorflow-lite/files/tflite-benchmark.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+#list of model packages
+declare -a model_list=(
+"http://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224_quant.tgz"
+"http://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/mobilenet_v2_1.0_224_quant.tgz"
+"http://storage.googleapis.com/download.tensorflow.org/models/inception_v1_224_quant_20181026.tgz"
+"http://storage.googleapis.com/download.tensorflow.org/models/inception_v2_224_quant_20181026.tgz"
+"http://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/inception_v3_quant.tgz"
+"http://storage.googleapis.com/download.tensorflow.org/models/inception_v4_299_quant_20181026.tgz"
+"http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip"
+)
+
+# create a new directory to host and unpack the models
+rm -rf ~/tflite-benchmark
+mkdir ~/tflite-benchmark
+
+# set up http proxy - MODIFY THIS AS NEEDED!!
+ti_http_proxy="http://webproxy.ext.ti.com:80"
+
+# Set maximal number of threads to the number of arm cores
+max_num_threads=`nproc`
+
+# TFLite install dir on filesystem
+tflite_install_dir=$(find /usr/share -maxdepth 1 -type d -name "tensorflow-lite*")
+
+for model_link in "${model_list[@]}"
+do
+  # download the model package to modeldir
+  modelpkg="${model_link##*/}"
+  modeldir="${modelpkg%.*}"
+
+  mkdir ~/tflite-benchmark/$modeldir
+  cd ~/tflite-benchmark/$modeldir
+
+  echo "Downloading $modelpkg..."
+  http_proxy="$ti_http_proxy" wget "$model_link"
+
+  # unpack the model package
+  if [[ $modelpkg =~ \.tgz$ ]]; then
+    tar -xzvf $modelpkg
+  fi
+  if [[ $modelpkg =~ \.zip$ ]]; then
+    unzip $modelpkg
+  fi
+
+  # run benchmark for the model
+  for model in *.tflite; do
+    for num_threads in $( seq 1 $max_num_threads )
+      do
+        echo "Running benchmark_model for $model with $num_threads thread(s)..."
+        $tflite_install_dir/examples/benchmark_model --graph=${model} --num_threads=$num_threads --enable_op_profiling=true > ${modeldir}_thread_${num_threads}.log
+        cat ${modeldir}_thread_${num_threads}.log | grep Timings
+      done
+  done
+done
+
+echo "Benchmarking completed!"
diff --git a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb
index c676177b..aade3a1d 100644
--- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb
+++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite_1.15.bb
@@ -33,6 +33,7 @@ SRC_URI = "git://github.com/tensorflow/tensorflow.git;branch=r${PV};protocol=htt
     http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224_quant.tgz;name=mobilenet_v1_quant;subdir=${WORKDIR}/model;destsuffix=model \
     file://apply-modification-for-tflite-${PV}-to-eigen.patch \
     file://0001-Makefile-add-label_image-example-${PV}.patch \
+    file://tflite-benchmark.sh \
     file://tensorflow-lite.pc.in"
 
 SRC_URI[mobilenet_v1_quant.md5sum] = "36af340c00e60291931cb30ce32d4e86"
@@ -40,7 +41,7 @@ SRC_URI[mobilenet_v1_quant.sha256sum] = "d32432d28673a936b2d6281ab0600c71cf7226d
 
 SRCREV = "590d6eef7e91a6a7392c8ffffb7b58f2e0c8bc6b"
 
-PR = "r1"
+PR = "r2"
 
 S = "${WORKDIR}/git"
 
@@ -128,6 +129,9 @@ do_install() {
     install -m 0644 ${S}/tensorflow/lite/examples/label_image/testdata/grace_hopper.bmp ${D}${datadir}/${PN}-${PV}/examples
     install -m 0644 ${S}/tensorflow/lite/java/ovic/src/testdata/labels.txt ${D}${datadir}/${PN}-${PV}/examples
     install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224_quant.tflite ${D}${datadir}/${PN}-${PV}/examples
+    # install scripts for benchmarking
+    install -d ${D}${bindir}
+    install -m 0755 ${WORKDIR}/tflite-benchmark.sh ${D}/${bindir}
 }
 
 PACKAGES += "${PN}-examples"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite
  2019-11-13  0:13 [thud/master] [PATCH 1/3] tensorflow-lite: correct typos when modifying the compilation flags Hongmei Gou
  2019-11-13  0:13 ` [thud/master] [PATCH 2/3] tensorflow-lite: add scripts for benchmarking Hongmei Gou
@ 2019-11-13  0:13 ` Hongmei Gou
  2019-11-13 18:34   ` Denys Dmytriyenko
  2019-11-14  0:06   ` Gou, Hongmei
  1 sibling, 2 replies; 5+ messages in thread
From: Hongmei Gou @ 2019-11-13  0:13 UTC (permalink / raw)
  To: meta-arago; +Cc: Hongmei Gou

Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
 .../packagegroups/packagegroup-arago-tisdk-addons.bb        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
index 14b2370c..73f3f950 100644
--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
+++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "Task to install additional utilities/demos for SDKs"
 LICENSE = "MIT"
-PR = "r76"
+PR = "r77"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
@@ -154,6 +154,7 @@ EXTRA_PACKAGES_append_ti33x = " voxelsdk \
                                 arm-compute-library \
                                 ${ARMNN_PACKAGES} \
                                 tensorflow-lite-examples \
+                                tensorflow-lite \
                                 pdm-anomaly-detection \
 "
 
@@ -161,6 +162,7 @@ EXTRA_PACKAGES_append_ti43x = " voxelsdk \
                                 arm-compute-library \
                                 ${ARMNN_PACKAGES} \
                                 tensorflow-lite-examples \
+                                tensorflow-lite \
                                 pdm-anomaly-detection \
 "
 
@@ -170,12 +172,14 @@ EXTRA_PACKAGES_append_omap-a15 = " voxelsdk \
                                    arm-compute-library \
                                    ${ARMNN_PACKAGES} \
                                    tensorflow-lite-examples \
+                                   tensorflow-lite \
                                    pdm-anomaly-detection \
 "
 
 EXTRA_PACKAGES_append_am65xx = " arm-compute-library \
                              ${ARMNN_PACKAGES} \
                              tensorflow-lite-examples \
+                             tensorflow-lite \
                              pdm-anomaly-detection \
 "
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite
  2019-11-13  0:13 ` [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite Hongmei Gou
@ 2019-11-13 18:34   ` Denys Dmytriyenko
  2019-11-14  0:06   ` Gou, Hongmei
  1 sibling, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2019-11-13 18:34 UTC (permalink / raw)
  To: Hongmei Gou; +Cc: meta-arago

On Tue, Nov 12, 2019 at 07:13:49PM -0500, Hongmei Gou wrote:
> Signed-off-by: Hongmei Gou <a0271529@ti.com>
> ---
>  .../packagegroups/packagegroup-arago-tisdk-addons.bb        | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
> index 14b2370c..73f3f950 100644
> --- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
> +++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
> @@ -1,6 +1,6 @@
>  DESCRIPTION = "Task to install additional utilities/demos for SDKs"
>  LICENSE = "MIT"
> -PR = "r76"
> +PR = "r77"
>  
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
> @@ -154,6 +154,7 @@ EXTRA_PACKAGES_append_ti33x = " voxelsdk \
>                                  arm-compute-library \
>                                  ${ARMNN_PACKAGES} \
>                                  tensorflow-lite-examples \
> +                                tensorflow-lite \

Can you make tensorflow-lite-examples properly RDEPENDS on tensorflow-lite 
instead?


>                                  pdm-anomaly-detection \
>  "
>  
> @@ -161,6 +162,7 @@ EXTRA_PACKAGES_append_ti43x = " voxelsdk \
>                                  arm-compute-library \
>                                  ${ARMNN_PACKAGES} \
>                                  tensorflow-lite-examples \
> +                                tensorflow-lite \
>                                  pdm-anomaly-detection \
>  "
>  
> @@ -170,12 +172,14 @@ EXTRA_PACKAGES_append_omap-a15 = " voxelsdk \
>                                     arm-compute-library \
>                                     ${ARMNN_PACKAGES} \
>                                     tensorflow-lite-examples \
> +                                   tensorflow-lite \
>                                     pdm-anomaly-detection \
>  "
>  
>  EXTRA_PACKAGES_append_am65xx = " arm-compute-library \
>                               ${ARMNN_PACKAGES} \
>                               tensorflow-lite-examples \
> +                             tensorflow-lite \
>                               pdm-anomaly-detection \
>  "
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite
  2019-11-13  0:13 ` [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite Hongmei Gou
  2019-11-13 18:34   ` Denys Dmytriyenko
@ 2019-11-14  0:06   ` Gou, Hongmei
  1 sibling, 0 replies; 5+ messages in thread
From: Gou, Hongmei @ 2019-11-14  0:06 UTC (permalink / raw)
  To: meta-arago

NACK. This patch is no longer needed with the updated patch for tensorflow-lite: http://patchwork.dal.design.ti.com/patch/51102/.

-----Original Message-----
From: Gou, Hongmei 
Sent: Tuesday, November 12, 2019 7:14 PM
To: meta-arago@arago-project.org
Cc: Gou, Hongmei
Subject: [meta-arago] [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite

Signed-off-by: Hongmei Gou <a0271529@ti.com>
---
 .../packagegroups/packagegroup-arago-tisdk-addons.bb        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
index 14b2370c..73f3f950 100644
--- a/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
+++ b/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-tisdk-addons.bb
@@ -1,6 +1,6 @@
 DESCRIPTION = "Task to install additional utilities/demos for SDKs"
 LICENSE = "MIT"
-PR = "r76"
+PR = "r77"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
@@ -154,6 +154,7 @@ EXTRA_PACKAGES_append_ti33x = " voxelsdk \
                                 arm-compute-library \
                                 ${ARMNN_PACKAGES} \
                                 tensorflow-lite-examples \
+                                tensorflow-lite \
                                 pdm-anomaly-detection \
 "
 
@@ -161,6 +162,7 @@ EXTRA_PACKAGES_append_ti43x = " voxelsdk \
                                 arm-compute-library \
                                 ${ARMNN_PACKAGES} \
                                 tensorflow-lite-examples \
+                                tensorflow-lite \
                                 pdm-anomaly-detection \
 "
 
@@ -170,12 +172,14 @@ EXTRA_PACKAGES_append_omap-a15 = " voxelsdk \
                                    arm-compute-library \
                                    ${ARMNN_PACKAGES} \
                                    tensorflow-lite-examples \
+                                   tensorflow-lite \
                                    pdm-anomaly-detection \
 "
 
 EXTRA_PACKAGES_append_am65xx = " arm-compute-library \
                              ${ARMNN_PACKAGES} \
                              tensorflow-lite-examples \
+                             tensorflow-lite \
                              pdm-anomaly-detection \
 "
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-14  0:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13  0:13 [thud/master] [PATCH 1/3] tensorflow-lite: correct typos when modifying the compilation flags Hongmei Gou
2019-11-13  0:13 ` [thud/master] [PATCH 2/3] tensorflow-lite: add scripts for benchmarking Hongmei Gou
2019-11-13  0:13 ` [thud/master] [PATCH 3/3] packagegroup-arago-tisdk-addons: add tensorflow-lite Hongmei Gou
2019-11-13 18:34   ` Denys Dmytriyenko
2019-11-14  0:06   ` Gou, Hongmei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.