IPP 7.1 vs IPP 6.1

IPP 7.1 vs IPP 6.1

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?

14 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Hi,

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

Regards,

Naveen Gv

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

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.

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

>>...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?

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%.

Hi Roman,

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

Regards,
Sergey 

Regards,
Sergey

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?

Citação:

Sergey Kostrov escreveu:

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

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

Citação:

Roman T. escreveu:

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 

Regards,
Sergey

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

 

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 

Regards,
Sergey

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

>>...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 )

发表评论

登录添加评论。还不是成员?立即加入