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

CPU Properties Problem

adem_metin_cali
Beginner
1,541 Views

Hi all,

I have a i7-Q720 cpu.But when i run the code that is in attachment and i find it in the Intel Ipp7.1 users guide,i see wrong informations.According to the code's output,my cpu does not support SSE2,SSE3,SSSE3,SSE41 and SSE42.But according to the intel web page(http://ark.intel.com/products/43122/Intel-Core-i7-720QM-Processor-6M-Cache-1_60-GHz), i have SSE42 instruction set.I use visual studio 12 and ipp7.1.1(r37466).What is the reason of this situation???

Adem Metin CALI

0 Kudos
23 Replies
SergeyKostrov
Valued Contributor II
1,317 Views
Please take a look at a comment in ippcore.h header file: ... /* // Name: ippGetEnabledCpuFeatures // Purpose: Detects unabled features for loaded libraries // Returns: Features mask // Features mask values are defined in the ippdefs.h ... */ IPPAPI( Ipp64u, ippGetEnabledCpuFeatures, ( void ) ) ... i7-Q720 CPU supports SSE2, SSE3, SSSE3, SSE41 and SSE42 instruction sets.
0 Kudos
adem_metin_cali
Beginner
1,317 Views

Hi Sergey,

First of all thanks for your interest.I looked in ippcore.h and i understand what you meant.When i run the program with default linking method and multithreaded static library,i get wrong results,but when i run the program with single threaded static library, iget right result.Is it about that multithreaded static library is deprecated???

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
>>...when i run the program with single threaded static library, iget right result.Is it about that multithreaded static >>library is deprecated? It is very strange and results should be identical.
0 Kudos
adem_metin_cali
Beginner
1,317 Views

No Sergey, results are not identical,i checked it twice.When i run the program with default linking method or multithreaded static linking,i get wrong results.But when irun the program with single threaded linking method,i get the right results.

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
Please post a final version of your test-case. Thanks in advance.
0 Kudos
adem_metin_cali
Beginner
1,317 Views

Thanks again for your interest and sorry for my delay Sergey.I put the screenshots  of the exes and the codes.You can easily understand their linking methods with their names.And good luck with that...

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
Could you try to do it in a different way ( or something like this )? [ Additional Test 1 ] ... ... (( fn & ippCPUID_SSE2 ) != 0) ? 'Y' : 'N'... ... (( fn & ippCPUID_SSE3 ) != 0) ? 'Y' : 'N'... ... (( fn & ippCPUID_SSSE3 ) != 0) ? 'Y' : 'N'... ... (( fn & ippCPUID_SSE41 ) != 0) ? 'Y' : 'N'... ... (( fn & ippCPUID_SSE42 ) != 0) ? 'Y' : 'N'... ... or [ Additional Test 2 ] ... ipp32u iMask = ( ipp32u )fn; ... (( iMask & ippCPUID_SSE2 ) != 0) ? 'Y' : 'N'... ... (( iMask & ippCPUID_SSE3 ) != 0)? 'Y' : 'N'... ... (( iMask & ippCPUID_SSSE3 ) != 0) ? 'Y' : 'N'... ... (( iMask & ippCPUID_SSE41 ) != 0) ? 'Y' : 'N'... ... (( iMask & ippCPUID_SSE42 ) != 0) ? 'Y' : 'N'... ... Take into account that explicit '... != 0' is used. It also makes sense to verify the same bits extractions in VS Watch Window. It is still Not clear if this is a bug in IPP or in Microsoft C++ compiler.
0 Kudos
adem_metin_cali
Beginner
1,317 Views

Hi Sergey,

i run the tests and results are same.Without single threaded static library i can not see the right properties of my cpu.i put the results screen shots in attachment.

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
Thank for the update and I will take a look at your test case next week.
0 Kudos
adem_metin_cali
Beginner
1,317 Views

I thank you Sergey.You strive very much.I think that this situation is about deprecation of multithraded version of ipp.

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
>>...I think that this situation is about deprecation of multithraded version of ipp. A deprecation period for some functionality is for about 2 years. Even if some IPP functions are marked as deprecated it doesn't mean that they are removed. However some issues are always possible. I'll keep you informed about results of my tests.
0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
I think you're mixing support of some Intel instruction sets for a CPU with support of some Intel instruction sets for IPP library. For example, let's say you have a latest Intel CPU, like Haswell, which supports all officially released Intel instruction sets. When it comes to IPP at a lowest level different Waterfall DLLs could be used and because of this calls to ippGetEnabledCpuFeatures will show what features of IPP (!) are supported after some Waterfall DLL is loaded ( but something is wrong in case of static linking / you're right here ). In another words, ippGetCpuFeatures is for detecting supported Intel instruction sets, or features, and ippGetEnabledCpuFeatures is for detecting supported Intel instruction sets in IPP, once again, because different Waterfall DLLs could be used with the same application in case of dynamic linking ( again, something is wrong in case of static linking / you're right here ).
0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
Continued... I created my own test-case and tested it on two systems with Ivy Bridge and Pentium 4 CPUs using Intel C++ compilers v12.x and v13.x. I confirm that something is wrong and here are results: Outputs on an Ivy Bridge system: IPP version: 7.1.1 [ Dynamic linking built with ICC v13.x ] Is IPP SSE feature enabled: 1 Is IPP SSE2 feature enabled: 0 Is IPP SSE3 feature enabled: 0 Is IPP SSE4.1 feature enabled: 0 Is IPP SSE4.2 feature enabled: 0 [ Static linking built with ICC v13.x ] Is IPP SSE feature enabled: 1 Is IPP SSE2 feature enabled: 1 Is IPP SSE3 feature enabled: 1 Is IPP SSE4.1 feature enabled: 1 Is IPP SSE4.2 feature enabled: 1 Outputs on a Pentium 4 system: IPP version: 7.0.205 [ Dynamic linking built with ICC v12.x ] Is IPP SSE feature enabled: 1 Is IPP SSE2 feature enabled: 0 Is IPP SSE3 feature enabled: 0 Is IPP SSE4.1 feature enabled: 0 Is IPP SSE4.2 feature enabled: 0 [ Static linking built with ICC v12.x ] Is IPP SSE feature enabled: 1 Is IPP SSE2 feature enabled: 1 Is IPP SSE3 feature enabled: 0 Is IPP SSE4.1 feature enabled: 0 Is IPP SSE4.2 feature enabled: 0 A test-case is attached.
0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
>>...i see wrong informations.According to the code's output,my cpu does not support SSE2,SSE3,SSSE3, >>SSE41 and SSE42... I'd like to go back to your first question and my question is: What do you want to verify, that is, supported Intel CPU instruction sets or supported IPP features?
0 Kudos
adem_metin_cali
Beginner
1,317 Views

Hi Sergey,

According to Intel Integrated Performance Primitives for Windows* OS User's Guide IPP7.1 (318254-016US) on page 15 and 16,the output of the example code is the hardware optimizations used by this library layer.Actually, i want to see the supported intel cpu instruction sets because my cpu is older than ipp version.

I know that this question is irrelevant but why do you use scope resolution operator  with ippInit function??? does it have a special purpose???As i know ipp is a C library and every function that you include  in your source file is in global scope.In addition scope resolution operator is a C++ operator.                                                                                                                                                                                     Thanks again for your interest.With my best regard.

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
>>...i want to see the supported intel cpu instruction sets... In that case use ippGetCpuFeatures function.
0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
>>...i want to see the supported intel cpu instruction sets... In that case use ippGetCpuFeatures function.
0 Kudos
adem_metin_cali
Beginner
1,317 Views

Ok, I understood that ippGetEnabledCpuFeatures gives the supported cpu features for library and ippGetCpuFeatures  gives the cpu features.My first question is that am i wrong for my first sentence and second question is that does intel gurantees performance  with a upper instruction set ???

Adem Metin CALI

0 Kudos
SergeyKostrov
Valued Contributor II
1,317 Views
You should use ippStaticInit or ippInit for automatic selection the highest Intel instruction set supported by a CPU. If automatic selection is Not needed ( a developer controls initialization ) then ippStaticInitCpu or ippInitCpu need to be used. Also, take a look at ippEnableCpu since it allows to select a target CPU ( see enumeration IppCpuType in ippdefs.h ) >>...does intel gurantees performance with a upper instruction set ?.. Yes.
0 Kudos
SergeyKostrov
Valued Contributor II
1,199 Views
>>...I know that this question is irrelevant but why do you use scope resolution operator with ippInit function? It is a matter of coding standards and you could ignore it.
0 Kudos
Reply