<?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 Hi Kamil, in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158422#M183</link>
    <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Glad to hear that your issue got&amp;nbsp;resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are closing this thread.&lt;/P&gt;&lt;P&gt;Feel free to raise a new thread in case of any further support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2020 05:55:18 GMT</pubDate>
    <dc:creator>GouthamK_Intel</dc:creator>
    <dc:date>2020-05-04T05:55:18Z</dc:date>
    <item>
      <title>Error -50 (CL_INVALID_ARG_VALUE) for Intel iGPU</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158406#M167</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;I have a problem with execution of the following code:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:; class-name:dark;"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;array&amp;gt;
#include &amp;lt;cstdio&amp;gt;
using namespace std;
using namespace cl::sycl;

#define SIZE 20

struct DeviceData
{
    queue q;
    
    int* A;
    int* d_A;
    
    void init()
    {
        q = queue(gpu_selector{});
        
        A = (int* )malloc(sizeof(int)*SIZE);
        for(int i=0; i&amp;lt;SIZE; ++i)
            A&lt;I&gt; = i+1;

        d_A = (int *)malloc_device(sizeof(int)*SIZE, q.get_device(), q.get_context());
    }
     
    void test()
    {
        cout &amp;lt;&amp;lt; "Before" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
        {
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        }
        cout &amp;lt;&amp;lt; "\n";
   
        q.submit([&amp;amp;](handler &amp;amp;h){
            h.memcpy(d_A, A, sizeof(int)*SIZE);
        });
        q.wait();

        q.submit([&amp;amp;](handler &amp;amp;h){
            h.parallel_for(range&amp;lt;1&amp;gt;{SIZE}, [=](id&amp;lt;1&amp;gt; i){
                d_A&lt;I&gt; += 10;
            });
        });
        q.wait();
       
        q.submit([&amp;amp;](handler &amp;amp;h){
            h.memcpy(A, d_A, sizeof(int)*SIZE);
        });
        q.wait();
        
        cout &amp;lt;&amp;lt; "After" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        cout &amp;lt;&amp;lt; "\n";
    }
&amp;nbsp;   void free()
&amp;nbsp;   {
&amp;nbsp;      free(A);
&amp;nbsp;      free(d_A, q.get_context());
    }
};

int main()
{
    DeviceData dev;
    dev.init();
    dev.test(); 
&amp;nbsp;   dev.free();
    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;The above code works well for CPU (when using cpu_selector{}), while it fails for GPU. I obtain the error:&amp;nbsp;&lt;EM&gt;OpenCL API failed. OpenCL API returns: -50 (CL_INVALID_ARG_VALUE) -50 (CL_INVALID_ARG_VALUE). &lt;/EM&gt;The problem occurs during execution of the kernel within &lt;EM&gt;test()&lt;/EM&gt; function. This code is used to present the problem. I am working with more complex application which is implemented in the presented manner (using structures).&amp;nbsp;The code is executed on Intel DevCloud.&lt;/P&gt;
&lt;P&gt;I will be grateful for any advice.&lt;BR /&gt;Thanks :)&lt;/P&gt;</description>
      <pubDate>Wed, 08 Apr 2020 21:08:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158406#M167</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-04-08T21:08:45Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158407#M168</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us!&lt;/P&gt;&lt;P&gt;Could you please attach the error logs or screenshots of the output for&amp;nbsp;the above code after running on devcloud&amp;nbsp;and also mention the node name on which you are running. So that we would be able to investigate more on your issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide the logs for both the cases after running your code with&amp;nbsp;cpu_selector and gpu_selector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Goutham.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 11:11:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158407#M168</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-09T11:11:00Z</dc:date>
    </item>
    <item>
      <title>Output for cpu_seletor:  </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158408#M169</link>
      <description>&lt;P&gt;Output for &lt;STRONG&gt;cpu_seletor&lt;/STRONG&gt;:&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:; class-name:dark;"&gt;./main.exe
Before
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
After
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
&lt;/PRE&gt;

&lt;P&gt;Output for &lt;STRONG&gt;gpu_selector&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;./main.exe
Before
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
terminate called after throwing an instance of 'cl::sycl::runtime_error'
  what():  OpenCL API failed. OpenCL API returns: -50 (CL_INVALID_ARG_VALUE) -50 (CL_INVALID_ARG_VALUE)
