<?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:Problem about image(as a buffer) size and media_block_load/store in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1384844#M2161</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We haven't heard back from you. Could you please provide an update on your issue?&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;Noorjahan.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 17 May 2022 10:51:32 GMT</pubDate>
    <dc:creator>NoorjahanSk_Intel</dc:creator>
    <dc:date>2022-05-17T10:51:32Z</dc:date>
    <item>
      <title>Problem about image(as a buffer) size and media_block_load/store</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1382635#M2111</link>
      <description>&lt;P&gt;Hello,intel engineers.&lt;/P&gt;
&lt;P&gt;Recently I met a problem about image size.As you will see in image below,I wrote a simple code for you to understand my problem.when SIZE=64,128 even 2048,it works well.As the size gets larger, problems arise.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tanzl_ustc_0-1652022935841.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/29232iB8B5C213CE2B6DBA/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="tanzl_ustc_0-1652022935841.png" alt="tanzl_ustc_0-1652022935841.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I was wondering if it is due to the size limitation of image.Could you please give me some possible reasons of this problem,thanks~.I have attach this code(acc_test.cpp) in my zip file.&lt;/P&gt;
&lt;P&gt;Besides,I really need a very large image because recently I am rewriting a CM kernel code(gemm_genx.cpp,attached in the zip file) to its DPC++ ESIMD version.The CM kernel code is about large-scale gemm.At first I wrote a code(gemm_genx_dpcpp.cpp in attached zip file) using share_pointer to transport data between host and device,but I found that the algorithm requires 2D read/write.However media_block_load&amp;nbsp; and media_block_store requires accessor instead of pointer,so I chose to use block_load/store.Through coordinate conversion, one-dimensional reading replaces two-dimensional reading.After testing, the DPC++ code performance is very poor.After that I used vtune to get an analysis of the DPC++ code, and I found that heavy address computation and memory access operation could be the bottleneck of my DPC++ code.Now I have to use media_block_load and media_block_store.Could you please tell me how to properly use media_block_load/store,thank you very much!&lt;/P&gt;</description>
      <pubDate>Sun, 08 May 2022 16:00:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1382635#M2111</guid>
      <dc:creator>tanzl_ustc</dc:creator>
      <dc:date>2022-05-08T16:00:35Z</dc:date>
    </item>
    <item>
      <title>回复： Problem about image(as a buffer) size and media_block_load/store</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1382636#M2112</link>
      <description>&lt;P&gt;Besides,I have tried to write a code using buffer/accessor to transport data between host and device.I have already found that the problem of my new code could be the size of image I mentioned above.I was wondering if you could take a look on my code to see if there are some other problems exist.I really lack experience in using media_block_load/store, and it is difficult to find suitable examples to learn on the Internet.Thank you very much,the file has already been attached.&lt;/P&gt;</description>
      <pubDate>Sun, 08 May 2022 16:37:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1382636#M2112</guid>
      <dc:creator>tanzl_ustc</dc:creator>
      <dc:date>2022-05-08T16:37:43Z</dc:date>
    </item>
    <item>
      <title>回复： Problem about image(as a buffer) size and media_block_load/store</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1382639#M2113</link>
      <description>&lt;P&gt;Some codes are generated from my code generator so the variable name seems to be meaningless, please take gemm_genx_dpcpp.cpp as a reference,thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 08 May 2022 16:42:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1382639#M2113</guid>
      <dc:creator>tanzl_ustc</dc:creator>
      <dc:date>2022-05-08T16:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem about image(as a buffer) size and media_block_load/store</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1383142#M2119</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;Could you please give me some possible reasons of this problem?&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;If you change your code to below code then it will work without any errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;CL/sycl.hpp&amp;gt;
#include&amp;lt;iostream&amp;gt;
using namespace sycl;
using namespace std;
const long int SIZE = 2048*(2048/4);
int main() {    
  sycl::float4 *b = new sycl::float4[SIZE];
  for (int i = 0; i&amp;lt;SIZE; ++i) {
    b[i] = (float)-i;
  }
  {
    image&amp;lt;2&amp;gt;  b_device(b,image_channel_order::rgba,
                       image_channel_type::fp32, range&amp;lt;2&amp;gt;(2048, 512));
  }
  delete[] b;
  return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use the initial code then you can increase the stack size using the below command and can run your program without any errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;ulimit -s 65536 &lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here, we increase the stack size to 64MB as the default stack size is limited by 10MB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;I used vtune to get an analysis of the DPC++ code&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please let us know how did you analyze the performance of the dpc++ code(steps if any)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;&amp;gt;&amp;gt;the DPC++ code performance is very poor&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;Could you please let us know on what factors you are stating that dpc++ performance is poor?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please provide us with the command that you have used to run the CM kernel code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Noorjahan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 11:38:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1383142#M2119</guid>
      <dc:creator>NoorjahanSk_Intel</dc:creator>
      <dc:date>2022-05-10T11:38:12Z</dc:date>
    </item>
    <item>
      <title>Re:Problem about image(as a buffer) size and media_block_load/store</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1384844#M2161</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We haven't heard back from you. Could you please provide an update on your issue?&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;Noorjahan.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 May 2022 10:51:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1384844#M2161</guid>
      <dc:creator>NoorjahanSk_Intel</dc:creator>
      <dc:date>2022-05-17T10:51:32Z</dc:date>
    </item>
    <item>
      <title>Re:Problem about image(as a buffer) size and media_block_load/store</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1386949#M2197</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you, so we will close this inquiry now. If you need further assistance, please post a new question.&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;Noorjahan.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 May 2022 11:01:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Problem-about-image-as-a-buffer-size-and-media-block-load-store/m-p/1386949#M2197</guid>
      <dc:creator>NoorjahanSk_Intel</dc:creator>
      <dc:date>2022-05-24T11:01:16Z</dc:date>
    </item>
  </channel>
</rss>

