Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
aml
Commits
f99da260
Commit
f99da260
authored
May 01, 2020
by
Florence Monna
Browse files
[benchmarks] the number of times each kernel is executed can now be
entered as an entry variable
parent
f9e809a3
Pipeline
#10498
passed with stages
in 3 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
benchmarks/noprefetch/flat_blas_l1.c
View file @
f99da260
...
...
@@ -58,6 +58,7 @@ int main(int argc, char *argv[])
{
aml_init
(
&
argc
,
&
argv
);
size_t
i
,
j
,
k
;
size_t
nb_reps
;
size_t
memsize
;
double
timing
;
double
dscalar
;
...
...
@@ -71,12 +72,14 @@ int main(int argc, char *argv[])
if
(
argc
==
1
)
{
memsize
=
DEFAULT_ARRAY_SIZE
;
nb_reps
=
NTIMES
;
}
else
{
assert
(
argc
==
2
);
memsize
=
1UL
<<
atoi
(
argv
[
1
]);
nb_reps
=
atoi
(
argv
[
2
]);
}
printf
(
"Each kernel will be executed %d times.
\n
"
,
NTIMES
);
printf
(
"Each kernel will be executed %
l
d times.
\n
"
,
nb_reps
);
#pragma omp parallel
{
...
...
@@ -101,7 +104,7 @@ int main(int argc, char *argv[])
b
=
aml_area_mmap
(
area
,
size
,
NULL
);
c
=
aml_area_mmap
(
area
,
size
,
NULL
);
/* MAIN LOOP - repeat test cases
NTIMES
*/
/* MAIN LOOP - repeat test cases
nb_reps
*/
dscalar
=
3
.
0
;
double
x
=
1
.
0
,
y
=
2
.
0
;
double
param
[
5
];
...
...
@@ -111,7 +114,7 @@ int main(int argc, char *argv[])
param
[
k
]
=
k
;
double
res
;
for
(
k
=
0
;
k
<
NTIMES
;
k
++
)
{
for
(
k
=
0
;
k
<
nb_reps
;
k
++
)
{
// Trying this array of functions thing
for
(
i
=
0
;
i
<
8
;
i
++
)
{
init_arrays
(
memsize
,
a
,
b
,
c
);
...
...
@@ -152,7 +155,7 @@ int main(int argc, char *argv[])
/* SUMMARY */
printf
(
"Function Avg time Min time Max time
\n
"
);
for
(
j
=
0
;
j
<
10
;
j
++
)
{
avgtime
[
j
]
=
avgtime
[
j
]
/
(
double
)(
NTIMES
-
1
);
avgtime
[
j
]
=
avgtime
[
j
]
/
(
double
)(
nb_reps
-
1
);
printf
(
"%s %11.6f %11.6f %11.6f
\n
"
,
label
[
j
],
avgtime
[
j
],
mintime
[
j
],
maxtime
[
j
]);
}
...
...
benchmarks/noprefetch/tiled_blas_l1.c
View file @
f99da260
...
...
@@ -318,6 +318,7 @@ int main(int argc, char *argv[])
{
aml_init
(
&
argc
,
&
argv
);
struct
aml_area
*
area
=
&
aml_area_linux
;
size_t
nb_reps
;
size_t
memsize
,
tilesize
,
ntiles
;
size_t
i
,
j
,
k
;
double
timing
;
...
...
@@ -344,13 +345,15 @@ int main(int argc, char *argv[])
if
(
argc
==
1
)
{
memsize
=
DEFAULT_ARRAY_SIZE
;
tilesize
=
DEFAULT_TILE_SIZE
;
nb_reps
=
NTIMES
;
}
else
{
assert
(
argc
==
3
);
memsize
=
1UL
<<
atoi
(
argv
[
1
]);
tilesize
=
1UL
<<
atoi
(
argv
[
2
]);
nb_reps
=
atoi
(
argv
[
3
]);
}
printf
(
"Each kernel will be executed %d times.
\n
"
,
NTIMES
);
printf
(
"Each kernel will be executed %
l
d times.
\n
"
,
nb_reps
);
#pragma omp parallel
{
...
...
@@ -394,8 +397,8 @@ int main(int argc, char *argv[])
assert
(
ta
!=
NULL
&&
tb
!=
NULL
&&
tc
!=
NULL
);
aml_tiling_dims
(
ta
,
&
ntiles
);
/* MAIN LOOP - repeat test cases
NTIMES
*/
for
(
k
=
0
;
k
<
NTIMES
;
k
++
)
{
/* MAIN LOOP - repeat test cases
nb_reps
*/
for
(
k
=
0
;
k
<
nb_reps
;
k
++
)
{
// Trying this array of functions thing
for
(
i
=
0
;
i
<
8
;
i
++
)
{
init_arrays
(
memsize
,
a
,
b
,
c
);
...
...
@@ -436,7 +439,7 @@ int main(int argc, char *argv[])
/* SUMMARY */
printf
(
"Function Avg time Min time Max time
\n
"
);
for
(
j
=
0
;
j
<
10
;
j
++
)
{
avgtime
[
j
]
=
avgtime
[
j
]
/
(
double
)(
NTIMES
-
1
);
avgtime
[
j
]
=
avgtime
[
j
]
/
(
double
)(
nb_reps
-
1
);
printf
(
"%s %11.6f %11.6f %11.6f
\n
"
,
label
[
j
],
avgtime
[
j
],
mintime
[
j
],
maxtime
[
j
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment