Community
cancel
Showing results for 
Search instead for 
Did you mean: 
drd
Beginner
119 Views

denormals

I'm a litte confused about why I'm getting denormals from various ipp calls. I'm using the Intel Compiler v10, and have flush denormals Qftz set... shouldn' this take care of that? And for ipp, I imagine something like this is supposed to work?

IppStatus status;
status = ippStaticInit();
status = ippSetDenormAreZeros(1);
status = ippSetFlushToZero(1, NULL);

In many cases my app will feed ipp filters (IIR, FIR, etc.) "empty" buffers (all 0.0 floats), and this is valid behavior in the application... but I'm still getting denormals as I step trough... shouldn't the /qftz switch take care of that at runitme, especially if I also set the flags for ipp? or do I need to perform additional checks at runtime and "flush" the denormals manually?

Thanks :)
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
119 Views

Hello,

there is comment from our expert

Setting ftz and daz doesn't prevent from appearing of "denormals" in calculation results, these flags just inform cpu to consider these "denormals" as zeroes in the subsequent calculations and therefore speedup calculations. To avoid "denormals"you needto flush them manually (for example via ippsThreshold).


Regards,
Vladimir
drd
Beginner
119 Views

Hello,

there is comment from our expert

Setting ftz and daz doesn't prevent from appearing of "denormals" in calculation results, these flags just inform cpu to consider these "denormals" as zeroes in the subsequent calculations and therefore speedup calculations. To avoid "denormals"you needto flush them manually (for example via ippsThreshold).


Regards,
Vladimir
Yeah, well, seems the ftz and daz flags aren't sticking for whatever reason, and it's killing performance... Anyway, as it's usage is undocumented, I just assumed to put setFlushToZero in "main" along with init, and it would set the cpu flag for all ipp opperations in my app... not true, apparently, has to be done per thread, but seems to work as expected... sure beats going through my entire app and handholding every ipp call with a threshold... or does it? It seems there's some additional overhead to the threshold calls (which are documented ;) Perhaps it depends on the situation (eg: target CPU / instructions?). And what exactly is the difference between setFlushtoZero and setDenormAreZero?
vdecaillet
Beginner
119 Views

Hi...
I hope this thread is not dead yet.
Well, I'm alsoe experiencing performance drop due to denormal, and I've tried calling :
ippSetFlushToZero(1, NULL);
ippSetDenormAreZeros(1);
but there is no difference at all : it's like these lines are ignored.
I've ruled out the following :
SSE2 is enabled in all projects of my app (currently a test app involving one EXE and one DLL).
the functions above are called from the correct thread.
the functions don't complain about anything by returning some odd IppStatus.
the performance drop is indeed due to denormal
So I'm a bit stuck right now, so any idea would be welcome...
Thanks in advance for your help !
Valentin
Naveen_G_Intel
Employee
119 Views

Hi Valentin,

What is the target platform/processor...?

Regards,

Naveen Gv

vdecaillet
Beginner
119 Views

Hi Naveen !
Do you think this problem is hardware-based ?
Currently, I'm trying to make it work on my main dev machine :
Intel Core2 Quad CPU, Q6600 @ 2.40GHz 2.40GHz
4.00GB RAM installed.
I don't know if it's relevant, but just in case, I'm using Windows 7 professional, SP1.
Best regards,
Valentin
Reply