Skip to contentSkip to conversation

tensorflow-lite-demo: Bump SRCREV and add tidl offload support for AM5

PATCH Superseded Hongmei Gou 3 participants 6 messages Feb 28, 2020 – Mar 2, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tensorflow-lite-demo: Bump SRCREV and add tidl offload support for AM5

* Build the demos with tidl offload option for AM5
* Include mobilenet v1 model for demonstrating tidl offload
* Remove the demo scripts under the files directory. The scripts are now maintained in the source repo.
* Make adjustments with the updated Makefile

---
 .../files/run_classification.sh               |  7 -----
 .../tensorflow-lite/files/run_segmentation.sh |  8 ------
 .../tensorflow-lite-demo_git.bb               | 27 +++++++++++--------
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh
meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -7
deleted file mode 100644
index b2ad7fc4..00000000
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_classification binary with the model, the input image, and the label file specified.
-# Classification label is overlayed with the input image. Right click the image display window to exit.
-./tflite_classification -m ../examples/mobilenet_v1_1.0_224_quant.tflite -i ../examples/grace_hopper.bmp -l ../examples/labels.txt
meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh deleted +0 -8
deleted file mode 100644
index 5caea127..00000000
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_segmentation binary with the model and the input image specified.
-# The display window shows the input(resized) image, segmentation map, overlay
-# of the former two. Right click the image display window to exit.
-./tflite_segmentation -m ./deeplabv3_257_mv_gpu.tflite -i ./bird_segmentation.bmp
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +16 -11
index 9b99b63c..57d6ef20 100644
@@ -1,33 +1,33 @@
-DESCRIPTION = "Tensorflow Lite Demo with input and display via OpenCV and TIDL acceleration for AM5"
+SUMMARY = "Tensorflow Lite Demo with input and display via OpenCV and TIDL acceleration for AM5"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"
 
 DEPENDS = "tensorflow-lite flatbuffers opencv"
+DEPENDS_append_dra7xx = " tidl-api"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PV = "01.00.00"
-PR = "r0"
+PR = "r1"
 
 BRANCH = "master"
 SRC_URI  = "git://git.ti.com/apps/tensorflow-lite-examples.git;protocol=git;branch=${BRANCH} \
             http://storage.googleapis.com/download.tensorflow.org/models/tflite/gpu/deeplabv3_257_mv_gpu.tflite;name=deeplabv3;subdir=${WORKDIR}/model;destsuffix=model \
-            http://raw.githubusercontent.com/google-coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segmentation;subdir=${WORKDIR}/test_data;destsuffix=test_data \
-            file://run_classification.sh \
-            file://run_segmentation.sh"
+            http://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenetv1;subdir=${WORKDIR}/model;destsuffix=model \
+            http://raw.githubusercontent.com/google-coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segmentation;subdir=${WORKDIR}/test_data;destsuffix=test_data"
 
 SRC_URI[deeplabv3.md5sum] = "4a24db5a5fb05c47586a1197765e8548"
 SRC_URI[deeplabv3.sha256sum] = "68a539782c2c6a72f8aac3724600124a85ed977162b44e84cbae5db717c933c6"
+SRC_URI[mobilenetv1.md5sum] = "d5f69cef81ad8afb335d9727a17c462a"
+SRC_URI[mobilenetv1.sha256sum] = "1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"
 SRC_URI[bird_segmentation.md5sum] = "fc3202ac4e3033b36df3043de6dc32c9"
 SRC_URI[bird_segmentation.sha256sum] = "e43cedd29ab385db787531c8a6cdcb31c5e4292af34f242877ed40611e502670"
 
-SRCREV = "d84f1d43585c0db2fa6a1c15db9145ab53f859ce"
+SRCREV = "bd6a429c21f96d5112e0b6dea44a13b748eefd74"
 
 S = "${WORKDIR}/git"
 
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -I${STAGING_INCDIR}"
-LDFLAGS_append = " -L${STAGING_LIBDIR}"
-
 EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CXXFLAGS=${CXXFLAGS}' \
@@ -37,8 +37,12 @@ EXTRA_OEMAKE = "\
     'TARGET=${TARGET_OS}' \
     'TARGET_ARCH=${TARGET_ARCH}'"
 
