<?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: Using depends_on with events returned from different queues in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310831#M1524</link>
    <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Hi,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Thanks for reaching out to us.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;I&gt;&amp;gt;&amp;gt;"&lt;/I&gt;&lt;I&gt;&amp;nbsp;Using event.wait() works ok, but using depends_on(ev1, ...) statements, which are commented out in the example, fails to execute the associated kernels.&lt;/I&gt;&lt;I&gt;"&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Could you provide a screenshot or an error log if it is throwing an error? Because we didn't notice any error in the make log you provided.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;We see that you have used multiple queues in your attached code for ordering the tasks. But the DPC++ book provided an example with a single queue.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;We modified the "&lt;/SPAN&gt;&lt;SPAN style="font-family: intel-clear, tahoma, Helvetica, helvetica, Arial, sans-serif; font-size: 12px;"&gt;fig_3_11_depends_on.cpp&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;" code in which we used only a &lt;/SPAN&gt;&lt;STRONG style="font-size: 12px;"&gt;single&lt;/STRONG&gt;&lt;SPAN style="font-size: 12px;"&gt; queue to order the tasks using depends_on() and it works fine on Ubuntu 18.04 machine having Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0. Please find the sample code attached below.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;--&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Santosh &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Aug 2021 13:28:17 GMT</pubDate>
    <dc:creator>SantoshY_Intel</dc:creator>
    <dc:date>2021-08-30T13:28:17Z</dc:date>
    <item>
      <title>Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310387#M1523</link>
      <description>&lt;P&gt;dpc++ enables creating multiple queues on a device.&lt;/P&gt;
&lt;P&gt;dpc++ enables dependencies specified with depends_on(ev1,ev2,...)&lt;/P&gt;
&lt;P&gt;dpc++ compiler accepts depends_on with events returned by different queues, but apparently depends_on may not find the events.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm providing example code derived from the dpc++ book, modified to use different queues.&amp;nbsp; Using event.wait() works ok, but using depends_on(ev1, ...) statements, which are commented out in the example, fails to execute the associated kernels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using ubuntu 20.04 and the docker distribution&lt;/P&gt;
&lt;P&gt;root@4578405bdff6:/workspaces/data-parallel-CPP-main/build# dpcpp --version&lt;BR /&gt;Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)&lt;BR /&gt;Target: x86_64-unknown-linux-gnu&lt;BR /&gt;Thread model: posix&lt;BR /&gt;InstalledDir: /opt/intel/oneapi/compiler/2021.3.0/linux/bin&lt;BR /&gt;root@4578405bdff6:/workspaces/data-parallel-CPP-main/build#&lt;/P&gt;
&lt;P&gt;root@4578405bdff6:/workspaces/data-parallel-CPP-main/build# sycl-ls&lt;BR /&gt;0. ACC : Intel(R) FPGA Emulation Platform for OpenCL(TM) 1.2 [2021.12.6.0.19_160000]&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;CPU : Intel(R) OpenCL 2.1 [2021.12.6.0.19_160000]&lt;/LI&gt;
&lt;LI&gt;GPU : Intel(R) OpenCL HD Graphics 3.0 [21.23.20043]&lt;/LI&gt;
&lt;LI&gt;GPU : Intel(R) Level-Zero 1.1 [1.1.20043]&lt;/LI&gt;
&lt;LI&gt;HOST: SYCL host platform 1.2 [1.2]&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I'm using make and the cmake from the dpc++ book examples.&amp;nbsp; To build, I use:&lt;/P&gt;
&lt;P&gt;make fig_3_11_depends_on&lt;/P&gt;
&lt;P&gt;with the Makefile generated by cmake that comes with the book examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm substituting my modified fig_3_11 code for the books sample code from&lt;/P&gt;
&lt;P&gt;&lt;A title="Book Samples" href="https://github.com/Apress/data-parallel-CPP" target="_self"&gt;https://github.com/Apress/data-parallel-CPP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used cmake to create the makefile in a build directory with:&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #27292a; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;CXX=dpcpp cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-O0" -D NODPL=1 ../&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The build and link commands with VERBOSE=1 are&lt;/P&gt;
&lt;P&gt;[100%] Building CXX object samples/Ch03_data_management/CMakeFiles/fig_3_11_depends_on.dir/fig_3_11_depends_on.cpp.o&lt;BR /&gt;cd /workspaces/data-parallel-CPP-main/build/samples/Ch03_data_management &amp;amp;&amp;amp; /opt/intel/oneapi/compiler/2021.3.0/linux/bin/dpcpp -O0 -g -fsycl -fsycl-unnamed-lambda -ferror-limit=1 -Wall -Wpedantic -std=gnu++17 -MD -MT samples/Ch03_data_management/CMakeFiles/fig_3_11_depends_on.dir/fig_3_11_depends_on.cpp.o -MF CMakeFiles/fig_3_11_depends_on.dir/fig_3_11_depends_on.cpp.o.d -o CMakeFiles/fig_3_11_depends_on.dir/fig_3_11_depends_on.cpp.o -c /workspaces/data-parallel-CPP-main/samples/Ch03_data_management/fig_3_11_depends_on.cpp&lt;BR /&gt;[100%] Linking CXX executable fig_3_11_depends_on&lt;BR /&gt;cd /workspaces/data-parallel-CPP-main/build/samples/Ch03_data_management &amp;amp;&amp;amp; /usr/bin/cmake -E cmake_link_script CMakeFiles/fig_3_11_depends_on.dir/link.txt --verbose=1&lt;BR /&gt;/opt/intel/oneapi/compiler/2021.3.0/linux/bin/dpcpp -O0 -g CMakeFiles/fig_3_11_depends_on.dir/fig_3_11_depends_on.cpp.o -o fig_3_11_depends_on -lsycl -fsycl&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 17:05:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310387#M1523</guid>
      <dc:creator>JNorw</dc:creator>
      <dc:date>2021-08-27T17:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310831#M1524</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Hi,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Thanks for reaching out to us.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;I&gt;&amp;gt;&amp;gt;"&lt;/I&gt;&lt;I&gt;&amp;nbsp;Using event.wait() works ok, but using depends_on(ev1, ...) statements, which are commented out in the example, fails to execute the associated kernels.&lt;/I&gt;&lt;I&gt;"&lt;/I&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Could you provide a screenshot or an error log if it is throwing an error? Because we didn't notice any error in the make log you provided.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;We see that you have used multiple queues in your attached code for ordering the tasks. But the DPC++ book provided an example with a single queue.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;We modified the "&lt;/SPAN&gt;&lt;SPAN style="font-family: intel-clear, tahoma, Helvetica, helvetica, Arial, sans-serif; font-size: 12px;"&gt;fig_3_11_depends_on.cpp&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;" code in which we used only a &lt;/SPAN&gt;&lt;STRONG style="font-size: 12px;"&gt;single&lt;/STRONG&gt;&lt;SPAN style="font-size: 12px;"&gt; queue to order the tasks using depends_on() and it works fine on Ubuntu 18.04 machine having Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0. Please find the sample code attached below.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;--&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4"&gt;&lt;SPAN style="font-size: 12px;"&gt;Santosh &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 13:28:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310831#M1524</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-08-30T13:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310840#M1525</link>
      <description>&lt;P&gt;If you uncomment the depends_on(event,...) statements, the printed results should be the same, but instead there are zeros in the printed results, indicating the kernels are not executed.&amp;nbsp; The kernels are updating an all zeros array with non-zero values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example, with depends_on_commented out, output is non_zero&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fig_3_11_good.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/19081i569FE2E46F44390F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="fig_3_11_good.png" alt="fig_3_11_good.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;while, with the the single depends_on in Q2.submit uncommented, there are zeros in the output, indicating that that kernel did not execute.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fig_3_11_zeros.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/19082i25FEBCAE88ED640F/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="fig_3_11_zeros.png" alt="fig_3_11_zeros.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;The example in the book used a single queue, yes.&amp;nbsp; It did not give an example with multiple queues, but I see no documentation that events returned from a different queue are not able to be used in depends_on.&amp;nbsp;&amp;nbsp;&amp;nbsp; If they cannot be used, it needs to be documented and/or the compiler should assert if you attempt to use an event returned from an invalid queue.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 13:57:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1310840#M1525</guid>
      <dc:creator>JNorw</dc:creator>
      <dc:date>2021-08-30T13:57:14Z</dc:date>
    </item>
    <item>
      <title>Re:Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1311949#M1534</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 your issue internally and we 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;Santosh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Sep 2021 10:45:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1311949#M1534</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2021-09-03T10:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1311991#M1535</link>
      <description>&lt;P&gt;ok, thanks.&lt;/P&gt;
