<?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:DPC++ program took more time compare to c? in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1401890#M2375</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We haven't heard back from you. Could you please provide the above-requested information?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hemanth.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 20 Jul 2022 11:38:48 GMT</pubDate>
    <dc:creator>HemanthCH_Intel</dc:creator>
    <dc:date>2022-07-20T11:38:48Z</dc:date>
    <item>
      <title>DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1397725#M2325</link>
      <description>&lt;P&gt;Hello sir im a beginner in data parallel C++ programming. i tried simple matrix multiplication program using DPC++ and calculating its time. it took around 0.2 sec in my linux system, and took around 0.075 sec in intel devcloud terminal. but same program in C it took around 0.0015 sec.&lt;/P&gt;
&lt;P&gt;My question is why DPC++ took more time compare to c?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 06:49:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1397725#M2325</guid>
      <dc:creator>Srikanth1911</dc:creator>
      <dc:date>2022-07-05T06:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1397730#M2326</link>
      <description>&lt;P&gt;here im attaching my files&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 07:04:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1397730#M2326</guid>
      <dc:creator>Srikanth1911</dc:creator>
      <dc:date>2022-07-05T07:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1398604#M2338</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you are using the malloc_device, we need to use the memcpy to copy the data&amp;nbsp;from the host to the device(which is not performed in your code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please provide the following details to investigate more on your issue?&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;C program which you are comparing with dpcpp?&lt;/LI&gt;
&lt;LI&gt;Steps to compile the C program?&lt;/LI&gt;
&lt;LI&gt;DPCPP version you are using?&lt;/LI&gt;
&lt;LI&gt;Share with us the log file by using the below command:&lt;/LI&gt;
&lt;/OL&gt;
&lt;LI-CODE lang="markup"&gt;SYCL_PI_TRACE=1 ./a.out&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Hemanth&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 11:40:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1398604#M2338</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-07-07T11:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1399281#M2345</link>
      <description>&lt;P&gt;Hello sir.,&lt;/P&gt;
&lt;P&gt;Here im attaching the required files you asked and made the correction you told... and it improve little bit in time it take 0.14sec&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Srikanth K&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 04:15:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1399281#M2345</guid>
      <dc:creator>Srikanth1911</dc:creator>
      <dc:date>2022-07-11T04:15:31Z</dc:date>
    </item>
    <item>
      <title>Re:DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1399998#M2358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In the above zip file, we can't find the updated dpcpp code. Could you please provide the updated dpcpp code?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hemanth&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Jul 2022 13:09:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1399998#M2358</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-07-13T13:09:26Z</dc:date>
    </item>
    <item>
      <title>Re:DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1401890#M2375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We haven't heard back from you. Could you please provide the above-requested information?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hemanth.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Jul 2022 11:38:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1401890#M2375</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-07-20T11:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re:DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1402969#M2384</link>
      <description>&lt;P&gt;Hello sir sorry for the late reply here im attaching the required file, in this program im using malloc share&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 04:54:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1402969#M2384</guid>
      <dc:creator>Srikanth1911</dc:creator>
      <dc:date>2022-07-25T04:54:13Z</dc:date>
    </item>
    <item>
      <title>Re:DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1404436#M2402</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are working on this internally and will get back to you soon.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Hemanth&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jul 2022 05:09:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1404436#M2402</guid>
      <dc:creator>HemanthCH_Intel</dc:creator>
      <dc:date>2022-07-29T05:09:00Z</dc:date>
    </item>
    <item>
      <title>Re:DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1406388#M2419</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I see that your workload is very small, for such small workload, it's generally not recommended to offload to GPU via SYCL. &lt;/P&gt;&lt;P&gt;As you can imagine, offloading will cause some amount of overhead, this include data transfer between host and device, and also some others.  &lt;/P&gt;&lt;P&gt;For small workload, the overhead may be too big to counteract the benefit of offloading.&lt;/P&gt;&lt;P&gt;I encourage you increase your matrix size to see the impact. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For your particular case, can you try the following option?  This option can remove the jitting overhead.&lt;/P&gt;&lt;P&gt;-fsycl-targets=spir64_gen -Xs "-device  ??? ".  Here, "???" is your device type. It could be "gen11", "gen12LP" etc.  &lt;/P&gt;&lt;P&gt;More information can be found in the section of "Use AOT for Intel Graphics (Intel GPU)". &lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;By using this command, I'm able to achieve similar timing between the SYCL code and native C implementation, &lt;/P&gt;&lt;P&gt;although more detailed profiling data shows that the kernel time only is much faster. &lt;/P&gt;&lt;P&gt;On a 11th Gen Intel(R) Core(TM) i7-1185G7, I get the following results.&lt;/P&gt;&lt;P&gt;Native C implementation:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://isvc.file.force.com/servlet/rtaImage?refid=0EM4U000002icwY" /&gt;&lt;/P&gt;&lt;P&gt;With the option above, the SYCL code outputs:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://isvc.file.force.com/servlet/rtaImage?refid=0EM4U000002icwi" /&gt;&lt;/P&gt;&lt;P&gt;And more detailed profiling data:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://isvc.file.force.com/servlet/rtaImage?refid=0EM4U000002icws" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The following command and link may help you figure out which Intel Graphics processor you're using. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: var(--lwc-colorBackgroundInput,rgb(255, 255, 255)); color: var(--lwc-colorTextWeak,rgb(68, 68, 68)); font-size: var(--lwc-fontSize3,0.8125rem); font-family: var(--lwc-fontFamily,-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;);"&gt;command: sycl-ls&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;link: &lt;A href="https://www.intel.com/content/www/us/en/developer/articles/guide/intel-graphics-developers-guides.htmlhttps://www.intel.com/content/www/us/en/developer/articles/guide/intel-graphics-developers-guides.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.intel.com/content/www/us/en/developer/articles/guide/intel-graphics-developers-guides.htmlhttps://www.intel.com/content/www/us/en/developer/articles/guide/intel-graphics-developers-guides.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Feb 2026 14:36:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1406388#M2419</guid>
      <dc:creator>yzh_intel</dc:creator>
      <dc:date>2026-02-18T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re:DPC++ program took more time compare to c?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1408855#M2440</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/242915"&gt;@Srikanth1911&lt;/a&gt;, have you got your questions answered ? &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Aug 2022 14:54:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/DPC-program-took-more-time-compare-to-c/m-p/1408855#M2440</guid>
      <dc:creator>yzh_intel</dc:creator>
      <dc:date>2022-08-17T14:54:55Z</dc:date>
    </item>
  </channel>
</rss>

