<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: How GPU to accelerate tensorflow lite mode computing in i.MX 8M nano</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1204479#M166982</link>
    <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Zhiming&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;for&amp;nbsp;your reply . We are following the user guide which you supplied . But the result is also not good .&lt;/P&gt;&lt;P&gt;We use the new BSP 5.4.47 with the I.MX8M nano DDR4 EVK&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@imx8mnevk:/usr/bin/tensorflow-lite-2.2.0/examples# ./label_image -m mobilenet_v1_1.0_224_quant.tflite -i grace_hopper.bmp -l labels.txt -a 0&lt;BR /&gt;Loaded model mobilenet_v1_1.0_224_quant.tflite&lt;BR /&gt;resolved reporter&lt;BR /&gt;invoked&lt;BR /&gt;average time: 48.01 ms&lt;BR /&gt;0.780392: 653 military uniform&lt;BR /&gt;0.105882: 907 Windsor tie&lt;BR /&gt;0.0156863: 458 bow tie&lt;BR /&gt;0.0117647: 466 bulletproof vest&lt;BR /&gt;0.00784314: 835 suit&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@imx8mnevk:/usr/bin/tensorflow-lite-2.2.0/examples# ./label_image -m mobilenet_v1_1.0_224_quant.tflite -i grace_hopper.bmp -l labels.txt -a 1&lt;BR /&gt;Loaded model mobilenet_v1_1.0_224_quant.tflite&lt;BR /&gt;resolved reporter&lt;BR /&gt;INFO: Created TensorFlow Lite delegate for NNAPI.&lt;BR /&gt;Applied NNAPI delegate.&lt;BR /&gt;&lt;STRONG&gt;W [query_hardware_caps:66]Unsupported evis version&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;invoked&lt;/STRONG&gt;&lt;BR /&gt;average time: 441.539 ms&lt;BR /&gt;0.784314: 653 military uniform&lt;BR /&gt;0.105882: 907 Windsor tie&lt;BR /&gt;0.0156863: 458 bow tie&lt;BR /&gt;0.00784314: 466 bulletproof vest&lt;BR /&gt;0.00392157: 835 suit&lt;/P&gt;&lt;P&gt;When i enable the GPU accelerate , we can get one error message&amp;nbsp;&lt;STRONG&gt;W [query_hardware_caps:66]Unsupported evis version&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;invoked.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Dec 2020 07:58:21 GMT</pubDate>
    <dc:creator>Arrow_AE_KingLiu</dc:creator>
    <dc:date>2020-12-28T07:58:21Z</dc:date>
    <item>
      <title>How GPU to accelerate tensorflow lite mode computing in i.MX 8M nano</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1202157#M166765</link>
      <description>&lt;P&gt;Dear All&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now we are trying to enable the GPU accelerate the tflite computing on the I.MX8M nano board , but the performance is not as expectation, &amp;nbsp;I summarized the tflite performance on i.MX8 nano board.&lt;/P&gt;&lt;P&gt;Test result based on running the label_image sample code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the FW built by Arrow (L5.4.3-1.0.0, tflite ver = 1.13.2), the sample program gave the same result whenever GPU acceleration is enabled (~80ms). As you mentioned the tflite didn't compiled with GPU acceleration, this result should be the expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the latest stock FW from NXP (L5.4.47-2.2.0, tflite ver = 2.2.0), the performance was worsened if NNAPI (GPU acceleration) is enabled. (48ms vs 400ms)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In summary, with CPU mode, tflite ran faster on ver2.2 than on ver1.13. The GPU gave negative performance gain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached text file is the detailed log. Can you help to give some &amp;nbsp;comments, thank&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just find some information about the accelerate of tensor flow lite model , maybe you can test it the second time.&lt;/P&gt;&lt;P class="xmsonormal"&gt;&lt;SPAN&gt;The first iteration of model inference using the NN API always takes many times longer,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="xmsonormal"&gt;&lt;SPAN&gt;because of model graph initialization needed by the GPU module. The iterations&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="xmsonormal"&gt;&lt;SPAN&gt;following the graph initialization will be performed many times faster.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="国华刘_0-1608517973486.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/133153iD0584655C337A63A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="国华刘_0-1608517973486.png" alt="国华刘_0-1608517973486.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I have&amp;nbsp; already excluded this factor.&lt;/P&gt;&lt;P&gt;In fact, this initialization takes around 4 seconds.&lt;/P&gt;&lt;P&gt;Please refer to the case 3 in my log.&lt;/P&gt;&lt;P&gt;That test case uses python sample code which shows the warm-up time and inference time separately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 02:51:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1202157#M166765</guid>
      <dc:creator>Arrow_AE_KingLiu</dc:creator>
      <dc:date>2020-12-21T02:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: How GPU to accelerate tensorflow lite mode computing in i.MX 8M nano</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1202387#M166787</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The attached file explain how it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Zhiming&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 09:05:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1202387#M166787</guid>
      <dc:creator>Zhiming_Liu</dc:creator>
      <dc:date>2020-12-21T09:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: How GPU to accelerate tensorflow lite mode computing in i.MX 8M nano</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1204479#M166982</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN&gt;Zhiming&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;for&amp;nbsp;your reply . We are following the user guide which you supplied . But the result is also not good .&lt;/P&gt;&lt;P&gt;We use the new BSP 5.4.47 with the I.MX8M nano DDR4 EVK&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@imx8mnevk:/usr/bin/tensorflow-lite-2.2.0/examples# ./label_image -m mobilenet_v1_1.0_224_quant.tflite -i grace_hopper.bmp -l labels.txt -a 0&lt;BR /&gt;Loaded model mobilenet_v1_1.0_224_quant.tflite&lt;BR /&gt;resolved reporter&lt;BR /&gt;invoked&lt;BR /&gt;average time: 48.01 ms&lt;BR /&gt;0.780392: 653 military uniform&lt;BR /&gt;0.105882: 907 Windsor tie&lt;BR /&gt;0.0156863: 458 bow tie&lt;BR /&gt;0.0117647: 466 bulletproof vest&lt;BR /&gt;0.00784314: 835 suit&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root@imx8mnevk:/usr/bin/tensorflow-lite-2.2.0/examples# ./label_image -m mobilenet_v1_1.0_224_quant.tflite -i grace_hopper.bmp -l labels.txt -a 1&lt;BR /&gt;Loaded model mobilenet_v1_1.0_224_quant.tflite&lt;BR /&gt;resolved reporter&lt;BR /&gt;INFO: Created TensorFlow Lite delegate for NNAPI.&lt;BR /&gt;Applied NNAPI delegate.&lt;BR /&gt;&lt;STRONG&gt;W [query_hardware_caps:66]Unsupported evis version&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;invoked&lt;/STRONG&gt;&lt;BR /&gt;average time: 441.539 ms&lt;BR /&gt;0.784314: 653 military uniform&lt;BR /&gt;0.105882: 907 Windsor tie&lt;BR /&gt;0.0156863: 458 bow tie&lt;BR /&gt;0.00784314: 466 bulletproof vest&lt;BR /&gt;0.00392157: 835 suit&lt;/P&gt;&lt;P&gt;When i enable the GPU accelerate , we can get one error message&amp;nbsp;&lt;STRONG&gt;W [query_hardware_caps:66]Unsupported evis version&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;invoked.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 07:58:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-GPU-to-accelerate-tensorflow-lite-mode-computing-in-i-MX-8M/m-p/1204479#M166982</guid>
      <dc:creator>Arrow_AE_KingLiu</dc:creator>
      <dc:date>2020-12-28T07:58:21Z</dc:date>
    </item>
  </channel>
</rss>

