<?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 ippsConv_32f memory problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071356#M24534</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've encountered a strange problem using&amp;nbsp;ippsConv_32f function. It happens once in a while and isn't reproducible all the time.&lt;/P&gt;

&lt;P&gt;This function gets 2 pointers to inputs (sizes M and N) and one pointer for output (size N+M-1).&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Even though the inputs are perfectly fine, the function crushes due to a memory problem.&lt;/P&gt;

&lt;P&gt;I found that what solves the problem is allocating more space for the first input (N+A instead of N).&lt;/P&gt;

&lt;P&gt;I tried putting different values in the extra A places in the first input array and saw that the result isn't effected by these values (as it should be).&lt;/P&gt;

&lt;P&gt;So it seems that the function doesn't actually use the extra values but it uses the extra allocated space.&lt;/P&gt;

&lt;P&gt;Most of the times the function runs fine, this problem happens only in one case from time to time.&lt;/P&gt;

&lt;P&gt;Is it something known? If so, what is the general way to deal with this?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you very much,&lt;/P&gt;

&lt;P&gt;Sasha.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2016 08:52:51 GMT</pubDate>
    <dc:creator>Sasha_G_</dc:creator>
    <dc:date>2016-01-04T08:52:51Z</dc:date>
    <item>
      <title>ippsConv_32f memory problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071356#M24534</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I've encountered a strange problem using&amp;nbsp;ippsConv_32f function. It happens once in a while and isn't reproducible all the time.&lt;/P&gt;

&lt;P&gt;This function gets 2 pointers to inputs (sizes M and N) and one pointer for output (size N+M-1).&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Even though the inputs are perfectly fine, the function crushes due to a memory problem.&lt;/P&gt;

&lt;P&gt;I found that what solves the problem is allocating more space for the first input (N+A instead of N).&lt;/P&gt;

&lt;P&gt;I tried putting different values in the extra A places in the first input array and saw that the result isn't effected by these values (as it should be).&lt;/P&gt;

&lt;P&gt;So it seems that the function doesn't actually use the extra values but it uses the extra allocated space.&lt;/P&gt;

&lt;P&gt;Most of the times the function runs fine, this problem happens only in one case from time to time.&lt;/P&gt;

&lt;P&gt;Is it something known? If so, what is the general way to deal with this?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you very much,&lt;/P&gt;

&lt;P&gt;Sasha.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 08:52:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071356#M24534</guid>
      <dc:creator>Sasha_G_</dc:creator>
      <dc:date>2016-01-04T08:52:51Z</dc:date>
    </item>
    <item>
      <title>Dear Sasha, </title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071357#M24535</link>
      <description>&lt;P&gt;Dear Sasha,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Could you provide us some basic information, like&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;OS, CPU type &amp;amp;&amp;nbsp;IPP version, IPP library. for example, to use the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;ippsGetLibVersion to get them&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;void libinfo(void) {&lt;BR /&gt;
	const IppLibraryVersion*&lt;BR /&gt;
	lib = ippsGetLibVersion();&lt;BR /&gt;
	printf(“%s %s %d.%d.%d.%d\n”,&lt;BR /&gt;
	lib-&amp;gt;Name, lib-&amp;gt;Version,&lt;BR /&gt;
	lib-&amp;gt;major,&lt;BR /&gt;
	lib-&amp;gt;minor, lib-&amp;gt;majorBuild, lib-&amp;gt;build);&lt;BR /&gt;
	}&lt;BR /&gt;
	Output:&lt;BR /&gt;
	ippsv8_1.lib 7.0 build 205.68&lt;/P&gt;