+EXTRA_OEMAKE += "SYSROOT_INCDIR="${STAGING_INCDIR}" SYSROOT_LIBDIR="${STAGING_LIBDIR}" \
+                 TIDL_API_DIR="${STAGING_DATADIR}/ti/tidl""
+
+TIDL_dra7xx = "yes"
 do_compile() {
-    oe_runmake -f Makefile
+    oe_runmake -f Makefile TIDL_ACC=${TIDL}
 }
 
 do_install() {
@@ -46,8 +50,9 @@ do_install() {
     install -m 0755 ${S}/tflite_classification ${D}${datadir}/tensorflow-lite/demos
     install -m 0755 ${S}/tflite_segmentation ${D}${datadir}/tensorflow-lite/demos
     install -m 0644 ${WORKDIR}/model/deeplabv3_257_mv_gpu.tflite ${D}${datadir}/tensorflow-lite/demos
+    install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224.tflite ${D}${datadir}/tensorflow-lite/demos
     install -m 0644 ${WORKDIR}/test_data/bird_segmentation.bmp ${D}${datadir}/tensorflow-lite/demos
-    install -m 0755 ${WORKDIR}/run*.sh ${D}${datadir}/tensorflow-lite/demos
+    install -m 0755 ${S}/scripts/run*.sh ${D}${datadir}/tensorflow-lite/demos
 }
 
 FILES_${PN} = "${datadir}/tensorflow-lite/demos"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 90 lines · Hongmei Gou

* Build the demos with tidl offload option for AM5
* Include mobilenet v1 model for demonstrating tidl offload
* Remove the demo scripts under the files directory. The scripts are now maintained in the source repo.
* Make adjustments with the updated Makefile

---
 .../files/run_classification.sh               |  7 -----
 .../tensorflow-lite/files/run_segmentation.sh |  8 ------
 .../tensorflow-lite-demo_git.bb               | 27 +++++++++++--------
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh
meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -7
deleted file mode 100644
index b2ad7fc4..00000000
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_classification binary with the model, the input image, and the label file specified.
-# Classification label is overlayed with the input image. Right click the image display window to exit.
-./tflite_classification -m ../examples/mobilenet_v1_1.0_224_quant.tflite -i ../examples/grace_hopper.bmp -l ../examples/labels.txt
meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh deleted +0 -8
deleted file mode 100644
index 5caea127..00000000
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_segmentation binary with the model and the input image specified.
-# The display window shows the input(resized) image, segmentation map, overlay
-# of the former two. Right click the image display window to exit.
-./tflite_segmentation -m ./deeplabv3_257_mv_gpu.tflite -i ./bird_segmentation.bmp
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +9 -9
index 9b99b63c..57d6ef20 100644
@@ -1,33 +1,33 @@
-DESCRIPTION = "Tensorflow Lite Demo with input and display via OpenCV and TIDL acceleration for AM5"
+SUMMARY = "Tensorflow Lite Demo with input and display via OpenCV and TIDL acceleration for AM5"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"
 
 DEPENDS = "tensorflow-lite flatbuffers opencv"
+DEPENDS_append_dra7xx = " tidl-api"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PV = "01.00.00"
-PR = "r0"
+PR = "r1"
 
 BRANCH = "master"
 SRC_URI  = "git://git.ti.com/apps/tensorflow-lite-examples.git;protocol=git;branch=${BRANCH} \
             http://storage.googleapis.com/download.tensorflow.org/models/tflite/gpu/deeplabv3_257_mv_gpu.tflite;name=deeplabv3;subdir=${WORKDIR}/model;destsuffix=model \
-            http://raw.githubusercontent.com/google-coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segmentation;subdir=${WORKDIR}/test_data;destsuffix=test_data \
-            file://run_classification.sh \
-            file://run_segmentation.sh"
+            http://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenetv1;subdir=${WORKDIR}/model;destsuffix=model \
+            http://raw.githubusercontent.com/google-coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segmentation;subdir=${WORKDIR}/test_data;destsuffix=test_data"
 
 SRC_URI[deeplabv3.md5sum] = "4a24db5a5fb05c47586a1197765e8548"
 SRC_URI[deeplabv3.sha256sum] = "68a539782c2c6a72f8aac3724600124a85ed977162b44e84cbae5db717c933c6"
+SRC_URI[mobilenetv1.md5sum] = "d5f69cef81ad8afb335d9727a17c462a"
+SRC_URI[mobilenetv1.sha256sum] = "1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"
 SRC_URI[bird_segmentation.md5sum] = "fc3202ac4e3033b36df3043de6dc32c9"
 SRC_URI[bird_segmentation.sha256sum] = "e43cedd29ab385db787531c8a6cdcb31c5e4292af34f242877ed40611e502670"
 
-SRCREV = "d84f1d43585c0db2fa6a1c15db9145ab53f859ce"
+SRCREV = "bd6a429c21f96d5112e0b6dea44a13b748eefd74"
 
 S = "${WORKDIR}/git"
 
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -I${STAGING_INCDIR}"
-LDFLAGS_append = " -L${STAGING_LIBDIR}"
-
 EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CXXFLAGS=${CXXFLAGS}' \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 43

Quoted 7 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +4 -0
@@ -37,8 +37,12 @@ EXTRA_OEMAKE = "\
     'TARGET=${TARGET_OS}' \
     'TARGET_ARCH=${TARGET_ARCH}'"
 
+EXTRA_OEMAKE += "SYSROOT_INCDIR="${STAGING_INCDIR}" SYSROOT_LIBDIR="${STAGING_LIBDIR}" \
+                 TIDL_API_DIR="${STAGING_DATADIR}/ti/tidl""
+
+TIDL_dra7xx = "yes"

Will TIDL be undefined for other platforms?

Quoted 24 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -2
 do_compile() {
-    oe_runmake -f Makefile
+    oe_runmake -f Makefile TIDL_ACC=${TIDL}
 }
 
 do_install() {
@@ -46,8 +50,9 @@ do_install() {
     install -m 0755 ${S}/tflite_classification ${D}${datadir}/tensorflow-lite/demos
     install -m 0755 ${S}/tflite_segmentation ${D}${datadir}/tensorflow-lite/demos
     install -m 0644 ${WORKDIR}/model/deeplabv3_257_mv_gpu.tflite ${D}${datadir}/tensorflow-lite/demos
+    install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224.tflite ${D}${datadir}/tensorflow-lite/demos
     install -m 0644 ${WORKDIR}/test_data/bird_segmentation.bmp ${D}${datadir}/tensorflow-lite/demos
-    install -m 0755 ${WORKDIR}/run*.sh ${D}${datadir}/tensorflow-lite/demos
+    install -m 0755 ${S}/scripts/run*.sh ${D}${datadir}/tensorflow-lite/demos
 }
 
 FILES_${PN} = "${datadir}/tensorflow-lite/demos"
Signature · 6 lines
2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
#2 lore raw
Quoted 138 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, March 2, 2020 1:58 PM
To: Gou, Hongmei
Cc: [email protected]
Subject: Re: [meta-arago] [zeus/master] [PATCH] tensorflow-lite-demo:
Bump SRCREV and add tidl offload support for AM5

Quoted 6 lines · Hongmei Gou

* Build the demos with tidl offload option for AM5
* Include mobilenet v1 model for demonstrating tidl offload
* Remove the demo scripts under the files directory. The scripts are now maintained in the source repo.
* Make adjustments with the updated Makefile

Quoted 7 lines
---
 .../files/run_classification.sh               |  7 -----
 .../tensorflow-lite/files/run_segmentation.sh |  8 ------
 .../tensorflow-lite-demo_git.bb               | 27 +++++++++++--------
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

Quoted 1 line
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

Review

Quoted 2 lines
(quoted diff) +0 -0

lite/files/run_classification.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_classification.sh

Quoted 3 lines

deleted file mode 100644
index b2ad7fc4..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_classification binary with the model, the input image, and the

label file specified.

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# Classification label is overlayed with the input image. Right click the

image display window to exit.

Review line 7

Quoted 1 line
(quoted diff) +0 -1
-./tflite_classification -m ../examples/mobilenet_v1_1.0_224_quant.tflite -i

../examples/grace_hopper.bmp -l ../examples/labels.txt

Review

Quoted 1 line
(quoted diff) +0 -0

lite/files/run_segmentation.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_segmentation.sh

Quoted 3 lines

deleted file mode 100644
index 5caea127..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_segmentation binary with the model and the input image

specified.

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# The display window shows the input(resized) image, segmentation map,

overlay

Review line 8

Quoted 2 lines
(quoted diff) +0 -2
-# of the former two. Right click the image display window to exit.
-./tflite_segmentation -m ./deeplabv3_257_mv_gpu.tflite -i

./bird_segmentation.bmp

Review

Quoted 1 line
(quoted diff) +0 -0

lite-demo_git.bb b/meta-arago-extras/recipes-support/tensorflow- lite/tensorflow-lite-demo_git.bb

Quoted 2 lines

index 9b99b63c..57d6ef20 100644
--- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-

demo_git.bb

Quoted 1 line

+++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-

demo_git.bb

Review line 1

Quoted 2 lines
(quoted diff) +0 -1
@@ -1,33 +1,33 @@
-DESCRIPTION = "Tensorflow Lite Demo with input and display via OpenCV

and TIDL acceleration for AM5"

Review line 1

Quoted 1 line
(quoted diff) +1 -0
+SUMMARY = "Tensorflow Lite Demo with input and display via OpenCV

and TIDL acceleration for AM5"

Review line 3

Quoted 2 lines
(quoted diff) +0 -0
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM =

"file://LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb

Quoted 13 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -1
 DEPENDS = "tensorflow-lite flatbuffers opencv"
+DEPENDS_append_dra7xx = " tidl-api"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PV = "01.00.00"
-PR = "r0"
+PR = "r1"
 
 BRANCH = "master"
 SRC_URI  = "git://git.ti.com/apps/tensorflow-lite-

examples.git;protocol=git;branch=${BRANCH} \

Quoted 1 line

http://storage.googleapis.com/download.tensorflow.org/models/tflite/gpu/
deeplabv3_257_mv_gpu.tflite;name=deeplabv3;subdir=${WORKDIR}/model ;destsuffix=model \

Quoted 1 line

- http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm entation;subdir=${WORKDIR}/test_data;destsuffix=test_data \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -2
-            file://run_classification.sh \
-            file://run_segmentation.sh"
+

http://storage.googleapis.com/download.tensorflow.org/models/mobilenet
_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenetv1;subdir=${W ORKDIR}/model;destsuffix=model \

Quoted 1 line

+ http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm entation;subdir=${WORKDIR}/test_data;destsuffix=test_data"

Quoted 3 lines

SRC_URI[deeplabv3.md5sum] = "4a24db5a5fb05c47586a1197765e8548" SRC_URI[deeplabv3.sha256sum] =

"68a539782c2c6a72f8aac3724600124a85ed977162b44e84cbae5db717c933c6"

Review

Quoted 2 lines
(quoted diff) +2 -0
+SRC_URI[mobilenetv1.md5sum] = "d5f69cef81ad8afb335d9727a17c462a"
+SRC_URI[mobilenetv1.sha256sum] =

"1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"

Quoted 1 line

SRC_URI[bird_segmentation.md5sum] =

"fc3202ac4e3033b36df3043de6dc32c9"

Quoted 1 line

SRC_URI[bird_segmentation.sha256sum] =

"e43cedd29ab385db787531c8a6cdcb31c5e4292af34f242877ed40611e502670"

Quoted 16 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -4
-SRCREV = "d84f1d43585c0db2fa6a1c15db9145ab53f859ce"
+SRCREV = "bd6a429c21f96d5112e0b6dea44a13b748eefd74"
 
 S = "${WORKDIR}/git"
 
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -I${STAGING_INCDIR}"
-LDFLAGS_append = " -L${STAGING_LIBDIR}"
-
 EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CXXFLAGS=${CXXFLAGS}' \
@@ -37,8 +37,12 @@ EXTRA_OEMAKE = "\
     'TARGET=${TARGET_OS}' \
     'TARGET_ARCH=${TARGET_ARCH}'"
 
Quoted 7 lines

Review EXTRA_OEMAKE = "\ · line 40

Quoted 1 line
(quoted diff) +1 -0
+EXTRA_OEMAKE += "SYSROOT_INCDIR="${STAGING_INCDIR}"

SYSROOT_LIBDIR="${STAGING_LIBDIR}" \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 43

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -0
+                 TIDL_API_DIR="${STAGING_DATADIR}/ti/tidl""
+
+TIDL_dra7xx = "yes"

Will TIDL be undefined for other platforms?

Yes, TIDL is undefined for other platforms.

Quoted 33 lines

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb do_install() { · line 50

Quoted 10 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -1
 do_compile() {
-    oe_runmake -f Makefile
+    oe_runmake -f Makefile TIDL_ACC=${TIDL}
 }
 
 do_install() {
@@ -46,8 +50,9 @@ do_install() {
     install -m 0755 ${S}/tflite_classification ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 51

Quoted 1 line
(quoted diff) +0 -0
     install -m 0755 ${S}/tflite_segmentation ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 52

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/model/deeplabv3_257_mv_gpu.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 53

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 54

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/test_data/bird_segmentation.bmp

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 50

Quoted 1 line
(quoted diff) +0 -1
-    install -m 0755 ${WORKDIR}/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 55

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0755 ${S}/scripts/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Quoted 10 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -1
 }
 
 FILES_${PN} = "${datadir}/tensorflow-lite/demos"
--

2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#3 lore raw
Quoted 140 lines · Hongmei
Quoted 140 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, March 2, 2020 1:58 PM
To: Gou, Hongmei
Cc: [email protected]
Subject: Re: [meta-arago] [zeus/master] [PATCH] tensorflow-lite-demo:
Bump SRCREV and add tidl offload support for AM5

Quoted 6 lines · Hongmei Gou

* Build the demos with tidl offload option for AM5
* Include mobilenet v1 model for demonstrating tidl offload
* Remove the demo scripts under the files directory. The scripts are now maintained in the source repo.
* Make adjustments with the updated Makefile

Quoted 7 lines
---
 .../files/run_classification.sh               |  7 -----
 .../tensorflow-lite/files/run_segmentation.sh |  8 ------
 .../tensorflow-lite-demo_git.bb               | 27 +++++++++++--------
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

Quoted 1 line
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

Review

Quoted 2 lines
(quoted diff) +0 -0

lite/files/run_classification.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_classification.sh

Quoted 3 lines

deleted file mode 100644
index b2ad7fc4..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_classification binary with the model, the input image, and the

label file specified.

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# Classification label is overlayed with the input image. Right click the

image display window to exit.

Review line 7

Quoted 1 line
(quoted diff) +0 -1
-./tflite_classification -m ../examples/mobilenet_v1_1.0_224_quant.tflite -i

../examples/grace_hopper.bmp -l ../examples/labels.txt

Review

Quoted 1 line
(quoted diff) +0 -0

lite/files/run_segmentation.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_segmentation.sh

Quoted 3 lines

deleted file mode 100644
index 5caea127..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_segmentation binary with the model and the input image

specified.

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# The display window shows the input(resized) image, segmentation map,

overlay

Review line 8

Quoted 2 lines
(quoted diff) +0 -2
-# of the former two. Right click the image display window to exit.
-./tflite_segmentation -m ./deeplabv3_257_mv_gpu.tflite -i

./bird_segmentation.bmp

Review

Quoted 1 line
(quoted diff) +0 -0

lite-demo_git.bb b/meta-arago-extras/recipes-support/tensorflow- lite/tensorflow-lite-demo_git.bb

Quoted 2 lines

index 9b99b63c..57d6ef20 100644
--- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-

demo_git.bb

Quoted 1 line

+++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-

demo_git.bb

Review line 1

Quoted 2 lines
(quoted diff) +0 -1
@@ -1,33 +1,33 @@
-DESCRIPTION = "Tensorflow Lite Demo with input and display via OpenCV

and TIDL acceleration for AM5"

Review line 1

Quoted 1 line
(quoted diff) +1 -0
+SUMMARY = "Tensorflow Lite Demo with input and display via OpenCV

and TIDL acceleration for AM5"

Review line 3

Quoted 2 lines
(quoted diff) +0 -0
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM =

"file://LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb

Quoted 13 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -1
 DEPENDS = "tensorflow-lite flatbuffers opencv"
+DEPENDS_append_dra7xx = " tidl-api"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PV = "01.00.00"
-PR = "r0"
+PR = "r1"
 
 BRANCH = "master"
 SRC_URI  = "git://git.ti.com/apps/tensorflow-lite-

examples.git;protocol=git;branch=${BRANCH} \

Quoted 1 line

http://storage.googleapis.com/download.tensorflow.org/models/tflite/gpu/
deeplabv3_257_mv_gpu.tflite;name=deeplabv3;subdir=${WORKDIR}/model ;destsuffix=model \

Quoted 1 line

- http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm entation;subdir=${WORKDIR}/test_data;destsuffix=test_data \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -2
-            file://run_classification.sh \
-            file://run_segmentation.sh"
+

http://storage.googleapis.com/download.tensorflow.org/models/mobilenet
_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenetv1;subdir=${W ORKDIR}/model;destsuffix=model \

Quoted 1 line

+ http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm entation;subdir=${WORKDIR}/test_data;destsuffix=test_data"

Quoted 3 lines

SRC_URI[deeplabv3.md5sum] = "4a24db5a5fb05c47586a1197765e8548" SRC_URI[deeplabv3.sha256sum] =

"68a539782c2c6a72f8aac3724600124a85ed977162b44e84cbae5db717c933c6"

Review

Quoted 2 lines
(quoted diff) +2 -0
+SRC_URI[mobilenetv1.md5sum] = "d5f69cef81ad8afb335d9727a17c462a"
+SRC_URI[mobilenetv1.sha256sum] =

"1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"

Quoted 1 line

SRC_URI[bird_segmentation.md5sum] =

"fc3202ac4e3033b36df3043de6dc32c9"

Quoted 1 line

SRC_URI[bird_segmentation.sha256sum] =

"e43cedd29ab385db787531c8a6cdcb31c5e4292af34f242877ed40611e502670"

Quoted 13 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -4
-SRCREV = "d84f1d43585c0db2fa6a1c15db9145ab53f859ce"
+SRCREV = "bd6a429c21f96d5112e0b6dea44a13b748eefd74"
 
 S = "${WORKDIR}/git"
 
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -I${STAGING_INCDIR}"
-LDFLAGS_append = " -L${STAGING_LIBDIR}"
-
 EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CXXFLAGS=${CXXFLAGS}' \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 40

Quoted 4 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -0
@@ -37,8 +37,12 @@ EXTRA_OEMAKE = "\
     'TARGET=${TARGET_OS}' \
     'TARGET_ARCH=${TARGET_ARCH}'"
 
+EXTRA_OEMAKE += "SYSROOT_INCDIR="${STAGING_INCDIR}"

SYSROOT_LIBDIR="${STAGING_LIBDIR}" \

Quoted 13 lines
Quoted 5 lines

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 43

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -0
+                 TIDL_API_DIR="${STAGING_DATADIR}/ti/tidl""
+
+TIDL_dra7xx = "yes"

Will TIDL be undefined for other platforms?

Yes, TIDL is undefined for other platforms.

Quoted 5 lines
Quoted 5 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -1
 do_compile() {
-    oe_runmake -f Makefile
+    oe_runmake -f Makefile TIDL_ACC=${TIDL}

This will result in passing undefined variable to Makefile here

Make you want to set it to "no" or empty "" for other platforms?

Quoted 28 lines
Quoted 28 lines

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb do_install() { · line 50

Quoted 5 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -0
 }
 
 do_install() {
@@ -46,8 +50,9 @@ do_install() {
     install -m 0755 ${S}/tflite_classification ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 51

Quoted 1 line
(quoted diff) +0 -0
     install -m 0755 ${S}/tflite_segmentation ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 52

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/model/deeplabv3_257_mv_gpu.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 53

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 54

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/test_data/bird_segmentation.bmp

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 50

Quoted 1 line
(quoted diff) +0 -1
-    install -m 0755 ${WORKDIR}/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 55

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0755 ${S}/scripts/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Quoted 10 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -1
 }
 
 FILES_${PN} = "${datadir}/tensorflow-lite/demos"
--

2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#4 lore raw
Quoted 179 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, March 2, 2020 2:40 PM
To: Gou, Hongmei
Cc: [email protected]
Subject: Re: [meta-arago] [zeus/master] [PATCH] tensorflow-lite-demo:
Bump SRCREV and add tidl offload support for AM5

Quoted 8 lines · Hongmei
Quoted 8 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, March 2, 2020 1:58 PM
To: Gou, Hongmei
Cc: [email protected]
Subject: Re: [meta-arago] [zeus/master] [PATCH] tensorflow-lite-demo:
Bump SRCREV and add tidl offload support for AM5

Quoted 4 lines
Quoted 4 lines · Hongmei Gou
Quoted 3 lines

* Build the demos with tidl offload option for AM5
* Include mobilenet v1 model for demonstrating tidl offload
* Remove the demo scripts under the files directory. The scripts are

now

Quoted 21 lines
Quoted 21 lines
Quoted 10 lines

maintained in the source repo.
* Make adjustments with the updated Makefile

---
 .../files/run_classification.sh               |  7 -----
 .../tensorflow-lite/files/run_segmentation.sh |  8 ------
 .../tensorflow-lite-demo_git.bb               | 27 +++++++++++--------
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

Quoted 1 line
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

Review

Quoted 2 lines
(quoted diff) +0 -0

lite/files/run_classification.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_classification.sh

Quoted 3 lines

deleted file mode 100644
index b2ad7fc4..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

Quoted 7 lines
Quoted 7 lines

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_classification binary with the model, the input image, and

the

Quoted 4 lines
Quoted 4 lines

label file specified.

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# Classification label is overlayed with the input image. Right click the

image display window to exit.

Quoted 1 line
(quoted diff) +0 -1
-./tflite_classification -m

../examples/mobilenet_v1_1.0_224_quant.tflite -i

Quoted 16 lines
Quoted 16 lines

../examples/grace_hopper.bmp -l ../examples/labels.txt

Review

Quoted 1 line
(quoted diff) +0 -0

lite/files/run_segmentation.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_segmentation.sh

Quoted 3 lines

deleted file mode 100644
index 5caea127..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_segmentation binary with the model and the input image

specified.

Quoted 1 line
Quoted 1 line

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# The display window shows the input(resized) image, segmentation

map,

Quoted 5 lines
Quoted 5 lines

overlay

Review line 8

Quoted 2 lines
(quoted diff) +0 -2
-# of the former two. Right click the image display window to exit.
-./tflite_segmentation -m ./deeplabv3_257_mv_gpu.tflite -i

./bird_segmentation.bmp

Review

Quoted 1 line
(quoted diff) +0 -0

lite/tensorflow-

Quoted 4 lines
Quoted 4 lines

lite-demo_git.bb b/meta-arago-extras/recipes-support/tensorflow- lite/tensorflow-lite-demo_git.bb

Quoted 2 lines

index 9b99b63c..57d6ef20 100644
--- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-

lite-

Quoted 2 lines
Quoted 2 lines

demo_git.bb

Quoted 1 line

+++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-

lite-

Quoted 3 lines
Quoted 3 lines

demo_git.bb

Review line 1

Quoted 2 lines
(quoted diff) +0 -1
@@ -1,33 +1,33 @@
-DESCRIPTION = "Tensorflow Lite Demo with input and display via

OpenCV

Quoted 2 lines
Quoted 2 lines

and TIDL acceleration for AM5"

Quoted 1 line
(quoted diff) +1 -0
+SUMMARY = "Tensorflow Lite Demo with input and display via

OpenCV

Quoted 15 lines
Quoted 15 lines

and TIDL acceleration for AM5"

Review line 3

Quoted 2 lines
(quoted diff) +0 -0
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM =

"file://LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"

Quoted 11 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -1
 DEPENDS = "tensorflow-lite flatbuffers opencv"
+DEPENDS_append_dra7xx = " tidl-api"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PV = "01.00.00"
-PR = "r0"
+PR = "r1"
 
Quoted 5 lines
Quoted 5 lines

Review line 14

Quoted 2 lines
(quoted diff) +0 -0
 BRANCH = "master"
 SRC_URI  = "git://git.ti.com/apps/tensorflow-lite-

examples.git;protocol=git;branch=${BRANCH} \

Quoted 1 line

http://storage.googleapis.com/download.tensorflow.org/models/tflite/gpu/

Quoted 1 line
Quoted 1 line

deeplabv3_257_mv_gpu.tflite;name=deeplabv3;subdir=${WORKDIR}/model

Quoted 3 lines
Quoted 3 lines

;destsuffix=model \

Quoted 1 line

- http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm

Quoted 5 lines
Quoted 5 lines

entation;subdir=${WORKDIR}/test_data;destsuffix=test_data \

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -2
-            file://run_classification.sh \
-            file://run_segmentation.sh"
+

http://storage.googleapis.com/download.tensorflow.org/models/mobilenet

Quoted 1 line
Quoted 1 line

_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenetv1;subdir=${W

Quoted 3 lines
Quoted 3 lines

ORKDIR}/model;destsuffix=model \

Quoted 1 line

+ http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm

Quoted 3 lines
Quoted 3 lines

entation;subdir=${WORKDIR}/test_data;destsuffix=test_data"

Quoted 2 lines

SRC_URI[deeplabv3.md5sum] =

"4a24db5a5fb05c47586a1197765e8548"

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

SRC_URI[deeplabv3.sha256sum] =

"68a539782c2c6a72f8aac3724600124a85ed977162b44e84cbae5db717c933c6"

Quoted 1 line
Quoted 1 line
Quoted 1 line

+SRC_URI[mobilenetv1.md5sum] =

"d5f69cef81ad8afb335d9727a17c462a"

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

+SRC_URI[mobilenetv1.sha256sum] =

"1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

SRC_URI[bird_segmentation.md5sum] =

"fc3202ac4e3033b36df3043de6dc32c9"

Quoted 1 line

SRC_URI[bird_segmentation.sha256sum] =

"e43cedd29ab385db787531c8a6cdcb31c5e4292af34f242877ed40611e502670"

Quoted 28 lines
Quoted 16 lines
Quoted 16 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -4
-SRCREV = "d84f1d43585c0db2fa6a1c15db9145ab53f859ce"
+SRCREV = "bd6a429c21f96d5112e0b6dea44a13b748eefd74"
 
 S = "${WORKDIR}/git"
 
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -I${STAGING_INCDIR}"
-LDFLAGS_append = " -L${STAGING_LIBDIR}"
-
 EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CXXFLAGS=${CXXFLAGS}' \
@@ -37,8 +37,12 @@ EXTRA_OEMAKE = "\
     'TARGET=${TARGET_OS}' \
     'TARGET_ARCH=${TARGET_ARCH}'"
 
Quoted 7 lines

Review EXTRA_OEMAKE = "\ · line 40

Quoted 1 line
(quoted diff) +1 -0
+EXTRA_OEMAKE += "SYSROOT_INCDIR="${STAGING_INCDIR}"

SYSROOT_LIBDIR="${STAGING_LIBDIR}" \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 43

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -0
+                 TIDL_API_DIR="${STAGING_DATADIR}/ti/tidl""
+
+TIDL_dra7xx = "yes"

Will TIDL be undefined for other platforms?

Yes, TIDL is undefined for other platforms.

Quoted 2 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 45

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -1
 do_compile() {
-    oe_runmake -f Makefile
+    oe_runmake -f Makefile TIDL_ACC=${TIDL}

This will result in passing undefined variable to Makefile here

Make you want to set it to "no" or empty "" for other platforms?

Just submitted a V2 patch to set TIDL to "no" for non-AM5 platforms. In Makefile, TIDL_ACC is set to "no" if it is undefined: "TIDL_ACC ?= no".

Quoted 30 lines
Quoted 30 lines
Quoted 30 lines

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb do_install() { · line 50

Quoted 7 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -0
 }
 
 do_install() {
@@ -46,8 +50,9 @@ do_install() {
     install -m 0755 ${S}/tflite_classification ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 51

Quoted 1 line
(quoted diff) +0 -0
     install -m 0755 ${S}/tflite_segmentation ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 52

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/model/deeplabv3_257_mv_gpu.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 53

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 54

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/test_data/bird_segmentation.bmp

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 50

Quoted 1 line
(quoted diff) +0 -1
-    install -m 0755 ${WORKDIR}/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 55

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0755 ${S}/scripts/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Quoted 10 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -1
 }
 
 FILES_${PN} = "${datadir}/tensorflow-lite/demos"
--

2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

#5 lore raw
Quoted 183 lines · Hongmei
Quoted 183 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, March 2, 2020 2:40 PM
To: Gou, Hongmei
Cc: [email protected]
Subject: Re: [meta-arago] [zeus/master] [PATCH] tensorflow-lite-demo:
Bump SRCREV and add tidl offload support for AM5

Quoted 8 lines · Hongmei
Quoted 8 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, March 2, 2020 1:58 PM
To: Gou, Hongmei
Cc: [email protected]
Subject: Re: [meta-arago] [zeus/master] [PATCH] tensorflow-lite-demo:
Bump SRCREV and add tidl offload support for AM5

Quoted 4 lines
Quoted 4 lines · Hongmei Gou
Quoted 3 lines

* Build the demos with tidl offload option for AM5
* Include mobilenet v1 model for demonstrating tidl offload
* Remove the demo scripts under the files directory. The scripts are

now

Quoted 21 lines
Quoted 21 lines
Quoted 10 lines

maintained in the source repo.
* Make adjustments with the updated Makefile

---
 .../files/run_classification.sh               |  7 -----
 .../tensorflow-lite/files/run_segmentation.sh |  8 ------
 .../tensorflow-lite-demo_git.bb               | 27 +++++++++++--------
 3 files changed, 16 insertions(+), 26 deletions(-)
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

Quoted 1 line
 delete mode 100644 meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

Review

Quoted 2 lines
(quoted diff) +0 -0

lite/files/run_classification.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_classification.sh

Quoted 3 lines

deleted file mode 100644
index b2ad7fc4..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_classification.sh

Quoted 7 lines
Quoted 7 lines

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_classification binary with the model, the input image, and

the

Quoted 4 lines
Quoted 4 lines

label file specified.

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# Classification label is overlayed with the input image. Right click the

image display window to exit.

Quoted 1 line
(quoted diff) +0 -1
-./tflite_classification -m

../examples/mobilenet_v1_1.0_224_quant.tflite -i

Quoted 16 lines
Quoted 16 lines

../examples/grace_hopper.bmp -l ../examples/labels.txt

Review

Quoted 1 line
(quoted diff) +0 -0

lite/files/run_segmentation.sh b/meta-arago-extras/recipes- support/tensorflow-lite/files/run_segmentation.sh

Quoted 3 lines

deleted file mode 100644
index 5caea127..00000000
--- a/meta-arago-extras/recipes-support/tensorflow-

lite/files/run_segmentation.sh

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh line 5

Quoted 7 lines

+++ /dev/null

meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh deleted +0 -5
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-cd /usr/share/tensorflow-lite/demos
-
-# Run tflite_segmentation binary with the model and the input image

specified.

Quoted 1 line
Quoted 1 line

Review line 6

Quoted 1 line
(quoted diff) +0 -1
-# The display window shows the input(resized) image, segmentation

map,

Quoted 5 lines
Quoted 5 lines

overlay

Review line 8

Quoted 2 lines
(quoted diff) +0 -2
-# of the former two. Right click the image display window to exit.
-./tflite_segmentation -m ./deeplabv3_257_mv_gpu.tflite -i

./bird_segmentation.bmp

Review

Quoted 1 line
(quoted diff) +0 -0

lite/tensorflow-

Quoted 4 lines
Quoted 4 lines

lite-demo_git.bb b/meta-arago-extras/recipes-support/tensorflow- lite/tensorflow-lite-demo_git.bb

Quoted 2 lines

index 9b99b63c..57d6ef20 100644
--- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-

lite-

Quoted 2 lines
Quoted 2 lines

demo_git.bb

Quoted 1 line

+++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-

lite-

Quoted 3 lines
Quoted 3 lines

demo_git.bb

Review line 1

Quoted 2 lines
(quoted diff) +0 -1
@@ -1,33 +1,33 @@
-DESCRIPTION = "Tensorflow Lite Demo with input and display via

OpenCV

Quoted 2 lines
Quoted 2 lines

and TIDL acceleration for AM5"

Quoted 1 line
(quoted diff) +1 -0
+SUMMARY = "Tensorflow Lite Demo with input and display via

OpenCV

Quoted 15 lines
Quoted 15 lines

and TIDL acceleration for AM5"

Review line 3

Quoted 2 lines
(quoted diff) +0 -0
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM =

"file://LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"

Quoted 11 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -1
 DEPENDS = "tensorflow-lite flatbuffers opencv"
+DEPENDS_append_dra7xx = " tidl-api"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 PV = "01.00.00"
-PR = "r0"
+PR = "r1"
 
Quoted 5 lines
Quoted 5 lines

Review line 14

Quoted 2 lines
(quoted diff) +0 -0
 BRANCH = "master"
 SRC_URI  = "git://git.ti.com/apps/tensorflow-lite-

examples.git;protocol=git;branch=${BRANCH} \

Quoted 1 line

http://storage.googleapis.com/download.tensorflow.org/models/tflite/gpu/

Quoted 1 line
Quoted 1 line

deeplabv3_257_mv_gpu.tflite;name=deeplabv3;subdir=${WORKDIR}/model

Quoted 3 lines
Quoted 3 lines

;destsuffix=model \

Quoted 1 line

- http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm

Quoted 5 lines
Quoted 5 lines

entation;subdir=${WORKDIR}/test_data;destsuffix=test_data \

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -2
-            file://run_classification.sh \
-            file://run_segmentation.sh"
+

http://storage.googleapis.com/download.tensorflow.org/models/mobilenet

Quoted 1 line
Quoted 1 line

_v1_2018_02_22/mobilenet_v1_1.0_224.tgz;name=mobilenetv1;subdir=${W

Quoted 3 lines
Quoted 3 lines

ORKDIR}/model;destsuffix=model \

Quoted 1 line

+ http://raw.githubusercontent.com/google-

coral/edgetpu/master/test_data/bird_segmentation.bmp;name=bird_segm

Quoted 3 lines
Quoted 3 lines

entation;subdir=${WORKDIR}/test_data;destsuffix=test_data"

Quoted 2 lines

SRC_URI[deeplabv3.md5sum] =

"4a24db5a5fb05c47586a1197765e8548"

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

SRC_URI[deeplabv3.sha256sum] =

"68a539782c2c6a72f8aac3724600124a85ed977162b44e84cbae5db717c933c6"

Quoted 1 line
Quoted 1 line
Quoted 1 line

+SRC_URI[mobilenetv1.md5sum] =

"d5f69cef81ad8afb335d9727a17c462a"

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

+SRC_URI[mobilenetv1.sha256sum] =

"1ccb74dbd9c5f7aea879120614e91617db9534bdfaa53dfea54b7c14162e126b"

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

SRC_URI[bird_segmentation.md5sum] =

"fc3202ac4e3033b36df3043de6dc32c9"

Quoted 1 line

SRC_URI[bird_segmentation.sha256sum] =

"e43cedd29ab385db787531c8a6cdcb31c5e4292af34f242877ed40611e502670"

Quoted 31 lines
Quoted 16 lines
Quoted 16 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -4
-SRCREV = "d84f1d43585c0db2fa6a1c15db9145ab53f859ce"
+SRCREV = "bd6a429c21f96d5112e0b6dea44a13b748eefd74"
 
 S = "${WORKDIR}/git"
 
-CXXFLAGS_append = " -O3 -DNDEBUG -fPIC -I${STAGING_INCDIR}"
-LDFLAGS_append = " -L${STAGING_LIBDIR}"
-
 EXTRA_OEMAKE = "\
     'CXX=${CXX}' \
     'CXXFLAGS=${CXXFLAGS}' \
@@ -37,8 +37,12 @@ EXTRA_OEMAKE = "\
     'TARGET=${TARGET_OS}' \
     'TARGET_ARCH=${TARGET_ARCH}'"
 
Quoted 7 lines

Review EXTRA_OEMAKE = "\ · line 40

Quoted 1 line
(quoted diff) +1 -0
+EXTRA_OEMAKE += "SYSROOT_INCDIR="${STAGING_INCDIR}"

SYSROOT_LIBDIR="${STAGING_LIBDIR}" \

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb EXTRA_OEMAKE = "\ · line 43

Quoted 3 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +3 -0
+                 TIDL_API_DIR="${STAGING_DATADIR}/ti/tidl""
+
+TIDL_dra7xx = "yes"

Will TIDL be undefined for other platforms?

Yes, TIDL is undefined for other platforms.

Quoted 5 lines
Quoted 5 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +1 -1
 do_compile() {
-    oe_runmake -f Makefile
+    oe_runmake -f Makefile TIDL_ACC=${TIDL}
Quoted 5 lines
Quoted 3 lines

This will result in passing undefined variable to Makefile here

Make you want to set it to "no" or empty "" for other platforms?

Just submitted a V2 patch to set TIDL to "no" for non-AM5 platforms.

Thanks.

Quoted 1 line

In Makefile, TIDL_ACC is set to "no" if it is undefined: "TIDL_ACC ?= no".

Yes, but above line will always redefine it to TIDL_ACC=${TIDL} and TIDL_ACC will never be "no" due to that, unless you set it in the recipe, like you did in v2.

Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines

meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb do_install() { · line 50

Quoted 5 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -0
 }
 
 do_install() {
@@ -46,8 +50,9 @@ do_install() {
     install -m 0755 ${S}/tflite_classification ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 51

Quoted 1 line
(quoted diff) +0 -0
     install -m 0755 ${S}/tflite_segmentation ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 52

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/model/deeplabv3_257_mv_gpu.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 53

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0644 ${WORKDIR}/model/mobilenet_v1_1.0_224.tflite

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 54

Quoted 1 line
(quoted diff) +0 -0
     install -m 0644 ${WORKDIR}/test_data/bird_segmentation.bmp

${D}${datadir}/tensorflow-lite/demos

Review do_install() { · line 50

Quoted 1 line
(quoted diff) +0 -1
-    install -m 0755 ${WORKDIR}/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Review do_install() { · line 55

Quoted 1 line
(quoted diff) +1 -0
+    install -m 0755 ${S}/scripts/run*.sh ${D}${datadir}/tensorflow-

lite/demos

Quoted 10 lines
meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb +0 -1
 }
 
 FILES_${PN} = "${datadir}/tensorflow-lite/demos"
--

2.17.1

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago