FLiT (originally named Floating-point Litmus Tester, but is more than that now) is a test infrastructure for detecting and locating varibility in floating-point code caused by variations in compiler code generation, hardware and execution environments. Tests can range from unit tests of functions, to full executbles.
FLiT works by building many versions of the test suite, using multiple C++ compilers, floating-point related settings (i.e. flags) and optimization levels. These tests are then executed and compared against a user-specified trusted baseline compilation. The comparison ‘score’ is collected into a database, along with the other parameters relevant to the execution, such as host, compiler configuration and compiler vendor.
After executing the suite and collecting the data, it is easy to see how results may diverge using only different compiler settings, etc. Also, the developer is able to understand how to configure their build environment for their target architecture(s) such that they can expect consistent floating-point computations. Also, with timing measurements, users can weigh the trade-offs of variability and performance of each of the compiler optimizations.
Once the value-changing optimizations are found, FLiT bisect is able to determine what source file was optimized that induced the value change, and is often able norrow this down to the function level.
It consists of the following components:
FLiT is an open-source tool and can be obtained on GitHub .