Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

Results difference IppsConv_32f ippsConvolve_32f

gilles73
Beginner
1,855 Views

I obtained same results with the matlab convolution using ippsConvolve_32f (OneApi 2021) configured on "ippAlgDirect".

 

However, I didn't match the same results using IppsConv_32f (IPP 7.0 version). I need to maintain the code with this version of IPP. But I don't understand why the results are not the same than the matlab function or the IppsConvolve_32f function.

 

Thanks for your insights.

0 Kudos
1 Solution
Andrey_B_Intel
Employee
1,467 Views

Hi.

Add please this code to initialization stage of you app  before call of IPP library. IPP detects CPU and switches to appropriate hand tuned branch in code. In addition to this ippsConv_32f selects between direct and fft-based implementations before CPU detection. ipp70 has bug in direct+avx code. Provided code switch from direct+avx to direct+sse42 and may help only in this case.

Andrey

IPP    

View solution in original post

0 Kudos
7 Replies
ShanmukhS_Intel
Moderator
1,802 Views

Hi,


Thanks for reaching out to us.


Could you please share us the reproducer and environment details so that we could look upon your issue.


Best Regards,

Shanmukh.SS


0 Kudos
ShanmukhS_Intel
Moderator
1,778 Views

Hi,


Reminder:

Is your issue resolved? Please let us know if the issue still persists. If not, Could you please provide us the reproducer so that we could look upon your issue.


Best Regards,

Shanmukh.SS


0 Kudos
gilles73
Beginner
1,721 Views

Hi Shanmukh.SS,

Sorry for the late.

I realised many tests before understanding the differences.

I understand that the IppsConv_32f internally switches the algorithm from direct convolution to FFT-based convolution at this condition :

 

if(( lenDst < 512)||( MIN(Src1Len,Src2Len) <64 ))

 

 But it's not explain all results. We suspect that the FFT-based convolution algorithm gives wrong results, probably a bug.

 

Could you say if the logs of changes between versions of IPP contain a known issue of IPP 7.0 concerning the convolution function?

I don't find this information on the web because I suppose this information is archived. Are there any corrections of IppsConv_32f in 7.x versions ?

 

Thanks you in advance for your help

 

G.

 

0 Kudos
Andrey_B_Intel
Employee
1,492 Views

Hi Gilles.

There was bug in IPP7.0 non-FFT AVX code of ippsConv_32f. This bug was fixed later.

Could you please dispatch IPP to  SSE42 using this code?

    Ipp64u features;
    features = ippGetEnabledCpuFeatures();
    IppStatus status;
    #define PX_FM ( ippCPUID_MMX | ippCPUID_SSE | ippCPUID_SSE2 )
    #define M7_FM ( PX_FM | ippCPUID_SSE3 )
    #define U8_FM ( M7_FM | ippCPUID_SSSE3 )
    #define N8_FM ( U8_FM | ippCPUID_MOVBE )
    #define Y8_FM ( U8_FM | ippCPUID_SSE41 | ippCPUID_SSE42 )
    #define E9_FM ( Y8_FM | ippCPUID_AVX | ippAVX_ENABLEDBYOS | ippCPUID_F16C )

    status = ippSetCpuFeatures(Y8_FM);

 Also could you please provide any additional information ( vector sizes, input/output data)?

Thanks

Andrey

IPP

 

0 Kudos
gilles73
Beginner
1,475 Views

Thanks you Andrey for your support.


Could you give me more details about the given code ?

Must I put this code at the beginning of the function where the ippsConv_32f ? May this code fix the bug ?


Sorry, I can't give the input and output data. The vector sizes are respectively 5001 samples convolving 512 samples.

 

0 Kudos
Andrey_B_Intel
Employee
1,468 Views

Hi.

Add please this code to initialization stage of you app  before call of IPP library. IPP detects CPU and switches to appropriate hand tuned branch in code. In addition to this ippsConv_32f selects between direct and fft-based implementations before CPU detection. ipp70 has bug in direct+avx code. Provided code switch from direct+avx to direct+sse42 and may help only in this case.

Andrey

IPP    

0 Kudos
gilles73
Beginner
1,457 Views

ok thanks.

 

However this function is not available in IPP 7.0

 

ippSetCpuFeatures

 

I replaced your given code by :

IppCpuType cpu=ippGetCpuType();
printf("processor type %d \n",cpu);
status = ippInitCpu(ippCpuSSE3);

With these instruction sets, the results of IppsConv_32f are well.

0 Kudos
Reply