<?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>topic Re: Batch size and inference time on NPU in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1946004#M227959</link>
    <description>&lt;P&gt;Thanks for the quick reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure I fully understand your answer. So, if it takes 23 ms to process a single image (using a batch size of 1), you would expect that a batch of 6 images takes approximately 23 ms x 6&amp;nbsp; (or 138 ms) to process. Is this right?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 07:31:34 GMT</pubDate>
    <dc:creator>kevin_allen</dc:creator>
    <dc:date>2024-09-03T07:31:34Z</dc:date>
    <item>
      <title>Batch size and inference time on NPU</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1945424#M227914</link>
      <description>&lt;P&gt;Hello there,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am using a board from the company PhyTec that is equipped with the I.MX 8M Plus chip and NPU.&amp;nbsp; I am using a TensorFlow Lite model with a ResNet50 architecture to perform classification. The model in quantized (8-bit unit) to run on the NPU. The inference time for a single image of shape 224x224x3 is approximately 23 ms. When I try to increase the batch size, the inference time is approximately equal to 23*batchSize.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I wonder whether this is normal. On larger desktop GPUs, processing a small batch of images (e.g., 16) usually takes less time than the inference time for a single image multiplied by the batch size. On the NPU of the I.MX 8M Plus chip, I don't see such a gain. Should a faster inference time be expected from processing images with a batch size larger than one?&lt;BR /&gt;&lt;BR /&gt;Any feedback will be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 10:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1945424#M227914</guid>
      <dc:creator>kevin_allen</dc:creator>
      <dc:date>2024-09-02T10:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Batch size and inference time on NPU</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1945550#M227930</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes it is expected but not on 23*batchsized is like 10*batchsize depend of the size.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 14:53:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1945550#M227930</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2024-09-02T14:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Batch size and inference time on NPU</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1946004#M227959</link>
      <description>&lt;P&gt;Thanks for the quick reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure I fully understand your answer. So, if it takes 23 ms to process a single image (using a batch size of 1), you would expect that a batch of 6 images takes approximately 23 ms x 6&amp;nbsp; (or 138 ms) to process. Is this right?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 07:31:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Batch-size-and-inference-time-on-NPU/m-p/1946004#M227959</guid>
      <dc:creator>kevin_allen</dc:creator>
      <dc:date>2024-09-03T07:31:34Z</dc:date>
    </item>
  </channel>
</rss>

