<?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:“compile_program_error”  when running a SYCL code on GPU in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1457436#M2831</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;After changing some project properties, the code can run on my GPU.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;I appreciate your help!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting the solution. This thread will no longer be monitored by Intel. If you have any other queries, please start a new thread.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a good day!&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;Varsha&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 20 Feb 2023 07:01:07 GMT</pubDate>
    <dc:creator>VarshaS_Intel</dc:creator>
    <dc:date>2023-02-20T07:01:07Z</dc:date>
    <item>
      <title>“compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1456075#M2818</link>
      <description>&lt;P&gt;Hello, I'm new to sycl. The following code is modified from an example in sycl specification&lt;/P&gt;
&lt;P&gt;The code can run on cpu, but when trying to run GPU (use "gpu_selector_v"), it shows run time error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;like&amp;nbsp;Unhandled exception at 0x00007FFC636B051C in XXXXX.exe: Microsoft C++ exception: sycl::_V1::compile_program_error at memory location 0x0000000B7D757A70.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use Visual Studio 2022 with Intel oneapi base toolkit (2023.0). GPU is Intel Arc A770.&lt;/P&gt;
&lt;P&gt;BTW, I do can run oneapi dpc++ example: "oneAPI-samples-2023.0.0\DirectProgramming\DPC++\CombinationalLogic\mandelbrot" on GPU.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&amp;nbsp;&lt;/P&gt;
&lt;P&gt;___________________&lt;/P&gt;
&lt;P&gt;const int N = 1024;&lt;BR /&gt;const int L = 256;&lt;/P&gt;
&lt;P&gt;sycl::buffer&amp;lt;int&amp;gt; valuesBuf(N);&lt;BR /&gt;{&lt;BR /&gt;sycl::host_accessor a(valuesBuf,sycl::write_only);&lt;BR /&gt;for (int i = 0; i &amp;lt; N; i++) {&lt;BR /&gt;a[i] = i;&lt;BR /&gt;}&lt;BR /&gt;//destruct host_accessor&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;int sumResult = 0;&lt;BR /&gt;sycl::buffer&amp;lt;int&amp;gt; sumBuf(&amp;amp;sumResult, 1);&lt;/P&gt;
&lt;P&gt;sycl::queue Q(sycl::gpu_selector_v);&lt;BR /&gt;Q.submit([&amp;amp;](sycl::handler&amp;amp; cgh) {&lt;/P&gt;
&lt;P&gt;auto inputValues = valuesBuf.get_access&amp;lt;sycl::access_mode::read&amp;gt;(cgh);&lt;BR /&gt;auto sumReduction = sycl::reduction(sumBuf, cgh, sycl::plus&amp;lt;&amp;gt;());&lt;/P&gt;
&lt;P&gt;cgh.parallel_for(sycl::nd_range&amp;lt;1&amp;gt; {N, L}, sumReduction,&lt;BR /&gt;[=](sycl::nd_item&amp;lt;1&amp;gt; it, auto&amp;amp; sum) {&lt;BR /&gt;sum += inputValues[it.get_global_id()];&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;int sum = numeric_limits&amp;lt;int&amp;gt;::max();&lt;BR /&gt;{&lt;BR /&gt;sycl::host_accessor sumBuf_hacc(sumBuf, sycl::read_only);&lt;BR /&gt;sum = sumBuf_hacc[0];&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;___________________________________________________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2023 07:22:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1456075#M2818</guid>
      <dc:creator>PC-1</dc:creator>
      <dc:date>2023-02-15T07:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: “compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1456520#M2820</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for posting in Intel Communities.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try following the below steps:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.Try changing your global and local range for example (N=512, L=512 or N=512, L=256).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your issue still persists, then please provide the below details:&lt;/P&gt;
&lt;P&gt;2. Could you please provide your OS and Hardware details&lt;/P&gt;
&lt;P&gt;3. Could you please add the below lines of code in the sample code of mandelbrot and provide us with the output/results of the sample mandelbrot code while running it on GPU(visual studio output)?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cout &amp;lt;&amp;lt; "Device max work group size: "    &amp;lt;&amp;lt;d.get_info&amp;lt;info::device::max_work_group_size&amp;gt;() &amp;lt;&amp;lt; "\n";
cout &amp;lt;&amp;lt; "Device max work item dimensions: " &amp;lt;&amp;lt;d.get_info&amp;lt;info::device::max_work_item_dimensions&amp;gt;() &amp;lt;&amp;lt; "\n";&lt;/LI-CODE&gt;
&lt;P&gt;4. And also, could you please let us know the Visual Studio 2022 version you are using? Please check the below link for the Visual Studio compatibility with Intel Compilers&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html" target="_blank" rel="noopener"&gt;https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Varsha&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 11:55:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1456520#M2820</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-02-16T11:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: “compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1457231#M2827</link>
      <description>&lt;P&gt;Thanks for your reply,&amp;nbsp;&lt;SPAN&gt;Varsha. It looks like not a max work group size issue. I compared a DPC++ project example provided by Visual Studio with&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;my SYCL project. After changing some project properties, the code can run on my GPU.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Anyway,&amp;nbsp; I appreciate your help!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PC&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 00:42:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1457231#M2827</guid>
      <dc:creator>PC-1</dc:creator>
      <dc:date>2023-02-19T00:42:18Z</dc:date>
    </item>
    <item>
      <title>Re:“compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1457436#M2831</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;After changing some project properties, the code can run on my GPU.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;I appreciate your help!&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting the solution. This thread will no longer be monitored by Intel. If you have any other queries, please start a new thread.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a good day!&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;Varsha&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 16px; font-family: intel-clear;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Feb 2023 07:01:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1457436#M2831</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2023-02-20T07:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: “compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1518950#M3248</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Sorry to bother you, but i have met a same problem with the same error.&lt;/P&gt;&lt;P&gt;Could you please tell me how to fix it?&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks &amp;amp; Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lzy&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 06:31:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1518950#M3248</guid>
      <dc:creator>lzy</dc:creator>
      <dc:date>2023-08-30T06:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: “compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1520013#M3260</link>
      <description>&lt;P&gt;Eventually I found that I made a stupid mistake. My GPU does not support "double" (FP64), so do not try to compile "double" on your GPU. Hope this could offer some help.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Sep 2023 01:44:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1520013#M3260</guid>
      <dc:creator>PC-1</dc:creator>
      <dc:date>2023-09-03T01:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: “compile_program_error”  when running a SYCL code on GPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1520172#M3261</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you very much for your response. This method has indeed successfully resolved my issue. I sincerely appreciate your assistance. Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best wishes.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 06:43:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/compile-program-error-when-running-a-SYCL-code-on-GPU/m-p/1520172#M3261</guid>
      <dc:creator>lzy</dc:creator>
      <dc:date>2023-09-04T06:43:25Z</dc:date>
    </item>
  </channel>
</rss>

