FPBench includes a filtering tool, an FPCore reference interpreter, an accuracy measurement tool, and an exporter to C.
The filter script is located in the tools directory of the FPBench codebase.
The filter script reads a sequence of FPCore benchmarks from the standard input and writes to standard output those that satisfy a predicate:
racket tools/filter.rkt field value < file.fpcore
The -v or --invert flag can be passed before the field to invert the predicate.
The supported fields are:
:citefield is a list that includes the value.
letare considered operators.
operationis a synonym for
operatorsexamine the operators used in a benchmark, they filter by fairly different predicates.
The filter script's intended use is in selecting a supported subset of the FPBench benchmark suite. For example, to select all benchmarks that do not use loops or conditionals:
cat benchmarks/*.fpcore | racket tools/filter.rkt --invert operator while | racket tools/filter.rkt --invert operator if
The reference interpreter is located in the tools/ directory of the FPBench codebase, and can be run with:
racket tools/fpcore.rkt arguments ... < file.fpcore
The arguments in this case are real numbers using the standard floating-point number syntax. For example, running:
racket tools/fpcore.rkt 1.0 2.0 (FPCore (x y) (+ x y))
nearbyint functions are not yet supported by the reference interpreter.
FPBench provides a tool to measure the accuracy of FPCore programs. This tool serves as a reference implementation for the Measures 1.0 standard, and uses statistical techniques to measure average forward error. Scaling and non-scaling error are both supported.
To measure the accuracy of an FPCore program, run:
racket tools/sample-accuracy.rkt < file.fpcore
The accuracy of each FPCore expression in the file will be printed to the screen. The accuracy measure and measurement technique can be configured: