File tree Expand file tree Collapse file tree 3 files changed +42
-8
lines changed Expand file tree Collapse file tree 3 files changed +42
-8
lines changed Original file line number Diff line number Diff line change 1
- build
2
- build_debug
3
- build_script
1
+ build *
4
2
.gdb_history
5
3
outputs
6
4
tags
7
5
compile_commands.json
8
6
.cache
7
+ perf.data *
9
8
* .log
10
9
** /__pycache__
Original file line number Diff line number Diff line change @@ -11,12 +11,21 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
11
11
endif ()
12
12
13
13
include (CheckCXXCompilerFlag )
14
- unset (SIMPLE_FAST_FLOAT_BENCHMARK_COMPILER_SUPPORTS_MARCH_NATIVE CACHE )
15
- CHECK_CXX_COMPILER_FLAG (-march=native SIMPLE_FAST_FLOAT_BENCHMARK_COMPILER_SUPPORTS_MARCH_NATIVE )
16
- if (SIMPLE_FAST_FLOAT_BENCHMARK_COMPILER_SUPPORTS_MARCH_NATIVE )
17
- add_compile_options (-march=native )
14
+ set (SIMPLE_FAST_FLOAT_BENCHMARK_MARCH "" CACHE STRING
15
+ "Set -march value for benchmarks (e.g. native, x86-64-v4, etc)" )
16
+
17
+ if (NOT SIMPLE_FAST_FLOAT_BENCHMARK_MARCH )
18
+ set (_SFF_MARCH_FLAG "-march=native" )
19
+ else ()
20
+ set (_SFF_MARCH_FLAG "-march=${SIMPLE_FAST_FLOAT_BENCHMARK_MARCH} " )
21
+ endif ()
22
+
23
+ CHECK_CXX_COMPILER_FLAG (${_SFF_MARCH_FLAG} _SFF_MARCH_SUPPORTED )
24
+ if (_SFF_MARCH_SUPPORTED )
25
+ add_compile_options (${_SFF_MARCH_FLAG} )
26
+ message (STATUS "Compiling with ${_SFF_MARCH_FLAG} " )
18
27
else ()
19
- message (STATUS "native target not supported" )
28
+ message (STATUS "${_SFF_MARCH_FLAG} not supported, proceeding without -march flag. " )
20
29
endif ()
21
30
22
31
if (NOT CMAKE_BUILD_TYPE AND NOT SANITIZE )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ CPU=$1
4
+ OutputDir=" outputs/${CPU} "
5
+ Algorithms=" schubfach,dragonbox"
6
+
7
+ if [ -z " $1 " ]; then
8
+ echo " Usage: $0 <CPU>"
9
+ exit 1
10
+ fi
11
+
12
+ mkdir -p ${OutputDir}
13
+ for v in x86-64 x86-64-v2 x86-64-v3 x86-64-v4 native; do
14
+ cmake -B build-${v} -DSIMPLE_FAST_FLOAT_BENCHMARK_MARCH=${v}
15
+ cmake --build build-${v}
16
+
17
+ echo " Running benchmarks for ${v} on ${CPU} ..."
18
+ ./build-${v} /benchmarks/benchmark -f data/canada.txt -a ${Algorithms} > ${OutputDir} /${CPU} _g++_canada_none_${v} .raw
19
+ ./build-${v} /benchmarks/benchmark -f data/mesh.txt -a ${Algorithms} > ${OutputDir} /${CPU} _g++_mesh_none_${v} .raw
20
+ ./build-${v} /benchmarks/benchmark -a ${Algorithms} > ${OutputDir} /${CPU} _g++_uniform_01_none_${v} .raw
21
+ done
22
+
23
+ for f in ${OutputDir} /* .raw; do
24
+ python3 scripts/latex_table.py " $f " > " ${f% .raw} .tex"
25
+ echo " Converted $f to ${f% .raw} .tex"
26
+ done
You can’t perform that action at this time.
0 commit comments