Aborted
&lt;/PRE&gt;

&lt;P&gt;Node name:&lt;STRONG&gt;&amp;nbsp;s001-n160&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks for help!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 13:43:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158408#M169</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-04-09T13:43:00Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158409#M170</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;We are able to reproduce the error which you are facing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the below workaround for your code.&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;array&amp;gt;
#include &amp;lt;cstdio&amp;gt;
using namespace std;
using namespace cl::sycl;

#define SIZE 20

struct DeviceData
{
    queue q;
    
    int* A;
    int* d_A;

    void init(int* A,int* d_A,queue q)
    {
        q = queue(gpu_selector{});
        
//        A = (int* )malloc(sizeof(int)*SIZE);
        for(int i=0; i&amp;lt;SIZE; ++i)
            A&lt;I&gt; = i+1;

  //      d_A = (int *)malloc_device(sizeof(int)*SIZE, q.get_device(), q.get_context());
    }
     
    void test(int* A,int* d_A,queue q)
    {
        cout &amp;lt;&amp;lt; "Before" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
        {
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        }
        cout &amp;lt;&amp;lt; "\n";
   
        q.submit([&amp;amp;](handler &amp;amp;h){
            h.memcpy(d_A, A, sizeof(int)*SIZE);
        });
        q.wait();

        q.submit([&amp;amp;](handler &amp;amp;h){
            h.parallel_for(range&amp;lt;1&amp;gt;{SIZE}, [=](id&amp;lt;1&amp;gt; i){
                d_A&lt;I&gt; += 10;
            });
        });
        q.wait();
       
        q.submit([&amp;amp;](handler &amp;amp;h){
            h.memcpy(A, d_A, sizeof(int)*SIZE);
        });
        q.wait();
        
        cout &amp;lt;&amp;lt; "After" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        cout &amp;lt;&amp;lt; "\n";
    }
    void free(int* A,int* d_A,queue q)
    {
       std::free(A);
       cl::sycl::free(d_A, q.get_context());
    }
};


