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

IPP 7.1 vs IPP 6.1

Roman_T_
New Contributor I
444 Views

Hi all!

I use IPP from 6.1 version appearance. 1 week ago we installed IPP 7.1 and reconfigured our source code to be compiled with 7.1 version.

Results are very strange. Overall performance decreased more than 4 times.

Maybe 7.1 requires some special settings?

0 Kudos
13 Replies
Naveen_G_Intel
Employee
444 Views

Hi,

Can you tell me how you’re building and linking with IPP libraries?

Regards,

Naveen Gv

0 Kudos
Roman_T_
New Contributor I
444 Views

1. We installed 30 days copy (to make a decision to bye a new licence)

2. We use MS Visual Studio 2010 SP1

3. I set in project configuration locations of *.h files of IPP 7.1 and *.lib files.

Everething was built without any errors, but after EXE file start all 4 cores of my Intel Core i5 have about 90% of load VS 12-16% with IPP 6.1

0 Kudos
SergeyKostrov
Valued Contributor II
444 Views
Roman, There are thousands functions in IPP library and if you've detected some performance problems with a newer version of IPP library technical details need to be provided. What IPP functions do you use in your application? Platform ( 32-bit or 64-bit )? A test case would also be helpful.
0 Kudos
Roman_T_
New Contributor I
444 Views

1. We use Windows 7 32 and 32-bit IPP.

2. Problem appears with just one function, that converts color picture to gray

ippiRGBToGray_8u_C3C1R(ippBufColor,img->width*3,ippGrayColor,buf[last]->width,ipSize);

The same code works absolutely differently under IPP 6.1 and IPP 7.1

0 Kudos
SergeyKostrov
Valued Contributor II
444 Views
>>...The same code works absolutely differently under IPP 6.1 and IPP 7.1... Do you mean results are different, or with IPP 7.1 processing is slower?
0 Kudos
Roman_T_
New Contributor I
444 Views

My application performs processing of RGB picture from video file 20 times per second (I use system timer). So, if main processor is  strong enough, after picture processing the program will do nothing (for OS messages processing). That's why task manager indicates processor load less then 100%.

So, with IPP 6.1 this value is 12-16%, and with IPP7.1 80-90%.

0 Kudos
Sergey_K_Intel
Employee
444 Views

Hi Roman,

Could you be more specific please - overall performance decreased or CPU load is increased ?

Regards,
Sergey 

0 Kudos
SergeyKostrov
Valued Contributor II
444 Views
It is clearly stated in Roman's initial post: ...Overall performance decreased more than 4 times... Roman, Did you check it in Release or Debug configurations?
0 Kudos
Sergey_K_Intel
Employee
444 Views

Sergey Kostrov wrote:

...Overall performance decreased more than 4 times...

That's not so clear. There is another quote :)

Roman T. wrote:

My application performs processing of RGB picture from video file 20 times per second (I use system timer). So, if main processor is  strong enough, after picture processing the program will do nothing (for OS messages processing). That's why task manager indicates processor load less then 100%.

So, with IPP 6.1 this value is 12-16%, and with IPP7.1 80-90%.

So, it is like a video playback. It will not play more than, say, 24 FPS, no matter how fast CPU is.

There can be problem with multi-threading. If OpenMP doesn't stop immediately after all thread finish, there can be excessive CPU load. As far as I see from our performance charts, ippiRGBToGray_8u_C3C1R in 7.1 is 4x times faster than in 6.1. So, the problem may be not in function itself.

Regards,
Sergey 

0 Kudos
Roman_T_
New Contributor I
444 Views

1. My application was initially created in Release configuration.

2. My application uses OS system timer (WM_TIMER message) that was configured to send a signal 20 times per second with no dependence on AVI file frame rate. And at this conditions everything works normally with IPP 6.1 (16-18% average CPU load) and very... hmm...strange with IPP 7.1 (80-90% average CPU load).

3. My application doesn't use any multi-threading itself. If we have some problem with threads - only inside IPP

 

0 Kudos
Sergey_K_Intel
Employee
444 Views

Hi Roman,

My suspicion is that you use multi-thread IPP libraries, thus multi-thread variance of RGBToGray function. There is a trick in OpenMP. In order to quickly wakeup worker threads after previous parallel region finishes, they don't go to blocked state immediately, they stay active for about 200 msec (there is an environment variable KMP_BLOCKTIME controlling this time). This probably is the reason of extra CPU load in your application.

If you don't need multi-threading, please make sure that you link your application to single-thread IPP libraries (as far as I remember, dynamic IPP libraries in 7.1 are multi-thread by default).

If you still need dynamic IPP linking, please set number of internal threads to 1 using ippSetNumThreads(1) somewhere in the beginning of your application.

If CPU load will be still high, please tell us. We'll be investigating further.

Regards,
Sergey 

0 Kudos
Roman_T_
New Contributor I
444 Views

Hi Sergey,

I tested three variants of code:

1. Timer interval 250 ms (more than 200 ms). Application is able to process only 4 pictures per second, but CPU load was still high - about 80%.

2. Timer interval 500 ms. 2 frames per second. CPU load - 50%.

3. And finally I put ippSetNumThreads(1) at the beginning and returned timer interval to 50 ms (20 frames per second)....and CPU load became 12-18 %, that is similar to IPP 6.1 values. Thank you very much!!!

Best regards,

Roman

0 Kudos
SergeyKostrov
Valued Contributor II
444 Views
>>...My suspicion is that you use multi-thread IPP libraries, thus multi-thread variance of RGBToGray function... Roman, There are two simple ways to verify what IPP DLLs are used: - MS Depends utility ( however, it won't display any loaded Waterfall IPP DLLs ) - Compile your application in Debug configuration -> Start Debugger ( F10 ) -> Do some processing ( a couple of times if you want ) -> Close the application -> Take a look Output Window of VS 2010 for a list of all Loaded DLLs -> Find all IPP DLLs ( it will report all loaded Waterfall IPP DLLs )
0 Kudos
Reply