Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [apple scitech] SGEMV slow in Leopard?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I had the same problem going from 10.3 to 10.4 ...

In this case the problem was due to Accelerate not using "flush denormals" anymore, but providing an IEEE compatible treatment of denormals (which basically means that computation is made by the scalar fpu). In other words, Accelerate would always turn the VE's java Mode to ON, and it would NOT turn the mode back to the original one.

In my case, I could get back to close the previous performance by just explicitly turning java mode off after each call to accelerate (as the rest of my code was hitting denormals more often than the BLAS calls).

Hope this helps;

Serge.

PS : https://developer.apple.com/samplecode/vDSPExamples/ listing2.html explains how to turn java mode ON/OFF
Also one can look at :
http://developer.apple.com/documentation/Performance/Conceptual/ Accelerate_sse_migration/migration_sse_translation/ chapter_4_section_2.html


In this latter one, the text mentions that by default G5 (I presume also G4 ?) have the default of handling denormals to OFF. Indeed this is a bit misleading in the sense that this default will be changed as soon as you call BLAS/LAPACK from Accelerate (as much as I experienced).

Le 28 nov. 07 à 20:32, Tim Schmielau a écrit :

After upgrading my iBook G4 from 10.3.9 to 10.5.1 (and XCode from 1.5 to 3.0) I noticed that my application's performance, which depends almost exclusively on cblas_sgemv, has decreased by about a factor of 10.

This is about the same factor that the benefit of using VecLib's AltiVec enabled implementation was in the first time. In some (rare) cases I had been able to regain the performance by switching to a different SDK, but usually after a few compiles I'm back at the slow speed.

Once compiled the application always runs at the same (fast or slow) speed. I've checked that all arrays are fully aligned even in the slow version.

My guess would be that sometimes a non-AltiVec enables BLAS library gets compiled in - but where does it come from?

Any advice would be appreciated.
Tim


_______________________________________________ Do not post admin requests to the list. They will be ignored. Scitech mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/scitech/email@hidden

This email sent to email@hidden

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin)

iD8DBQFHTpkj5EPeG5y7WPsRAp24AKCfrCPiP0hHYTgDsf8V4YpGVxtXcwCeNrrx
WdKAFDtGEWzP5hR86k4Jzxc=
=Ujbi
-----END PGP SIGNATURE----- _______________________________________________
Do not post admin requests to the list. They will be ignored.
Scitech mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/scitech/email@hidden

This email sent to email@hidden
References: 
 >[apple scitech] SGEMV slow in Leopard? (From: Tim Schmielau <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.