int main()
{
    DeviceData dev;
    dev.d_A=(int *)malloc_device(sizeof(int)*SIZE, dev.q.get_device(), dev.q.get_context());
    
    dev.A=(int* )malloc(sizeof(int)*SIZE);
    dev.init(dev.A,dev.d_A,dev.q);
    dev.test(dev.A,dev.d_A,dev.q); 
    dev.free(dev.A,dev.d_A,dev.q);
    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let us know if this resolves your issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 11:17:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158409#M170</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-13T11:17:17Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158410#M171</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Could you please let us know if your issue is resolved or if you are facing any issues with the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 05:30:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158410#M171</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-16T05:30:13Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158411#M172</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am apologize for delay - spring holiday.&amp;nbsp;Yes, the code provided by you works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I have a question.&amp;nbsp;Why my code does not work properly? I don't know if I am right, but is seems that the queue should be created within the same instruction block next to kernel and buffers.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Kamil&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 17:46:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158411#M172</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-04-16T17:46:59Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158412#M173</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;We are investigating more about your issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are working with the concerned team and&amp;nbsp;we will get back to you with more information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 06:28:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158412#M173</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-22T06:28:52Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158413#M174</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i am waiting for more information :)&amp;nbsp;Thanks you for helping me solve the problem :)&lt;/P&gt;&lt;P&gt;Best regards&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 08:00:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158413#M174</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-04-22T08:00:51Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158414#M175</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;In your program, d_A is a device pointer. When accessing the class member data within the class member functions, the "this" pointer is passed implicitly and that is used to access the object members. So in this case, since d_A is a class member, any reference to d_A inside the class member function will be resolved as this-&amp;gt;d_A. The caveat is, "this" pointer points to the memory where the class object is located and this class object is created on CPU memory. Hence when we try to use d_A inside a DPC++ kernel which is supposed to run inside a GPU, the expression "this-&amp;gt;d_A" is invalid since "this" is invalid pointer from GPU side. The same code works on the CPU side since "this" pointer is valid pointer when the code executes on CPU. Below is a way to work around this issue by capturing the "this-&amp;gt;d_A - device pointer" in a local variable in the kernel function (also I have modified the code to introduce newer syntax for USM which decreases the code verbosity):&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;array&amp;gt;
#include &amp;lt;cstdio&amp;gt;
using namespace std;
using namespace cl::sycl;

#define SIZE 20

struct DeviceData
{
    queue q;

    int* A;
    int* d_A;

    void init()
    {
        q = queue(gpu_selector{});

        A = (int* )malloc(sizeof(int)*SIZE);
        for(int i=0; i&amp;lt;SIZE; ++i)
            A&lt;I&gt; = i+1;

        d_A = (int *)malloc_device(sizeof(int)*SIZE, q.get_device(), q.get_context());
    }

    void test()
    {
        cout &amp;lt;&amp;lt; "Before" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
        {
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        }
        cout &amp;lt;&amp;lt; "\n";

        q.memcpy(d_A, A, sizeof(int)*SIZE);
        q.parallel_for(range&amp;lt;1&amp;gt;{SIZE}, [=,d_A_local=this-&amp;gt;d_A](id&amp;lt;1&amp;gt; i){
                d_A_local&lt;I&gt; += 10;
        });
        q.memcpy(A, d_A, sizeof(int)*SIZE).wait();

        cout &amp;lt;&amp;lt; "After" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        cout &amp;lt;&amp;lt; "\n";
    }
    void free()
    {
            std::free(A);
            sycl::free(d_A, q.get_context());
    }
};

int main()
{
    DeviceData dev;
    dev.init();
    dev.test();
    dev.free();
    return 0;
}
&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 12:02:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158414#M175</guid>
      <dc:creator>Anoop_M_Intel</dc:creator>
      <dc:date>2020-04-22T12:02:00Z</dc:date>
    </item>
    <item>
      <title>Hi Anoop,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158415#M176</link>
      <description>&lt;P&gt;Hi Anoop,&lt;/P&gt;&lt;P&gt;Thanks for providing a detailed explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Please let us know if the information provided is helpful.&lt;/P&gt;&lt;P&gt;Confirm if your issue is resolved and let us know whether we can close this&amp;nbsp;thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 07:09:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158415#M176</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-23T07:09:27Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158416#M177</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Please confirm if&amp;nbsp;the explanation provided helped.&lt;/P&gt;&lt;P&gt;Let us know if we can close this thread.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 06:03:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158416#M177</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-28T06:03:45Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158417#M178</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;yes, this advice resolve my problem completely.&lt;/P&gt;&lt;P&gt;I have another question, but I don't want to create new topic. I have a problem with math functions like cos(), sin() etc.&amp;nbsp;on the iGPU&amp;nbsp; side.&amp;nbsp;When I am trying use them within the kernel I obtain the error: undefined reference to `cos()'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 08:14:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158417#M178</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-04-28T08:14:09Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158418#M179</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;We are glad to know that the solution provided resolved your issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure, we will help you with your other issue. Please provide your&amp;nbsp;code if you can. So that it will help us to&amp;nbsp;investigate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 10:05:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158418#M179</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-28T10:05:09Z</dc:date>
    </item>
    <item>
      <title>I modified code presented in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158419#M180</link>
      <description>&lt;P&gt;I modified code presented in this topic to show the problem:&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;array&amp;gt;
#include &amp;lt;cstdio&amp;gt;
#include &amp;lt;cmath&amp;gt;
using std::cout;
using std::endl;
using namespace cl::sycl;

#define SIZE 20

struct DeviceData
{
    queue q;

    double* A;
    double* d_A;

    void init()
    {
        q = queue(gpu_selector{});

        A = (double* )malloc(sizeof(double)*SIZE);
        for(int i=0; i&amp;lt;SIZE; ++i)
            A&lt;I&gt; = i+1;

        d_A = (double *)malloc_device(sizeof(double)*SIZE, q.get_device(), q.get_context());
    }

    void test()
    {
        cout &amp;lt;&amp;lt; "Before" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
        {
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        }
        cout &amp;lt;&amp;lt; "\n";

        q.memcpy(d_A, A, sizeof(double)*SIZE);
        q.parallel_for(range&amp;lt;1&amp;gt;{SIZE}, [=,d_A_local=this-&amp;gt;d_A](id&amp;lt;1&amp;gt; i){
                d_A_local&lt;I&gt; = cos(i+1);
        });
        q.memcpy(A, d_A, sizeof(double)*SIZE).wait();

        cout &amp;lt;&amp;lt; "After" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        cout &amp;lt;&amp;lt; "\n";
    }
    void free()
    {
            std::free(A);
            sycl::free(d_A, q.get_context());
    }
};

int main()
{
    DeviceData dev;
    dev.init();
    dev.test();
    dev.free();
    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;Output:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:bash; class-name:dark;"&gt;./main.exe
Before
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
terminate called after throwing an instance of 'cl::sycl::compile_program_error'
  what():  The program was built for 1 devices
Build program log for 'Intel(R) Gen9 HD Graphics NEO':

error: undefined reference to `cos()'

error: backend compiler failed build.
 0 (CL_SUCCESS)
Makefile:43: recipe for target 'run' failed
make: *** [run] Aborted
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 10:49:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158419#M180</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-04-28T10:49:43Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158420#M181</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Please find the attached code which will resolve the issue. As per the SYCL standard, the built-in functions (sin(),cos()..etc)&amp;nbsp;can take as input float or optionally double.&amp;nbsp;&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;array&amp;gt;
#include &amp;lt;cstdio&amp;gt;
#include &amp;lt;cmath&amp;gt;
using std::cout;
using std::endl;
using namespace cl::sycl;

#define SIZE 20

struct DeviceData
{
    queue q;

    double* A;
    double* d_A;

    void init()
    {
        q = queue(gpu_selector{});

        A = (double* )malloc(sizeof(double)*SIZE);
        for(int i=0; i&amp;lt;SIZE; ++i)
            A&lt;I&gt; = i+1;

        d_A = (double *)malloc_device(sizeof(double)*SIZE, q.get_device(), q.get_context());
    }

    void test()
    {
        cout &amp;lt;&amp;lt; "Before" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
        {
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        }
        cout &amp;lt;&amp;lt; "\n";

        q.memcpy(d_A, A, sizeof(double)*SIZE);
        q.parallel_for(range&amp;lt;1&amp;gt;{SIZE}, [=,d_A_local=this-&amp;gt;d_A](id&amp;lt;1&amp;gt; i){
                d_A_local&lt;I&gt; = cl::sycl::cos((float)i+1); // cos() takes input as float datatype
        });
        q.memcpy(A, d_A, sizeof(double)*SIZE).wait();

        cout &amp;lt;&amp;lt; "After" &amp;lt;&amp;lt; "\n";
        for(int i=0; i&amp;lt;SIZE; ++i)
            cout &amp;lt;&amp;lt; A&lt;I&gt; &amp;lt;&amp;lt; " ";
        cout &amp;lt;&amp;lt; "\n";
    }
    void free()
    {
            std::free(A);
            sycl::free(d_A, q.get_context());
    }
};

int main()
{
    DeviceData dev;
    dev.init();
    dev.test();
    dev.free();
    return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please confirm if this resolves the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 12:06:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158420#M181</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-04-29T12:06:32Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158421#M182</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;yes, it works fine. Thanks for help :)&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 14:47:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158421#M182</guid>
      <dc:creator>H__Kamil</dc:creator>
      <dc:date>2020-05-01T14:47:41Z</dc:date>
    </item>
    <item>
      <title>Hi Kamil,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158422#M183</link>
      <description>&lt;P&gt;Hi Kamil,&lt;/P&gt;&lt;P&gt;Glad to hear that your issue got&amp;nbsp;resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are closing this thread.&lt;/P&gt;&lt;P&gt;Feel free to raise a new thread in case of any further support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Goutham&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 05:55:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Error-50-CL-INVALID-ARG-VALUE-for-Intel-iGPU/m-p/1158422#M183</guid>
      <dc:creator>GouthamK_Intel</dc:creator>
      <dc:date>2020-05-04T05:55:18Z</dc:date>
    </item>
  </channel>
</rss>

