Skip to content

Commit

Permalink
Delete old benchmark system
Browse files Browse the repository at this point in the history
Deleted old benchmark system and replaced with most up to date one
which uses googlebench.
Changes to CMakeLists were carried accordingly.
Deleted section in documentation on legacy benchmark system.
  • Loading branch information
joanaxcruz committed Oct 18, 2024
1 parent f95a6c8 commit dcc1cf4
Show file tree
Hide file tree
Showing 21 changed files with 2 additions and 1,815 deletions.
79 changes: 0 additions & 79 deletions docs/4-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,85 +92,6 @@ In some cases, it is desirable to fix the last few coefficients to values like

Finding a set of good parameters is not a straightforward process.

<h2 id="benchmark-legacy">Legacy Benchmarking tool</h2>

SLEEF has a tool for measuring and plotting execution time of each function in
the library. It consists of an executable for measurements, a makefile for
driving measurement and plotting, and a couple of scripts.

In order to start a measurement, you need to first build the executable for
measurement. CMake builds the executable along with the library. Please refer
to [compiling and installing the library](../1-user-guide) for this.

Then, change directory to `sleef/src/libm-benchmarks/`. You also need to set
the build directory to `BUILDDIR` environment variable. You also need Java
runtime environment.

```sh
export BUILDDIR=$PATH:`pwd`/../../build
```

Type "make measure". After compiling the tools, it will prompt a label for
measurement. After you input a label, measurement begins. After a measurement
finishes, you can repeat measurements under different configurations. If you
want to measure on a different computer, please copy the entire directory on to
that computer and continue measurements. If you have Intel Compiler installed
on your computer, you can type "make measureSVML" to measure the computation
time of SVML functions.

```sh
make measure
./measure.sh benchsleef
...
Enter label of measurement(e.g. My desktop PC) : Skylake
Measurement in progress. This may take several minutes.
Sleef_sind2_u10
Sleef_cosd2_u10
Sleef_tand2_u10
Sleef_sincosd2_u10
...
Sleef_atanf8_u10
Sleef_atan2f8_u10
Sleef_atanf8_u35
Sleef_atan2f8_u35

Now, you can plot the results of measurement by 'make plot'.
You can do another measurement by 'make measure'.
You can start over by 'make restart'.
```

Then type `make plot` to generate graphs.
```sh
make plot
javac ProcessData.java
java ProcessData *dptrig*.out
gnuplot script.out
mv output.png trigdp.png
java ProcessData *dpnontrig*.out
gnuplot script.out
mv output.png nontrigdp.png
java ProcessData *sptrig*.out
gnuplot script.out
mv output.png trigsp.png
java ProcessData *spnontrig*.out
gnuplot script.out
mv output.png nontrigsp.png
```

You need to have JDK and gnuplot installed on your computer.
Install these with:
```sh
sudo apt install openjdk-19-jdk-headless
```
and
```sh
sudo apt install gnuplot
```

Four graphs are generated : trigdp.png, nontrigdp.png, trigsp.png
and nontrigsp.png. Please see our [benchmark results](../5-performance/) for
an example of generated graphs by this tool.

<h2 id="benchmark">Benchmarking tool</h2>

This tool uses the [googlebench](https://github.com/google/benchmark) framework to benchmark SLEEF
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()
add_subdirectory("common")

if (SLEEF_BUILD_BENCH)
add_subdirectory("benchmarks")
add_subdirectory("libm-benchmarks")
endif()

if (SLEEF_BUILD_DFT)
Expand Down
File renamed without changes.
153 changes: 0 additions & 153 deletions src/libm-benchmarks/Makefile

This file was deleted.

Loading

0 comments on commit dcc1cf4

Please sign in to comment.