<?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 Hello!  in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167200#M270</link>
    <description>&lt;P&gt;Hello!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to change from unorm_int8 format to fp32, fp16 or unsigned_int32 and i still get crashes on the provided piece of code.&lt;BR /&gt;Also changing to argb channel ordering with unorm_int8 or fp32 format did crash also:&lt;/P&gt;&lt;P&gt;Running on Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz&lt;BR /&gt;terminate called after throwing an instance of 'cl::sycl::runtime_error'&lt;BR /&gt;&amp;nbsp; what():&amp;nbsp; OpenCL API failed. OpenCL API returns: -50 (CL_INVALID_ARG_VALUE) -50 (CL_INVALID_ARG_VALUE)&lt;BR /&gt;Aborted (core dumped)&lt;/P&gt;&lt;P&gt;Running on Intel(R) Gen9 HD Graphics NEO&lt;BR /&gt;terminate called after throwing an instance of 'cl::sycl::runtime_error'&lt;BR /&gt;&amp;nbsp; what():&amp;nbsp; OpenCL API failed. OpenCL API returns: -50 (CL_INVALID_ARG_VALUE) -50 (CL_INVALID_ARG_VALUE)&lt;BR /&gt;Aborted (core dumped)&lt;/P&gt;&lt;P&gt;EDIT: it seems that it crashes on the destructor of the sycl::image&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2020 10:43:00 GMT</pubDate>
    <dc:creator>Ouzounoudis__George</dc:creator>
    <dc:date>2020-01-10T10:43:00Z</dc:date>
    <item>
      <title>Core dump with writable 2d image accessor</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167197#M267</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;When running the following code i get core dumps.&lt;BR /&gt;It fails with either&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;a cpu selector: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz&lt;/LI&gt;&lt;LI&gt;or gpu selector: Intel(R) Gen9 HD Graphics NEO&lt;/LI&gt;&lt;/UL&gt;
&lt;PRE class="brush:cpp; class-name:dark; wrap-lines:false;"&gt;int main()
{
    const int nx = 1024;
    const int ny = 1024;

    sycl::default_selector device_selector;

    sycl::queue queue(device_selector);
    {
        const auto &amp;amp;device = queue.get_device();
        std::cout &amp;lt;&amp;lt; "Running on " &amp;lt;&amp;lt; device.get_info&amp;lt;sycl::info::device::name&amp;gt;() &amp;lt;&amp;lt; std::endl;
    }

    sycl::image&amp;lt;2&amp;gt; img(sycl::image_channel_order::rgba, sycl::image_channel_type::unorm_int8, sycl::range&amp;lt;2&amp;gt;(nx, ny));

    queue.submit([&amp;amp;](sycl::handler &amp;amp;cgh) {
        auto img_acc = img.get_access&amp;lt;sycl::float4, sycl::access::mode::write&amp;gt;(cgh);
        sycl::nd_range&amp;lt;2&amp;gt; nd_range(sycl::range&amp;lt;2&amp;gt;(nx, ny), sycl::range&amp;lt;2&amp;gt;(16, 16));
        cgh.parallel_for&amp;lt;class sample&amp;gt;(nd_range, [=](sycl::nd_item&amp;lt;2&amp;gt; i) {
            sycl::id&amp;lt;2&amp;gt; index = i.get_global_id();
            sycl::float4 color (0.5f, 0.5f, 0.2f, 1.0f);
            img_acc.write(sycl::int2(index[0], index[1]), color);
        });
    });
    return 0;
}
&lt;/PRE&gt;

