-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
196 lines (132 loc) · 6.1 KB
/
README
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
* * * * * * * * * * *
* PolyBench-3.2-3AC *
* * * * * * * * * * *
Original Polybench
-------------------
Copyright (c) 2011-2012 the Ohio State University.
Contact: Louis-Noel Pouchet <[email protected]>
Derived Polybench
------------------
Polybench-3AC 3.2 is created by manually transforming each kernel
in the original Polybench 3.2 into three-address-code.
Contact: Baghdadi Riyadh <baghdadi.mr [AT] gmail.com>
----------------
* Mailing lists:
----------------
---------------------------------------------
-----------------------
* Available benchmarks:
-----------------------
::linear-algebra::
linear-algebra/kernels:
linear-algebra/kernels/2mm/2mm.c
linear-algebra/kernels/3mm/3mm.c
linear-algebra/kernels/atax/atax.c
linear-algebra/kernels/bicg/bicg.c
linear-algebra/kernels/cholesky/cholesky.c
linear-algebra/kernels/doitgen/doitgen.c
linear-algebra/kernels/gemm/gemm.c
linear-algebra/kernels/gemver/gemver.c
linear-algebra/kernels/gesummv/gesummv.c
linear-algebra/kernels/mvt/mvt.c
linear-algebra/kernels/symm/symm.c
linear-algebra/kernels/syr2k/syr2k.c
linear-algebra/kernels/syrk/syrk.c
linear-algebra/kernels/trisolv/trisolv.c
linear-algebra/kernels/trmm/trmm.c
linear-algebra/solvers:
linear-algebra/solvers/durbin/durbin.c
linear-algebra/solvers/dynprog/dynprog.c
linear-algebra/solvers/gramschmidt/gramschmidt.c
linear-algebra/solvers/lu/lu.c
linear-algebra/solvers/ludcmp/ludcmp.c
::datamining::
datamining/correlation/correlation.c
datamining/covariance/covariance.c
::medley::
medley/floyd-warshall/floyd-warshall.c
medley/reg_detect/reg_detect.c
::stencils::
stencils/adi/adi.c
stencils/fdtd-2d/fdtd-2d.c
stencils/fdtd-apml/fdtd-apml.c
stencils/jacobi-1d-imper/jacobi-1d-imper.c
stencils/jacobi-2d-imper/jacobi-2d-imper.c
stencils/seidel-2d/seidel-2d.c
------------------------------
* Sample compilation commands:
------------------------------
** To compile a benchmark without any monitoring:
-------------------------------------------------
$> gcc -I utilities -I linear-algebra/kernels/atax utilities/polybench.c linear-algebra/kernels/atax/atax.c -o atax_base
** To compile a benchmark with execution time reporting:
--------------------------------------------------------
$> gcc -O3 -I utilities -I linear-algebra/kernels/atax utilities/polybench.c linear-algebra/kernels/atax/atax.c -DPOLYBENCH_TIME -o atax_time
** To generate the reference output of a benchmark:
---------------------------------------------------
$> gcc -O0 -I utilities -I linear-algebra/kernels/atax utilities/polybench.c linear-algebra/kernels/atax/atax.c -DPOLYBENCH_DUMP_ARRAYS -o atax_ref
$> ./atax_ref 2>atax_ref.out
-------------------------
* Some available options:
-------------------------
They are all passed as macro definitions during compilation time (e.g,
-Dname_of_the_option).
- POLYBENCH_TIME: output execution time (gettimeofday) [default: off]
- POLYBENCH_NO_FLUSH_CACHE: don't flush the cache before calling the
timer [default: flush the cache]
- POLYBENCH_LINUX_FIFO_SCHEDULER: use FIFO real-time scheduler for the
kernel execution, the program must be run as root, under linux only,
and compiled with -lc [default: off]
- POLYBENCH_CACHE_SIZE_KB: cache size to flush, in kB [default: 33MB]
- POLYBENCH_STACK_ARRAYS: use stack allocation instead of malloc [default: off]
- POLYBENCH_DUMP_ARRAYS: dump all live-out arrays on stderr [default: off]
- POLYBENCH_CYCLE_ACCURATE_TIMER: Use Time Stamp Counter to monitor
the execution time of the kernel [default: off]
- POLYBENCH_PAPI: turn on papi timing (see below).
- MINI_DATASET, SMALL_DATASET, STANDARD_DATASET, LARGE_DATASET,
EXTRALARGE_DATASET: set the dataset size to be used
[default: STANDARD_DATASET]
- POLYBENCH_USE_C99_PROTO: Use standard C99 prototype for the functions.
- POLYBENCH_USE_SCALAR_LB: Use scalar loop bounds instead of parametric ones.
---------------
* PAPI support:
---------------
** To compile a benchmark with PAPI support:
--------------------------------------------
$> gcc -O3 -I utilities -I linear-algebra/kernels/atax utilities/polybench.c linear-algebra/kernels/atax/atax.c -DPOLYBENCH_PAPI -lpapi -o atax_papi
** To specify which counter(s) to monitor:
------------------------------------------
Edit utilities/papi_counters.list, and add 1 line per event to
monitor. Each line (including the last one) must finish with a ',' and
both native and standard events are supported.
The whole kernel is run one time per counter (no multiplexing) and
there is no sampling being used for the counter value.
------------------------------
* Accurate performance timing:
------------------------------
With kernels that have an execution time in the orders of a few tens
of milliseconds, it is critical to validate any performance number by
repeating several times the experiment. A companion script is
available to perform reasonable performance measurement of a PolyBench.
$> gcc -O3 -I utilities -I linear-algebra/kernels/atax utilities/polybench.c linear-algebra/kernels/atax/atax.c -DPOLYBENCH_TIME -o atax_time
$> ./utilities/time_benchmark.sh ./atax_time
This script will run five times the benchmark (that must be a
PolyBench compiled with -DPOLYBENCH_TIME), eliminate the two extremal
times, and check that the deviation of the three remaining does not
exceed a given threshold, set to 5%.
It is also possible to use POLYBENCH_CYCLE_ACCURATE_TIMER to use the
Time Stamp Counter instead of gettimeofday() to monitor the number of
elapsed cycles.
----------------------------------------
* Generating macro-free benchmark suite:
----------------------------------------
(from the root of the archive:)
$> PARGS="-I utilities -DPOLYBENCH_TIME";
$> for i in `cat utilities/benchmark_list`; do create_cpped_version.sh $i "$PARGS"; done
This create for each benchmark file 'xxx.c' a new file
'xxx.preproc.c'. The PARGS variable in the above example can be set to
the desired configuration, for instance to create a full C99 version
(parametric arrays):
$> PARGS="-I utilities -DPOLYBENCH_USE_C99_PROTO";
$> for i in `cat utilities/benchmark_list`; do ./utilities/create_cpped_version.sh "$i" "$PARGS"; done