|Re: [eigen] Eigen SSE denorm modes?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: Mark Borgerding <mark@xxxxxxxxxxxxxx>
- Subject: Re: [eigen] Eigen SSE denorm modes?
- From: Dick Lyon <dicklyon@xxxxxxxxxx>
- Date: Fri, 9 Mar 2012 12:08:18 -0800
- Cc: eigen@xxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=z3y6Qkv0b8N4qpDrB+BkkSMuVBNkAChCDFs4kKecEkU=; b=Lil5N38IgOOboT4WooWb4kkokvsIsYX24/6O/KODnfzYbrCDnfs7TBGZFzTbf8lEFZ QQRFqiXmjzeWnVjb3QyU4ZLGEm3cWyLKDxbiTVmigDXYu8Ph1bJOrh2Jswwg1sNj9yuY qxF2VI66FSVIOAl7umHQMarpNO7xCaQMNahSCRuuSetVArtYeCl8bl428eoxBa/cQPjH DY+Z+NOmyWTpGe7aE8xqySPvoRuyXe20KL3JAuqeIcgNnx8+JxQSSI61W3F81Lbp6z6e n1lVHF+ntAiVnyAYWfbkhQutMWTdA0oE8V0eD2xvfyDJWZt57/uMciqp/hvsN/6y5y9u AupA==
Thanks, Mark, for the info on the SSE control intrinsics. I presume these are Intel-only; does Eigen has a way to wrap them that doesnt' make the code architecture dependent?
Do these settings have persistent effect? On the processor? or the process? Apple seems to say that you should restore the old control word after doing your thing, but it's not clear to me how this is scoped: https://developer.apple.com/hardwaredrivers/ve/sse.html
On Fri, Mar 9, 2012 at 11:37 AM, Mark Borgerding <mark@xxxxxxxxxxxxxx>
DAZ and FTZ makes a big speedup on intel machines, since handling denormals is really slow (and often only propagates rounding errors).
On 03/08/2012 04:22 PM, Dick Lyon wrote:
Is there a way to control how Eigen deals with denormalized floats?
There are low-level SSE registers to control flushing to zero and such,
but does anyone who how to control them, or what the defaults are?
You can enabling these modes yourself:
_mm_setcsr( _mm_getcsr() | (1<<15)); // FTZ
_mm_setcsr( _mm_getcsr() | (1<<6)); // DAZ