-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebugtuner-spec.cfg
More file actions
141 lines (116 loc) · 4.52 KB
/
debugtuner-spec.cfg
File metadata and controls
141 lines (116 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# set report label
%define label "%{ENV_SPEC_LABEL}"
# set amount of cpus to use during build
%define build_ncpus 20
# (from config example) check validity of label string
%if %{label} =~ m/ /
% error Your label "%{label}" contains spaces. Please try underscores instead.
%endif
%if %{label} !~ m/^[a-zA-Z0-9._-]+$/
% error Illegal character in label "%{label}". Please use only alphanumerics, underscore, hyphen, and period.
%endif
# set general spec cpu configurations
command_add_redirect = 1
flagsurl = $[top]/config/flags/clang.xml
ignore_errors = 0
iterations = 3
label = %{label}
line_width = 1020
log_line_width = 1020
makeflags = --jobs=%{build_ncpus}
mean_anyway = 1
output_format = txt,csv
preenv = 1
reportable = 0
tune = %{ENV_SPEC_TUNE}
train_with = refrate
# (for run on server with 20 cores 0-19) set amount of copies to run and assign each copy to a specific core
intrate,fprate:
copies = 20
submit = echo "$command" > run.sh ; $BIND bash run.sh
bind0 = taskset -c 0
bind1 = taskset -c 1
bind2 = taskset -c 2
bind3 = taskset -c 3
bind4 = taskset -c 4
bind5 = taskset -c 5
bind6 = taskset -c 6
bind7 = taskset -c 7
bind8 = taskset -c 8
bind9 = taskset -c 9
bind10 = taskset -c 10
bind11 = taskset -c 11
bind12 = taskset -c 12
bind13 = taskset -c 13
bind14 = taskset -c 14
bind15 = taskset -c 15
bind16 = taskset -c 16
bind17 = taskset -c 17
bind18 = taskset -c 18
bind19 = taskset -c 19
# set compiler versions and basic required flags
default:
% define cc_dir %{ENV_SPEC_CC_DIRECTORY}
preENV_LD_LIBRARY_PATH = %{cc_dir}/lib64/:%{cc_dir}/lib/:/lib64
preENV_LD_LIBRARY_PATH = %{cc_dir}/lib64/:%{cc_dir}/lib/:/lib64:%{ENV_LD_LIBRARY_PATH}
SPECCC = %{cc_dir}/bin/
CC = $(SPECCC)%{ENV_SPEC_CC} -std=c99 -m64
CXX = $(SPECCC)%{ENV_SPEC_CXX} -std=c++03 -m64
FC = $(SPECCC)gfortran -m64
CC_VERSION_OPTION = --version
CXX_VERSION_OPTION = --version
FC_VERSION_OPTION = --version
# set benchmarks to be executed
runlist = 500.perlbench_r,502.gcc_r,505.mcf_r,523.xalancbmk_r,525.x264_r,531.deepsjeng_r,541.leela_r,557.xz_r
default:
sw_base_ptrsize = 64-bit
sw_peak_ptrsize = 64-bit
default:
EXTRA_PORTABILITY = -DSPEC_LP64
500.perlbench_r,600.perlbench_s:
%ifdef %{ENV_SPEC_IS_GCC}
PORTABILITY = -DSPEC_LINUX_X64
EXTRA_CFLAGS = -fno-strict-aliasing -fno-unsafe-math-optimizations -fno-finite-math-only
%else
PORTABILITY = -DSPEC_LINUX_X64
%endif
502.gcc_r,602.gcc_s:
PORTABILITY = -fgnu89-inline -fwrapv
521.wrf_r,621.wrf_s:
CPORTABILITY = -DSPEC_CASE_FLAG
FPORTABILITY = -fconvert=big-endian
523.xalancbmk_r,623.xalancbmk_s:
%ifdef %{ENV_SPEC_IS_GCC}
PORTABILITY = -DSPEC_LINUX
%else
PORTABILITY = -DSPEC_LINUX -fdelayed-template-parsing
%endif
525.x264_r,625.x264_s:
PORTABILITY = -gdwarf-4 -fcommon
526.blender_r:
PORTABILITY = -funsigned-char -DSPEC_LINUX
527.cam4_r,627.cam4_s:
PORTABILITY = -DSPEC_CASE_FLAG
628.pop2_s:
CPORTABILITY = -DSPEC_CASE_FLAG
FPORTABILITY = -fconvert=big-endian
intspeed,fpspeed:
EXTRA_OPTIMIZE = -fopenmp -DSPEC_OPENMP
fpspeed:
preENV_OMP_STACKSIZE = 120M
# "base" configuration
default=base:
OPTIMIZE = -g %{ENV_SPEC_CONFIGURATION} -march=native
# "peak" configuration with autofdo
default=peak:
PERF_PROF_DIR = /tmp/profdir
PGOPTIMIZE = -fprofile-sample-use=${PERF_PROF_DIR}/default.prof
CREATE_LLVM_PROF_PATH = %{ENV_SPEC_AUTOFDO_VERSION}/create_llvm_prof
clean_perf_profiles = rm -rf ${PERF_PROF_DIR}; mkdir -p ${PERF_PROF_DIR}
merge_autofdo_profiles= llvm-profdata merge --text --sample --output=${PERF_PROF_DIR}/default.prof ${PERF_PROF_DIR}/default.prof.*; cp ${PERF_PROF_DIR}/default.prof %{ENV_SPEC_PROFILES_DIR}/${baseexe}.prof;
PASS2_OPTIMIZE += -g %{ENV_SPEC_CONFIGURATION} -fdebug-info-for-profiling -funique-internal-linkage-names
PASS2_LDFLAGS += -Wl,--build-id=sha1
fdo_pre2 = ${clean_perf_profiles}
fdo_run2 = perf record -j any,u --freq=max -- ${command}; mv perf.data ${PERF_PROF_DIR}; ${CREATE_LLVM_PROF_PATH} --out ${PERF_PROF_DIR}/default.prof."`date +%s`" --binary ${baseexe} --profile "${PERF_PROF_DIR}/perf.data"; rm ${PERF_PROF_DIR}/perf.data
fdo_post2 = ${merge_autofdo_profiles}
PASS3_OPTIMIZE = ${PGOPTIMIZE} -O3