<?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 Using SVM for Intel Graphics Technology in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Using-SVM-for-Intel-Graphics-Technology/m-p/1075959#M59877</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm writing a benchmark to compare different technologies and their performance accross various platforms (on Linux). One of the platform is an Intel Broadwell-H&amp;nbsp; (Core i7-5775C with integrated GPU Iris Pro 6200), so I'm testing the various ways to offload a code on my GPU using Cilk Plus. Right now, I'm trying to use SVM so I followed &lt;A href="https://software.intel.com/en-us/node/684438"&gt;this tutorial&lt;/A&gt; but I'm facing some problems. Here's my code :&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;assert.h&amp;gt;
#include &amp;lt;cilk/cilk.h&amp;gt;
#include &amp;lt;gfx/gfx_rt.h&amp;gt;

#define SIZE 64

int main(){
  int * in = (int*)_GFX_svm_alloc(sizeof(int)*SIZE);

#pragma offload target(gfx)
  _Cilk_for (int i = 0; i &amp;lt; SIZE; i++){
    in&lt;I&gt; = 1;
  }

  for (int i = 0; i &amp;lt; SIZE; i++){
    assert(in&lt;I&gt; == 1);
  }

  _GFX_svm_free(in);
  return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;Then I compile with&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt; - $ icc -qoffload-svm test.c
test.c(12): error: *GFX* pointer variable "in" in this offload region must be specified in an in/out/inout/nocpy clause
  #pragma offload target(gfx)
  ^

compilation aborted for test.c (code 2)
&lt;/PRE&gt;

&lt;P&gt;I thought maybe SVM is not allowed on all patforms, so compiled with&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;- $ icc -qoffload-arch=broadwell -qoffload-svm test.c
- $ ./a.out
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
a.out test.c:18: main: Assertion 'in&lt;I&gt; == 1' failed.
Abandon (core dumped)
&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;So I guess specifying the platform helps to compile, but the execution failed.&lt;/P&gt;

&lt;P&gt;If I change the pragma adding inout(in : length(SIZE)), the compilation/execution works well with the first one, but with the second one we have the same execution problem. The point is : I don't want to add the inout clause, I shouldn't have to. I assume my compilation line is wrong but I can't say in which way.&lt;/P&gt;

&lt;P&gt;So my question is : do you see something wrong in my code/compilation ?&lt;/P&gt;

&lt;P&gt;Thanks a lot for your time,&lt;/P&gt;

&lt;P&gt;Mathieu&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2017 08:40:22 GMT</pubDate>
    <dc:creator>Mathieu_D</dc:creator>
    <dc:date>2017-04-06T08:40:22Z</dc:date>
    <item>
      <title>Using SVM for Intel Graphics Technology</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-SVM-for-Intel-Graphics-Technology/m-p/1075959#M59877</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm writing a benchmark to compare different technologies and their performance accross various platforms (on Linux). One of the platform is an Intel Broadwell-H&amp;nbsp; (Core i7-5775C with integrated GPU Iris Pro 6200), so I'm testing the various ways to offload a code on my GPU using Cilk Plus. Right now, I'm trying to use SVM so I followed &lt;A href="https://software.intel.com/en-us/node/684438"&gt;this tutorial&lt;/A&gt; but I'm facing some problems. Here's my code :&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;assert.h&amp;gt;
#include &amp;lt;cilk/cilk.h&amp;gt;
#include &amp;lt;gfx/gfx_rt.h&amp;gt;

#define SIZE 64

int main(){
  int * in = (int*)_GFX_svm_alloc(sizeof(int)*SIZE);

#pragma offload target(gfx)
  _Cilk_for (int i = 0; i &amp;lt; SIZE; i++){
    in&lt;I&gt; = 1;
  }

  for (int i = 0; i &amp;lt; SIZE; i++){
    assert(in&lt;I&gt; == 1);
  }

  _GFX_svm_free(in);
  return 0;
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;Then I compile with&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt; - $ icc -qoffload-svm test.c
test.c(12): error: *GFX* pointer variable "in" in this offload region must be specified in an in/out/inout/nocpy clause
  #pragma offload target(gfx)
  ^

compilation aborted for test.c (code 2)
&lt;/PRE&gt;

&lt;P&gt;I thought maybe SVM is not allowed on all patforms, so compiled with&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;- $ icc -qoffload-arch=broadwell -qoffload-svm test.c
- $ ./a.out
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
a.out test.c:18: main: Assertion 'in&lt;I&gt; == 1' failed.
Abandon (core dumped)
&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;So I guess specifying the platform helps to compile, but the execution failed.&lt;/P&gt;

&lt;P&gt;If I change the pragma adding inout(in : length(SIZE)), the compilation/execution works well with the first one, but with the second one we have the same execution problem. The point is : I don't want to add the inout clause, I shouldn't have to. I assume my compilation line is wrong but I can't say in which way.&lt;/P&gt;

&lt;P&gt;So my question is : do you see something wrong in my code/compilation ?&lt;/P&gt;

&lt;P&gt;Thanks a lot for your time,&lt;/P&gt;

&lt;P&gt;Mathieu&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 08:40:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-SVM-for-Intel-Graphics-Technology/m-p/1075959#M59877</guid>
      <dc:creator>Mathieu_D</dc:creator>
      <dc:date>2017-04-06T08:40:22Z</dc:date>
    </item>
    <item>
      <title>You're more likely to get a</title>
      <link>https://community.intel.com/t5/Software-Archive/Using-SVM-for-Intel-Graphics-Technology/m-p/1075960#M59878</link>
      <description>&lt;P&gt;You're more likely to get a response to questions about offloading to the GPU in the &lt;A href="https://software.intel.com/en-us/forums/intel-c-compiler"&gt;Intel C++ Compiler&lt;/A&gt; forum.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 12:27:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Using-SVM-for-Intel-Graphics-Technology/m-p/1075960#M59878</guid>
      <dc:creator>Barry_T_Intel</dc:creator>
      <dc:date>2017-04-06T12:27:06Z</dc:date>
    </item>
  </channel>
</rss>

