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

Using AVX-512 in 32-bit code

Beni_Falk
Beginner
1,962 Views

Hi,

My question is the following:

Do IPP 32-bit libraries (in particular the signal processing library) comprise AVX-512 - specific variants?

For why this issue is critical to us, please  read on.

Our application is 32-bit - it runs under INtime O/S (from TenAsys) which only supports 32-bit code.

INtime does support IPP (via static linkage) and we have successfully used it (mainly the signal processing library) for many years. In particular, INtime does support AVX-512 (at least nominally).

We are now switching to CPUs comprising AVX-512 and would like to benefit from it (we really need the performance boost).

Until now we have been using IPP using static dispatch. That is, in our code we included ipp_h9.h before including ipp.h to force IPP to use AVX2.

It seems that that there is no equivalent mechanism for forcing IPP to use AVX-512 for 32-bit code. This is documented here:

https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-oneapi/2021-9/dispatching.html

Indeed, I downloaded the latest IPP release and it seems that the 32-bit libraries do not comprise an include file to force static dispatching to AVX-512 (as opposed to 64-bit libraries).

While using static dispatch is beneficial to us, it is not critical. However this got me thinking about whether the IPP libraries (specifically the signal processing library) do indeed comprise AVX-512 - specific variants, or whether when we call an IPP function on a CPU comprising AVX-512, the call will be routed to an AVX2-specific function, in which case we will not gain any (significant) performance boost from switching to the new CPU.

Please advise.

Thanks.

0 Kudos
8 Replies
Beni_Falk
Beginner
1,947 Views

I haven't mentioned it in my original post, but we are using the libraries targeted for Windows. Application development is done using Visual Studio.

I performed DUMPBIN /SYMBOLS on ippsmt.lib and the result was as follows (I have focused on the ippsAdd_32fc API):

_g9_ippsAdd_32fc@16
_g9_ippsAdd_32fc@16
_h9_ippsAdd_32fc@16
_h9_ippsAdd_32fc@16
_in_ippsAdd_32fc@16
_ippsAdd_32fc@16
_p8_ippsAdd_32fc@16
_p8_ippsAdd_32fc@16
_s8_ippsAdd_32fc@16
_s8_ippsAdd_32fc@16
_w7_ippsAdd_32fc@16
_w7_ippsAdd_32fc@16

The g9, h9, p8, s8 and w7 variants are targeted to specific architectures, as defined here: https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-oneapi/2021-9/dispatching.html

and none of these architectures is AVX-512.

I presume that _ippsAdd_32fc@16 is the dispatch wrapper. The only thing left is _in_ippsAdd_32fc@16.

Could it be the AVX-512 - specific variant? Or are there no AVX-512 - specific variants at all (in the 32-bit libraries)?

Please advise.

Thanks.

 

0 Kudos
Beni_Falk
Beginner
1,937 Views

And here is the relevant excerpt from the link map of an application using this function:

0001:002fffa0 _ippsAdd_32fc@16    00700fa0 f ippsmt:jmp_ippsAdd_32fc_b5cdad3c.obj
0001:002fffc0 _in_ippsAdd_32fc@16 00700fc0 f ippsmt:jmp_ippsAdd_32fc_b5cdad3c.obj
0001:00309860 _w7_ippsAdd_32fc@16 0070a860 f ippsmt:psadd_w7---ippsAdd_32fc.obj
0001:003098a0 _s8_ippsAdd_32fc@16 0070a8a0 f ippsmt:psadd_s8---ippsAdd_32fc.obj
0001:003098e0 _p8_ippsAdd_32fc@16 0070a8e0 f ippsmt:psadd_p8---ippsAdd_32fc.obj
0001:00309920 _g9_ippsAdd_32fc@16 0070a920 f ippsmt:psadd_g9---ippsAdd_32fc.obj
0001:00309960 _h9_ippsAdd_32fc@16 0070a960 f ippsmt:psadd_h9---ippsAdd_32fc.obj

Module name suggests that _in_ippsAdd_32fc is part of the dispatch code.

What gives?

 

0 Kudos
VarshaS_Intel
Moderator
1,904 Views

Hi,


Thanks for posting in Intel Communities.


>>Could it be the AVX-512 - specific variant? Or are there no AVX-512 - specific variants at all (in the 32-bit libraries)?

Sorry for the inconvenience caused to you, from the Intel IPP documentation we could see that there is no specific variant for AVX 512 in the 32-bit library.


>>And here is the relevant excerpt from the link map of an application using this function

Could you please let us know how you got these results?


Could you please let us know the version of Intel IPP you are using? And also, could you please provide us with a sample reproducer code you are trying and let us know what error you are facing while using 32-bit AVX-512?


Thanks & Regards,

Varsha



0 Kudos
Beni_Falk
Beginner
1,888 Views

Varsha,

 

1. I did the above tests using the latest IPP version - the one comprised by oneApi 2021.9.

 

2. Regarding the excerpt from the link map - this is an excerpt from the .map file produced by Visual Studio.

My application uses IPP extensively. It uses the ippsAdd_32fc API, among others.

 

3. Regarding a sample of code where you can reproduce the problem - any use of ippsAdd_32fc after ippInit.

Regarding errors that I am facing - there are no errors. The code compiles and runs correctly. However, I suspect that it uses AVX2 rather than AVX-512, with the obious implications on performance.

 

Thanks,

Beni

 

0 Kudos
Beni_Falk
Beginner
1,847 Views

I have actually run a benchmark on my code and obtained the same performance that I had when using AVX2 (with static disapatching).

 

I also traced code execution using the debugger and saw that when my code called ippsAdd_32fc, it branched to h9_ippsAdd_32fc.

 

This proves that even though the CPU (and the O/S) support AVX-512, 32-bit IPP calls the variant targeted to AVX2 and not AVX-512.

 

Is there anything that could be done?

 

Thanks,

 

0 Kudos
VarshaS_Intel
Moderator
1,740 Views

Hi,

 

Thanks for sharing the required details and information.

 

As per the processor-specific codes mentioned in the below link, there is no equivalent 32-bit for Intel® AVX-512 and hence it is using AVX2 as expected.

https://www.intel.com/content/www/us/en/docs/ipp/developer-guide-oneapi/2021-9/dispatching.html

 

In addition, this is to kindly inform you that, due to a significant shift in industry trend towards 64-bit architecture in recent years, Intel IPP 32-bit binaries will be deprecated in the upcoming Intel IPP 2021.10 release.

 

Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
1,647 Views

Hi,


We have not heard back from you. Could you please let us know if you have any other queries?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
1,598 Views

Hi,


We have not heard back from you. Could you please let us know if you need any other details?


Thanks & Regards,

Varsha


0 Kudos
Reply