&lt;P&gt;Regarding the function&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;ippsConv_32f, &amp;nbsp; does it return&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;ippStsMemAllocErr, which&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Indicates an error when there is not enough memory for&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;internal buffers?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;On the other hand, the function was deprecated in latest IPP 9.0 update 1 version (which of community version can be get fromhttps://software.intel.com/sites/campaigns/nest/). &amp;nbsp;You may try the new function&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;ippsConvolve_32f, as the ipp manual example:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Description&lt;BR /&gt;
	The ippsAutoCorr function is deprecated. For information about the functions that you should use instead,&lt;BR /&gt;
	see the table below.&lt;BR /&gt;
	Deprecated Function Use Instead&lt;BR /&gt;
	ippsConv_32f ippsConvolve_32f&lt;BR /&gt;
	ippsConv_64f ippsConvolve_64f&lt;BR /&gt;
	ippsConv_16s_Sfs ippsConvert_16s32f and&lt;BR /&gt;
	ippsConvolve_32f&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;IppStatus ConvolveExample (void) {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;IppStatus status;&lt;BR /&gt;
	const int src1Len = 5, src2Len = 2, dstLen = src1Len+src2Len-1;&lt;BR /&gt;
	Ipp32f pSrc1[src1Len] = {-2.f,0.f,1.f,-1.f,3.f}, pSrc2[src2Len]={0.f,1.f}, pDst[dstLen];&lt;BR /&gt;
	IppEnum funCfg = (IppEnum)(ippAlgAuto);&lt;BR /&gt;
	int bufSize = 0;&lt;BR /&gt;
	Ipp8u *pBuffer;&lt;BR /&gt;
	status = ippsConvolveGetBufferSize(src1Len, src2Len, ipp32f, funCfg, &amp;amp;bufSize);&lt;BR /&gt;
	if ( status != ippStsNoErr )&lt;BR /&gt;
	return status;&lt;BR /&gt;
	pBuffer = ippsMalloc_8u( bufSize );&lt;BR /&gt;
	status = ippsConvolve_32f(pSrc1, src1Len, pSrc2, src2Len, pDst, funCfg, pBuffer);&lt;BR /&gt;
	printf_32f("pDst", pDst, dstLen);&lt;BR /&gt;
	ippsFree( pBuffer );&lt;BR /&gt;
	return status;&lt;BR /&gt;
	}&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying H.&lt;/P&gt;

&lt;P&gt;Intel IPP Support&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 01:45:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071357#M24535</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-01-05T01:45:39Z</dc:date>
    </item>
    <item>
      <title>Hi Yinh H.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071358#M24536</link>
      <description>&lt;P&gt;Hi Yinh H.&lt;/P&gt;

&lt;P&gt;Thank you for your reply.&lt;/P&gt;

&lt;P&gt;We're working in windows 7, my CPU is: Intel(R) Xeron(R) CPU E5-2630, but this crash happens in at least 2 other computers.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: normal;"&gt;ipp version: &amp;nbsp;ippsw7_l.lib 7.0 build 205.40 7.0.205.1041&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: normal;"&gt;The function doesn't return any status, it just crashes.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: normal;"&gt;I know that this function is deprecated, but we're working with ipp 7 in our application and cannot upgrade now to the next version.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I would also like to emphasize that this crash happens on and off in a specific place in our application and I couldn't reproduce this crash in a clean project.&lt;/P&gt;

&lt;P&gt;Was there any known issue with this function before it was deprecated?&lt;/P&gt;

&lt;P&gt;If so, is there some kind of a workaround?&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you very much for your help,&lt;/P&gt;

&lt;P&gt;Sasha.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2016 07:06:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071358#M24536</guid>
      <dc:creator>Sasha_G_</dc:creator>
      <dc:date>2016-01-05T07:06:29Z</dc:date>
    </item>
    <item>
      <title>Hi Sasha,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071359#M24537</link>
      <description>&lt;P&gt;Hi Sasha,&lt;/P&gt;

&lt;P&gt;I checked the bug list in IPP 7.0 and later&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/articles/intel-ipp-70-library-bug-fixes/"&gt;https://software.intel.com/en-us/articles/intel-ipp-70-library-bug-fixes/&lt;/A&gt;&lt;/P&gt;

&lt;TABLE border="0"&gt;
	&lt;TBODY&gt;
		&lt;TR&gt;
			&lt;TD&gt;DPD200259470&lt;/TD&gt;
			&lt;TD&gt;Bug in IppiConvValid_32f_C1R for x64 bit code&lt;/TD&gt;
		&lt;/TR&gt;
	&lt;/TBODY&gt;
&lt;/TABLE&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/intel-ipp-80-library-release-notes"&gt;https://software.intel.com/en-us/intel-ipp-80-library-release-notes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Only found one&lt;/P&gt;

&lt;P&gt;ippsConv_32f produced wrong result on AVX related to ippsConv_32f, but it is about AVX code, was fixed in IPP 8.0&lt;/P&gt;

&lt;TABLE id="TBL5-1" border="1" rules="all" frame="border" cellspacing="0" cellpadding="4" summary=""&gt;
	&lt;CAPTION&gt;&lt;SPAN class="tablecap"&gt;Description of Codes Associated with Processor-Specific Libraries&lt;/SPAN&gt;&lt;/CAPTION&gt;
	&lt;THEAD align="left"&gt;
		&lt;TR&gt;
			&lt;TH width="14.12%" class="cellrowborder" id="d14029e99" valign="top"&gt;&amp;nbsp;IA-32 Intel® architecture&lt;/TH&gt;
			&lt;TH width="14.97%" class="cellrowborder" id="d14029e102" valign="top"&gt;&amp;nbsp;Intel® 64 architecture&lt;/TH&gt;
			&lt;TH width="70.9%" class="cellrowborder" id="d14029e105" valign="top"&gt;
				&lt;P&gt;Description&lt;/P&gt;
			&lt;/TH&gt;
		&lt;/TR&gt;
	&lt;/THEAD&gt;
	&lt;TBODY&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;
				&lt;P&gt;&lt;STRONG&gt;px&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;
				&lt;P&gt;&lt;STRONG&gt;mx&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;Generic code optimized for processors with Intel® Streaming SIMD Extensions (Intel® SSE)&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;
				&lt;P&gt;&lt;STRONG&gt;w7&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;&amp;nbsp;&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;&lt;STRONG&gt;Optimized for processors with Intel SSE2&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;&amp;nbsp;&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;
				&lt;P&gt;&lt;STRONG&gt;m7&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;Optimized for processors with Intel SSE3&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;
				&lt;P&gt;&lt;STRONG&gt;v8&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;
				&lt;P&gt;&lt;STRONG&gt;u8&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;Optimized for processors with Supplemental Streaming SIMD Extensions 3 (SSSE3), including the Intel® Atom™ processor&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;
				&lt;P&gt;&lt;STRONG&gt;p8&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;
				&lt;P&gt;&lt;STRONG&gt;y8&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;Optimized for processors with Intel SSE4.1&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;
				&lt;P&gt;&lt;STRONG&gt;g9&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;
				&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: rgb(34, 34, 34); background-color: rgb(255, 255, 0);"&gt;e9&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;Optimized for processors with Intel® Advanced Vector Extensions (Intel® AVX) and Intel® Advanced Encryption Standard New Instructions (Intel® AES-NI)&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
		&lt;TR&gt;
			&lt;TD width="14.12%" class="cellrowborder" valign="top" headers="d14029e99 "&gt;
				&lt;P&gt;&lt;STRONG&gt;h9&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="14.97%" class="cellrowborder" valign="top" headers="d14029e102 "&gt;
				&lt;P&gt;&lt;STRONG&gt;l9&lt;/STRONG&gt;&lt;/P&gt;
			&lt;/TD&gt;
			&lt;TD width="70.9%" class="cellrowborder" valign="top" headers="d14029e105 "&gt;
				&lt;P&gt;Optimized for processors with Intel AVX2&lt;/P&gt;
			&lt;/TD&gt;
		&lt;/TR&gt;
	&lt;/TBODY&gt;
&lt;/TABLE&gt;

&lt;P&gt;On the other hand, Intel(R) Xeron(R) CPU E5-2630 should support AVX, so by default, &amp;nbsp;ippsw7_l.lib 7.0 build 205.40 7.0.205.1041 is not expected.&lt;/P&gt;

&lt;P&gt;so I can't validate if it is IPP bug. But you mentioned this crash happens on and off in a specific place in our application.&amp;nbsp; it seems related to environment also.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;About the workaround, as early ippsConv use internal memory, so the issue mainly related&amp;nbsp;to memory, you may workaround it by add more memory as you mentioned first time.&lt;/P&gt;

&lt;P&gt;or try latest IPP version.&amp;nbsp; ( It may be complicated and&amp;nbsp;not supported,&amp;nbsp;&amp;nbsp;you can create a your own static library (only&amp;nbsp;including one conv function)&amp;nbsp;based on latest IPP version, then use other from 7.0.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 01:32:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippsConv-32f-memory-problem/m-p/1071359#M24537</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2016-01-07T01:32:19Z</dc:date>
    </item>
  </channel>
</rss>

