<?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: Re:Intel MKL (VSL) Correlation 2d error in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280175#M31301</link>
    <description>yes and thanks for your responses. (I did mark your post as solution I thought that closes it.)</description>
    <pubDate>Mon, 10 May 2021 07:42:46 GMT</pubDate>
    <dc:creator>imanh</dc:creator>
    <dc:date>2021-05-10T07:42:46Z</dc:date>
    <item>
      <title>Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1276803#M31249</link>
      <description>&lt;P&gt;I'm trying to do a 2D correlation, I get VSL_CC_ERROR_YSHAPE, or&amp;nbsp;VSL_CC_ERROR_DECIMATION for any combination of possible code! I saw an example here:&amp;nbsp;community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/2D-convolution-using-VSL-Conv/m-p/1007237#M18992 (even the same exact example throws decimation error for me), and here is my code:&lt;/P&gt;
&lt;P&gt;"""&lt;/P&gt;
&lt;P&gt;MKL_INT xshape[2] = { 128,128 }, yshape[2] = { 3,3 }, zshape[2] = { xshape[0]+yshape[0]-1,xshape[1]+yshape[1]-1 };&lt;/P&gt;
&lt;P&gt;status = vslsCorrNewTask(&amp;amp;task, mode, rank, xshape, yshape, zshape);&lt;BR /&gt;if (status != VSL_STATUS_OK) {&lt;BR /&gt;printf("ERROR: creation of job failed, exit with %d\n", status);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;status = vslsCorrExec(task, x, NULL, y, NULL, z, NULL);&lt;BR /&gt;if (status != VSL_STATUS_OK) {&lt;BR /&gt;printf("ERROR: job status bad, exit with %d\n", status);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;"""&lt;BR /&gt;I tried setting&amp;nbsp;vslConvSetStart (set start to [0,0]) -&amp;gt; didnt work&lt;BR /&gt;tried setting all the strides to: [1,1] or to [Xshape[1],1] for X \in {x,y,z}&lt;BR /&gt;Any combination of the above doesn't work as well.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 23:33:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1276803#M31249</guid>
      <dc:creator>imanh</dc:creator>
      <dc:date>2021-04-26T23:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1276973#M31253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code ran successfully on our end. I used the command: icpc -mkl example.cpp to compile. I am using oneAPI 2021.2 version . Can you please specify your compiler, OS, oneAPI version, so we can reproduce from our end ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And also here is the sample I tried:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;assert.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include "mkl.h"

int main()
{
    VSLConvTaskPtr task;
    
    MKL_INT f_shape[] = { 128, 128};
    MKL_INT g_shape[] = { 3, 3 };
    MKL_INT Rmin[] = { 0, 0 };
    MKL_INT Rmax[] = { f_shape[0] + g_shape[0] - 1, f_shape[1] + g_shape[1] - 1 };
    MKL_INT h_shape[] = { Rmax[0], Rmax[1] };
    MKL_INT h_start[] = { 0, 0 };


    MKL_INT f_stride[] = { f_shape[1], 1 };
    MKL_INT g_stride[] = { g_shape[1], 1 };
    MKL_INT h_stride[] = { h_shape[1], 1 };
    
    double *f = new double[ f_stride[0] * f_shape[0] ];
    double *g = new double[ g_stride[0] * g_shape[0] ];
    double *h = new double[ h_stride[0] * h_shape[0] ];

    for(int i=0; i &amp;lt; f_shape[0]; ++i)
        for(int j=0; j &amp;lt; f_shape[1]; ++j)
            f[ i * f_stride[0] + j ] = 1;

    for(int i=0; i &amp;lt; g_shape[0]; ++i)
        for(int j=0; j &amp;lt; g_shape[1]; ++j)
            g[ i * g_stride[0] + j ] = 1;

    memset( h, 0, sizeof(h[0]) * h_stride[0] * h_shape[0] );

    int status;
    status = vsldConvNewTask( &amp;amp;task, VSL_CONV_MODE_AUTO, 2, f_shape, g_shape, h_shape );
    assert(status == VSL_STATUS_OK);

    status = vslConvSetStart( task, h_start );
    assert(status == VSL_STATUS_OK);

    status = vsldConvExec( task, f, f_stride, g, g_stride, h, h_stride );
    assert(status == VSL_STATUS_OK);

    status = vslConvDeleteTask(&amp;amp;task);
    assert(status == VSL_STATUS_OK);
    
    for (int i=0; i&amp;lt; h_shape[0]; ++i)
    {
        printf("%3i: ",i);
        for (int j=0; j &amp;lt; h_shape[1]; ++j)
        {
            printf("%4.0f ",h[ i * h_stride[0] + j ]);
        }
        printf("\n");
    }
    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;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 11:05:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1276973#M31253</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-04-27T11:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1276976#M31254</link>
      <description>&lt;P&gt;I ran this, and I get all 0s. (the problem is not that it does not run, in this case it does run, but all results are 0)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 11:11:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1276976#M31254</guid>
      <dc:creator>imanh</dc:creator>
      <dc:date>2021-04-27T11:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1277277#M31259</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the Visual Studio(V16.9.4) settings (attached image below) which ran the sample and the result (attached image below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you also please specify your visual studio version ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 07:50:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1277277#M31259</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-04-28T07:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1277462#M31263</link>
      <description>&lt;P&gt;VS2019. My settings are the same EXCEPT for:&lt;/P&gt;
&lt;P&gt;User interface: DPC++ API (instead of ILP64)&lt;/P&gt;
&lt;P&gt;Use oneMKL: Sequential (but this doesn't matter)&lt;/P&gt;
&lt;P&gt;: SO I tried and "ILP64" fixed it. But is this okay? I mean, no warning, no compilation error, just results being wrong when you use the wrong interface?&lt;/P&gt;
&lt;P&gt;And I found this on ILP64 vs LP64, but I cant find anything about DPC++ API vs (I)LP64.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 22:03:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1277462#M31263</guid>
      <dc:creator>imanh</dc:creator>
      <dc:date>2021-04-28T22:03:52Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1278970#M31275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation. DPC++ API should be selected if you have DPC++ source code; when working with multiple devices (CPU/GPU) ,using device-specific libraries underneath.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You may try oneMKL DPC++ samples using DPC++ API.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For further reference:  &lt;A href="https://github.com/oneapi-src/oneMKL" target="_blank"&gt;https://github.com/oneapi-src/oneMKL&lt;/A&gt;&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;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 May 2021 05:58:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1278970#M31275</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-05T05:58:43Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280174#M31300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please let us know if your issues have been resolved. Can we proceed further to close this thread?&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, 10 May 2021 07:39:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280174#M31300</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-10T07:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280175#M31301</link>
      <description>yes and thanks for your responses. (I did mark your post as solution I thought that closes it.)</description>
      <pubDate>Mon, 10 May 2021 07:42:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280175#M31301</guid>
      <dc:creator>imanh</dc:creator>
      <dc:date>2021-05-10T07:42:46Z</dc:date>
    </item>
    <item>
      <title>Re:Intel MKL (VSL) Correlation 2d error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280178#M31302</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the confirmation!&lt;/P&gt;&lt;P&gt;As this issue has been resolved, we will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;Have a Good day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 May 2021 08:16:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Intel-MKL-VSL-Correlation-2d-error/m-p/1280178#M31302</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-05-10T08:16:20Z</dc:date>
    </item>
  </channel>
</rss>

