From 398e0c31e9d54e8fb352154ca76046cc32b18e39 Mon Sep 17 00:00:00 2001 From: Brant-Skywalker Date: Thu, 12 Sep 2024 21:07:20 -0500 Subject: [PATCH] add some doc --- example/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 example/README.md diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..aef0a41 --- /dev/null +++ b/example/README.md @@ -0,0 +1,18 @@ +# A simple end-to-end test of FPOpt + +## Output programs + +* `example.exe`: a program with the original function called multiple times with inputs randomly sampled from preconditions in FPBench +* `example-logged.exe`: a program that outputs a profile that contains gradient and value information, with inputs randomly sampled from preconditions in FPBench +* `example-fpopt.exe`: an optimized version of the program produced by FPOpt. Requires the profile generated by `example-logged.exe`. + +## Important FPOpt flags + +1. `enzyme-enable-fpopt`: Run FPOpt pass +2. `fpopt-enable-herbie`: Generate variants of FP expressions with Herbie :white_check_mark: +3. `fpopt-enable-pt`: Generate variants of FP connected components with precision tuning :point_left: WIP +4. `fpopt-enable-solver`: Use the solver to select desirable rewrite candidates; when disabled, apply all Herbie's top choices +5. `fpopt-solver-type`: Which solver to use ("dp" or "greedy") +6. `fpopt-comp-cost-budget`: The maximum computation cost budget for the solver (default=100000000000) +7. `herbie-disable-taylor`: Disable Herbie's series expansion (try this when the output program exhibits unexpected behaviors, e.g., in LULESH) +