&lt;P&gt;I would appreciate any insight on this. Thanks&lt;/P&gt;
&lt;P&gt;I run this on:&lt;BR /&gt;OS: Ubuntu 19.10&lt;BR /&gt;CPU: Intel core i7 6700K&lt;BR /&gt;GPU: Nvidia RTX 2070&lt;BR /&gt;package: intel-basekit/all,now 2021.1-85.beta03&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 12:09:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167197#M267</guid>
      <dc:creator>Ouzounoudis__George</dc:creator>
      <dc:date>2020-01-07T12:09:02Z</dc:date>
    </item>
    <item>
      <title>i can think of two issues in</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167198#M268</link>
      <description>&lt;P&gt;i can think of two issues in your code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. the "sycl::image_channel_order::rgba" and&amp;nbsp;"sycl::image_channel_type::unorm_int8" is not compatible, use fp16, fp32 or int32 or change channel_order to be "argb".&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. it is SYCL spec. bug that no query API for image format defined. So your provided image format is neither supported by Gen9 nor i7 CPU. And current Beta03 does not support Nvidia GPU.&lt;/P&gt;&lt;P&gt;So you have to convert your image data first to those ordinary format that supported by Intel devices, and compute on that image format, and then convert them back, if needed.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 04:38:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167198#M268</guid>
      <dc:creator>Jie_L_Intel</dc:creator>
      <dc:date>2020-01-08T04:38:06Z</dc:date>
    </item>
    <item>
      <title>Hi George,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167199#M269</link>
      <description>&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;Kindly let us know if the solution provided above has worked for you.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 10:23:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167199#M269</guid>
      <dc:creator>RahulV_intel</dc:creator>
      <dc:date>2020-01-10T10:23:20Z</dc:date>
    </item>
    <item>
      <title>Hello! </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167200#M270</link>
      <description>&lt;P&gt;Hello!&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to change from unorm_int8 format to fp32, fp16 or unsigned_int32 and i still get crashes on the provided piece of code.&lt;BR /&gt;Also changing to argb channel ordering with unorm_int8 or fp32 format did crash also:&lt;/P&gt;&lt;P&gt;Running on Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz&lt;BR /&gt;terminate called after throwing an instance of 'cl::sycl::runtime_error'&lt;BR /&gt;&amp;nbsp; what():&amp;nbsp; OpenCL API failed. OpenCL API returns: -50 (CL_INVALID_ARG_VALUE) -50 (CL_INVALID_ARG_VALUE)&lt;BR /&gt;Aborted (core dumped)&lt;/P&gt;&lt;P&gt;Running on Intel(R) Gen9 HD Graphics NEO&lt;BR /&gt;terminate called after throwing an instance of 'cl::sycl::runtime_error'&lt;BR /&gt;&amp;nbsp; what():&amp;nbsp; OpenCL API failed. OpenCL API returns: -50 (CL_INVALID_ARG_VALUE) -50 (CL_INVALID_ARG_VALUE)&lt;BR /&gt;Aborted (core dumped)&lt;/P&gt;&lt;P&gt;EDIT: it seems that it crashes on the destructor of the sycl::image&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 10:43:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167200#M270</guid>
      <dc:creator>Ouzounoudis__George</dc:creator>
      <dc:date>2020-01-10T10:43:00Z</dc:date>
    </item>
    <item>
      <title>current Beta03 DPC++ runtime</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167201#M271</link>
      <description>&lt;P&gt;current Beta03 DPC++ runtime looks like not able to construct an image without a host pointer initialization. To work-around, add a "set_final_data()" explicitly after the image constructor. i tried with below code of rgba and fp32, no OpenCL error reported.&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
using namespace cl;

int main() {

  int nx = 1024;
  int ny = 1024;

  sycl::image&amp;lt;2&amp;gt; img(sycl::image_channel_order::rgba, sycl::image_channel_type::fp32, sycl::range&amp;lt;2&amp;gt;(nx, ny));
  img.set_final_data();

  sycl::queue myQueue;

    myQueue.submit([&amp;amp;](sycl::handler &amp;amp;cgh) {

        auto img_acc = img.get_access&amp;lt;sycl::float4, sycl::access::mode::write&amp;gt;(cgh);

        sycl::nd_range&amp;lt;2&amp;gt; nd_range(sycl::range&amp;lt;2&amp;gt;(nx, ny), sycl::range&amp;lt;2&amp;gt;(16, 16));

        cgh.parallel_for&amp;lt;class sample&amp;gt;(nd_range, [=](sycl::nd_item&amp;lt;2&amp;gt; i) {

            sycl::id&amp;lt;2&amp;gt; index = i.get_global_id();

            sycl::float4 color (0.5f, 0.5f, 0.2f, 1.0f);

            img_acc.write(sycl::int2(index[0], index[1]), color);

        });

    });

  return 0;
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2020 01:22:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167201#M271</guid>
      <dc:creator>Jie_L_Intel</dc:creator>
      <dc:date>2020-01-12T01:22:03Z</dc:date>
    </item>
    <item>
      <title>Thanks, it now seems to work</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167202#M272</link>
      <description>&lt;P&gt;Thanks, it now seems to work for unorm_int8 and rgba.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jan 2020 18:03:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167202#M272</guid>
      <dc:creator>Ouzounoudis__George</dc:creator>
      <dc:date>2020-01-12T18:03:31Z</dc:date>
    </item>
    <item>
      <title>George,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167203#M273</link>
      <description>&lt;P&gt;George,&lt;/P&gt;&lt;P&gt;Glad to know that your issue got resolved. We are closing this thread.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 07:07:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Core-dump-with-writable-2d-image-accessor/m-p/1167203#M273</guid>
      <dc:creator>RahulV_intel</dc:creator>
      <dc:date>2020-01-13T07:07:44Z</dc:date>
    </item>
  </channel>
</rss>

