<?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:Random numbers in kernel scope. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301258#M31796</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved. If you need any additional information, please submit a new question as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 26 Jul 2021 09:17:57 GMT</pubDate>
    <dc:creator>MRajesh_intel</dc:creator>
    <dc:date>2021-07-26T09:17:57Z</dc:date>
    <item>
      <title>Random numbers in kernel scope.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1300021#M31777</link>
      <description>&lt;P&gt;Is there any way to initialize data to random values inside a kernel? I need all the values to be different, and since this is for porting a C++ application to DPC++ I am using USM on my data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a side note since I am new to DPC++. When I call a function from within a kernel it's executed on the device that kernel belongs to right?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 15:29:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1300021#M31777</guid>
      <dc:creator>Niko_</dc:creator>
      <dc:date>2021-07-20T15:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Random numbers in kernel scope.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1300275#M31779</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/172101"&gt;@Niko_&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a generation of random numbers inside of a kernel, there is a special device APIs: &lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/oneapi-mkl-dpcpp-developer-reference/top/random-number-generators/random-number-generators-device-routines/intel-onemkl-rng-device-usage-model.html" target="_self"&gt;https://software.intel.com/content/www/us/en/develop/documentation/oneapi-mkl-dpcpp-developer-reference/top/random-number-generators/random-number-generators-device-routines/intel-onemkl-rng-device-usage-model.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;These APIs produce scalar (similar to C++) or vector (by sycl::vec) output and you may store it in both USM or buffer-based memory or post-process it without saving it to global memory. You will need to add #include "oneapi/mkl/rng/device.hpp" only to use it, as it's header-based. Also, please, note, that you will need to add -fno-sycl-early-optimizations flag to your link line (it's a temporary known limitation, will be removed in future library releases).&lt;BR /&gt;&lt;BR /&gt;Yes, you are right, that all functions, which are called within a kernel are executed on the device that kernels belong to, that's why the definition of these functions should be available in the same translation unit or it should be marked as SYCL_EXTERNAL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please, fill free to ask any other RNG-related questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Alina&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 10:40:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1300275#M31779</guid>
      <dc:creator>Alina_E_Intel</dc:creator>
      <dc:date>2021-07-21T10:40:17Z</dc:date>
    </item>
    <item>
      <title>Re:Random numbers in kernel scope.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301203#M31789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Can you please let us know if your query has been resolved or not?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jul 2021 05:54:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301203#M31789</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-07-26T05:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Random numbers in kernel scope.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301236#M31791</link>
      <description>&lt;P&gt;Yes, I did manage to make it work that way. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 08:21:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301236#M31791</guid>
      <dc:creator>Niko_</dc:creator>
      <dc:date>2021-07-26T08:21:04Z</dc:date>
    </item>
    <item>
      <title>Re:Random numbers in kernel scope.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301258#M31796</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved. If you need any additional information, please submit a new question as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jul 2021 09:17:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Random-numbers-in-kernel-scope/m-p/1301258#M31796</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-07-26T09:17:57Z</dc:date>
    </item>
  </channel>
</rss>

