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

Custom DLL performance problem

marc_ba
Beginner
546 Views
Hello,
I tried to use IPP (v 4.0) in my software and noticed quite impressive speed enhancement while linking direcly with the whole dll's (those installed by default).
I tried to build my own custom dll (with right target processors), but the speed dramatically decreases by nearly a factor 2. Does anyone know what could be the problem ?
Thanks in advance,
Marc

Message Edited by marc_ba on 05-06-2004 12:20 AM

0 Kudos
11 Replies
Intel_C_Intel
Employee
546 Views

Hi Marc,

it seems you use PX code instead of "right" optimized code. Could you describe howyou built custom DLL? I think something was wrong in this point.

Regards,
Vladimir

0 Kudos
marc_ba
Beginner
546 Views

Hi,

Thanks for your help. I carrefully followed the readme instructions, by including the functions used in funclist.h & export.def.

By the way, I suppose the issue comes from tools.ini. Here is how the processor list is described :

# ###############################################################
# Supported processors.
# px=Generic IA-32 processor,
# a6=Intel Pentium III processor,
# w7=Intel Pentium 4 processor
CpuList=px a6 w7

Then I launch nmake clean and nmake that results in my own custom.dll and custom.lib with witch my program links.

Can you see anything wrong in that ?

Thanks,

Marc

Message Edited by marc_ba on 05-06-2004 12:49 AM

0 Kudos
Intel_C_Intel
Employee
546 Views

Marc,

Did you define macro names PX, A6 and W7 in your dllmain.c file? If you will look on customdll sample, you will find that these macro names controls cpu-specific code into custom dll.

Regards,
Vladimir

0 Kudos
marc_ba
Beginner
546 Views
Hi,
I didn't (as it's written in the readme.html : "Please note that you do not have to edit the file dllmain.c at all.") but when I do so, I have a macro redefinition message for px, a6 and w7 that implies that they are already declared as preprocessor macro (by the way, I can see in the compilation line :
cl.exe /nologo /c /GB /W3 /O2 -I"C:Program FilesIntelIPP40include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" -MD /DPX /DA6 /DW7 /Fo".Libcustomipp.obj" dllmain.c
that the preprocessor macros px, a6 and w7 ARE declared). Of course, it doesn't change anything regarding execution speed ...
Do you have any other idea ?
Thanks again,
Marc

Message Edited by marc_ba on 05-06-2004 05:08 AM

0 Kudos
Intel_C_Intel
Employee
546 Views

Marc,

yes, in IPP sample you have not to modify dllmain.c because these macro are defined in customdll.mak file. I just thought thatwhen you used this technique for your own software you could miss this. So, could you check if dispatcher selected right version of code? To do it you need insert piece of code like that to appropriate place in your program:

const IppLibraryVersion* libinfo;

// get ipp libraryversion info
libinfo = ippsGetLibVersion(); // if you use ipps

printf("name: %s ",libinfo->Name);
printf("version: %s ",libinfo->Version);
printf("build: %s ",libinfo->BuildDate);

Can you see w7 in library name if you run program on Intel Pentium4?
Vladimir
0 Kudos
marc_ba
Beginner
546 Views
Hi again,
I tried, and unfortunately I can see w7 when running on a Pentium 4 ... I'm getting out of idea ...
0 Kudos
Intel_C_Intel
Employee
546 Views
Hi Marc,
well, there may be other reason. As you probably know, IPP DLLscontains hyper-threading support inside. But custom DLLare built from static libraries, which do not have such support. So, if your processor has hyper-threading support, an application linked with IPP DLLs automatically uses advantages of it, but application linked with static IPP libraries or custom IPP DLL does not. In this case you can provide threading support on the application level.
Regards,
Vladimir
0 Kudos
marc_ba
Beginner
546 Views
Hi vdudnik,
Thanks again for the support.
I think what you say is not the source of the problem, because I didn't activate hyperthreading on my computer ... It's really a very serious problem because if I don't find a solution under short delays, I won't be able to use IPP in the deployment of the software ...
Please, should you have any other ideas, please let me know.
Regards
Marc
0 Kudos
Intel_C_Intel
Employee
546 Views
Hi Marc,
Well, I will try to help you as much as I can.
We need to know more about your system, your software, version of IPPand IPP functions you use. Could you pleasetell us what processor, what operating system you use. Also, please check what IPP version you have. It would be better just post output of ippGetLibVersion function, I proposed in previous message. How many of IPP functions do you use and which one? What is the usage model (in other words what your software do)?
May be youcan provide us with simple test case?
Regards,
Vladimir
0 Kudos
marc_ba
Beginner
546 Views

vdudnik,

I really appreciate your help. I will try, under short delays, to provide the most complete information I can about my configuration, the functions I use and how I use it. Actually, I'll provide a very simple code example.

Regards,

Marc

0 Kudos
Intel_C_Intel
Employee
546 Views
Ok
0 Kudos
Reply