<?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: Compiler optimization - O2 leads problems on the execution on CPU in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Compiler-optimization-O2-leads-problems-on-the-execution-on-CPU/m-p/1617091#M3974</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Currently, 17.9.2 is the latest version supported for VS 2022&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jul 2024 17:37:18 GMT</pubDate>
    <dc:creator>Alex_Y_Intel</dc:creator>
    <dc:date>2024-07-22T17:37:18Z</dc:date>
    <item>
      <title>Compiler optimization - O2 leads problems on the execution on CPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Compiler-optimization-O2-leads-problems-on-the-execution-on-CPU/m-p/1616711#M3966</link>
      <description>&lt;P&gt;My working on projects are developed on Visual Studio 2022 laster version (17.10.4) and Intel DPC++ 2024.2. Recently I found that the debug build can run successfully on both CPU and GPU, however, the release build with -O2 optimization can ONLY run on GPU and is problematic on CPU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When runing on CPU, it seems that the program got stuck on the first queue parallel_for and the memory usage increases drastically without bound. I'm new to DPC++ programming. I'm just wondering if there is any hint that could help me fix this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to comment out the part of codes developed recently, and found that there is a line of code, by commenting it out the release build can run on CPU (but to have a correct result that line of code is needed). In fact, as long as that code appears, not even really executed ( I even tried to comment out the function calling that code), the release build fails on CPU. I guess it is related to reorders during -O2 optimization. Again I'm new to DPC++ programming and not very familiar with -O2 optimization processes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, the release build without -O2 is good. However,&amp;nbsp;I really need to use -O2 optimization to improve the performance of the code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My project contains 10k+lines of code with multiple parallel_for s, so it's not realistic to post it here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much!&lt;/P&gt;&lt;P&gt;PC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jul 2024 08:11:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Compiler-optimization-O2-leads-problems-on-the-execution-on-CPU/m-p/1616711#M3966</guid>
      <dc:creator>PC-1</dc:creator>
      <dc:date>2024-07-21T08:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler optimization - O2 leads problems on the execution on CPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Compiler-optimization-O2-leads-problems-on-the-execution-on-CPU/m-p/1617091#M3974</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Currently, 17.9.2 is the latest version supported for VS 2022&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2024 17:37:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Compiler-optimization-O2-leads-problems-on-the-execution-on-CPU/m-p/1617091#M3974</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2024-07-22T17:37:18Z</dc:date>
    </item>
  </channel>
</rss>

