2023-01-13 12:34:03 |
Robert Schiele |
bug |
|
|
added bug |
2023-01-13 12:34:03 |
Robert Schiele |
attachment added |
|
proposed fix https://bugs.launchpad.net/bugs/2002810/+attachment/5641184/+files/0001-tests-incompatible-with-FTZ-and-DAZ.patch |
|
2023-01-13 21:30:23 |
Robert Schiele |
tags |
review |
arch-x86 floating-point review |
|
2023-01-30 08:49:55 |
Robert Schiele |
description |
A new feature of gcc on Intel platforms is to enable the FTZ and DAZ
features available on modern Intel CPUs. Those features convert
denormal floating point values to zero to avoid expensive and slow
exception handling inside the CPU. Details can be found at
https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/floating-point-operations/set-the-ftz-and-daz-flags.html
Some Linux distributions now started to make this flag the compiler
default and build the standard runtime libraries with this switch
turned on. On those systems test cases that rely on handling such
denormal values will fail. Compiling sbcl with this feature explicitly
turned off is not preventing this problem from happening since we use
functions from libm that is built with this switch turned on and as such
will apply the conversions nevertheless to our surprise.
We would have two options here:
1. We mark those test cases to be expected to fail on Intel
architectures and accept the fact that this feature might be turned
on. This is what is implemented in this patch.
2. Explicitly turn the feature off for the sbcl build _and_ replace all
math functions from the C standard library with our own copy compiled
with the feature turned off. |
A feature of gcc on Intel platforms is to enable the FTZ and DAZ
features available on modern Intel CPUs. Those features convert
denormal floating point values to zero to avoid expensive and slow
exception handling inside the CPU. Details can be found at
https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/floating-point-operations/set-the-ftz-and-daz-flags.html
Some Linux distributions now started to make this flag the compiler
default and build the standard runtime libraries with this switch
turned on. On those systems the definition of least-*-*-float evaluates
to zero, no longer adhering to their specification, and as such failing
test cases relying on them. Compiling sbcl with this compiler feature
explicitly turned off is not preventing this problem from happening
since we use functions from libm that is built with this switch turned
on and as such will apply the conversions nevertheless to our surprise.
Therefore this introduces a new feature "denormals" that by default is
turned on but can be disabled on systems with that behavior or do not
support denormals for other reasons. The definitions of least-*-*-float
are adapted accordingly.
In the future, we could add a config test to detect such systems
automatically and disable the feature automatically. |
|
2023-01-30 08:50:16 |
Robert Schiele |
summary |
tests incompatible with FTZ and DAZ |
handle systems that do not support denormalized floats |
|
2023-01-30 08:51:16 |
Robert Schiele |
attachment added |
|
0001-handle-systems-that-do-not-support-denormalized-floa.patch https://bugs.launchpad.net/sbcl/+bug/2002810/+attachment/5643952/+files/0001-handle-systems-that-do-not-support-denormalized-floa.patch |
|
2023-01-30 08:53:50 |
Robert Schiele |
tags |
arch-x86 floating-point review |
floating-point review |
|
2023-01-30 12:20:55 |
Robert Schiele |
description |
A feature of gcc on Intel platforms is to enable the FTZ and DAZ
features available on modern Intel CPUs. Those features convert
denormal floating point values to zero to avoid expensive and slow
exception handling inside the CPU. Details can be found at
https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/floating-point-operations/set-the-ftz-and-daz-flags.html
Some Linux distributions now started to make this flag the compiler
default and build the standard runtime libraries with this switch
turned on. On those systems the definition of least-*-*-float evaluates
to zero, no longer adhering to their specification, and as such failing
test cases relying on them. Compiling sbcl with this compiler feature
explicitly turned off is not preventing this problem from happening
since we use functions from libm that is built with this switch turned
on and as such will apply the conversions nevertheless to our surprise.
Therefore this introduces a new feature "denormals" that by default is
turned on but can be disabled on systems with that behavior or do not
support denormals for other reasons. The definitions of least-*-*-float
are adapted accordingly.
In the future, we could add a config test to detect such systems
automatically and disable the feature automatically. |
A feature of gcc on Intel platforms is to enable the FTZ and DAZ
features available on modern Intel CPUs. Those features convert
denormal floating point values to zero to avoid expensive and slow
exception handling inside the CPU. Details can be found at
https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/compiler-reference/floating-point-operations/set-the-ftz-and-daz-flags.html
Some Linux distributions now started to make this flag the compiler
default and build the standard runtime libraries with this switch
turned on. On those systems the definition of least-*-*-float evaluates
to zero, no longer adhering to their specification, and as such failing
test cases relying on them. Compiling sbcl with this compiler feature
explicitly turned off is not preventing this problem from happening
since we use functions from libm that is built with this switch turned
on and as such will apply the conversions nevertheless to our surprise.
Therefore this introduces a new feature "normalize-float" for systems
with that behavior. This automatically gets switched on by an automated
test. The test is designed to detect similar behavior also on non-Intel
systems. The definitions of least-*-*-float are adapted accordingly. |
|
2023-01-30 12:21:41 |
Robert Schiele |
attachment added |
|
0001-handle-systems-that-do-not-support-denormalized-floa.patch https://bugs.launchpad.net/sbcl/+bug/2002810/+attachment/5643975/+files/0001-handle-systems-that-do-not-support-denormalized-floa.patch |
|
2023-02-01 09:46:22 |
Robert Schiele |
attachment added |
|
0001-handle-systems-that-do-not-support-denormalized-floa.patch https://bugs.launchpad.net/sbcl/+bug/2002810/+attachment/5644258/+files/0001-handle-systems-that-do-not-support-denormalized-floa.patch |
|
2023-04-21 20:33:26 |
Robert Schiele |
attachment added |
|
0001-handle-systems-that-do-not-support-denormalized-floa.patch https://bugs.launchpad.net/sbcl/+bug/2002810/+attachment/5666553/+files/0001-handle-systems-that-do-not-support-denormalized-floa.patch |
|
2023-05-10 17:10:01 |
Robert Schiele |
bug |
|
|
added subscriber Christophe Rhodes |