&lt;P&gt;I've modified the original problem code to check for each result value, mark the failed array values in the output and return 1 from main for failures.&amp;nbsp; I've uncommented a depends_on line that creates the failure in this modification.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 15:42:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1311991#M1535</guid>
      <dc:creator>JNorw</dc:creator>
      <dc:date>2021-09-03T15:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1312091#M1537</link>
      <description>&lt;P&gt;I've modified fig_7_8_accessors_simple example from the book to use multiple queues, handle.require() and accessors without any problems from multiple queues.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, use of buffers, accessors and handle.require() seem to be a work-around alternative if the multi-queue depends_on(event) issue isn't resolved.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 02:27:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1312091#M1537</guid>
      <dc:creator>JNorw</dc:creator>
      <dc:date>2021-09-04T02:27:38Z</dc:date>
    </item>
    <item>
      <title>Re:Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1312113#M1538</link>
      <description>&lt;P&gt;Your question has been escalated to the developers and will be taken care of internally. We will respond when we have update. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 04 Sep 2021 09:36:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1312113#M1538</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2021-09-04T09:36:26Z</dc:date>
    </item>
    <item>
      <title>Re:Using depends_on with events returned from different queues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1365126#M1919</link>
      <description>&lt;P&gt;The issue does not present in oneAPI Base Toolkit version 2022.1.0 with DPC++ compiler 2022.0.0. Please use this version to work on your programs. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Mar 2022 12:42:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-depends-on-with-events-returned-from-different-queues/m-p/1365126#M1919</guid>
      <dc:creator>Alex_Y_Intel</dc:creator>
      <dc:date>2022-03-02T12:42:33Z</dc:date>
    </item>
  </channel>
</rss>

