All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denys@ti.com>
To: Hongmei Gou <a0271529@ti.com>
Cc: meta-arago@arago-project.org
Subject: Re: [zeus/master] [PATCH] tensorflow-lite-demo: Bump SRCREV and add tidl offload support for AM5
Date: Mon, 2 Mar 2020 13:58:05 -0500	[thread overview]
Message-ID: <20200302185805.GQ2466@beryl> (raw)
In-Reply-To: <20200228225858.24538-1-a0271529@ti.com>

On Fri, Feb 28, 2020 at 05:58:58PM -0500, Hongmei Gou wrote:
> * 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
> 
> Signed-off-by: Hongmei Gou <a0271529@ti.com>
> ---
>  .../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
> 
> diff --git a/meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh b/meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh
> deleted file mode 100644
> index b2ad7fc4..00000000
> --- a/meta-arago-extras/recipes-support/tensorflow-lite/files/run_classification.sh
> +++ /dev/null
> @@ -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
> diff --git a/meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh b/meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh
> deleted file mode 100644
> index 5caea127..00000000
> --- a/meta-arago-extras/recipes-support/tensorflow-lite/files/run_segmentation.sh
> +++ /dev/null
> @@ -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
> diff --git a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb
> index 9b99b63c..57d6ef20 100644
> --- a/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb
> +++ b/meta-arago-extras/recipes-support/tensorflow-lite/tensorflow-lite-demo_git.bb
> @@ -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"

Will TIDL be undefined for other platforms?


>  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"
> -- 
> 2.17.1
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


  reply	other threads:[~2020-03-02 19:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 22:58 [zeus/master] [PATCH] tensorflow-lite-demo: Bump SRCREV and add tidl offload support for AM5 Hongmei Gou
2020-03-02 18:58 ` Denys Dmytriyenko [this message]
2020-03-02 19:37   ` Gou, Hongmei
2020-03-02 19:40     ` Denys Dmytriyenko
2020-03-02 20:25       ` Gou, Hongmei
2020-03-02 20:43         ` Denys Dmytriyenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200302185805.GQ2466@beryl \
    --to=denys@ti.com \
    --cc=a0271529@ti.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.