Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hercules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
Hercules
Commits
4cf9d708
Commit
4cf9d708
authored
1 month ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
cleanup srad bench
parent
65a5416a
No related branches found
No related tags found
1 merge request
!215
Large benches
Pipeline
#202046
passed
1 month ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
juno_samples/rodinia/srad/benches/srad_bench.rs
+32
-30
32 additions, 30 deletions
juno_samples/rodinia/srad/benches/srad_bench.rs
with
32 additions
and
30 deletions
juno_samples/rodinia/srad/benches/srad_bench.rs
+
32
−
30
View file @
4cf9d708
#![feature(concat_idents)]
use
criterion
::{
criterion_group
,
criterion_main
,
Criterion
};
use
hercules_rt
::{
runner
,
HerculesImmBox
,
HerculesImmBoxTo
,
HerculesMutBox
,
HerculesMutBoxTo
};
use
hercules_rt
::{
runner
,
HerculesMutBox
,
HerculesMutBoxTo
};
juno_build
::
juno!
(
"srad"
);
...
...
@@ -11,35 +11,37 @@ fn srad_bench(c: &mut Criterion) {
let
mut
group
=
c
.benchmark_group
(
"srad bench"
);
group
.sample_size
(
10
);
let
mut
r
=
runner!
(
srad
);
let
niter
=
30
;
let
lambda
=
0.5
;
let
nrows
=
2048
;
let
ncols
=
2048
;
let
image
=
"data/image.pgm"
.to_string
();
let
Image
{
image
:
image_ori
,
max
,
rows
:
image_ori_rows
,
cols
:
image_ori_cols
,
}
=
read_graphics
(
image
);
let
image
=
resize
(
&
image_ori
,
image_ori_rows
,
image_ori_cols
,
nrows
,
ncols
);
let
mut
image_h
=
HerculesMutBox
::
from
(
image
.clone
());
group
.bench_function
(
"srad bench large"
,
|
b
|
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
nrows
as
u64
,
ncols
as
u64
,
niter
as
u64
,
image_h
.to
(),
max
,
lambda
,
)
.await
});
})
});
let
mut
bench
=
|
name
,
niter
,
nrows
,
ncols
|
{
let
mut
r
=
runner!
(
srad
);
let
lambda
=
0.5
;
let
image
=
"data/image.pgm"
.to_string
();
let
Image
{
image
:
image_ori
,
max
,
rows
:
image_ori_rows
,
cols
:
image_ori_cols
,
}
=
read_graphics
(
image
);
let
image
=
resize
(
&
image_ori
,
image_ori_rows
,
image_ori_cols
,
nrows
,
ncols
);
let
mut
image_h
=
HerculesMutBox
::
from
(
image
.clone
());
group
.bench_function
(
name
,
|
b
|
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
nrows
as
u64
,
ncols
as
u64
,
niter
as
u64
,
image_h
.to
(),
max
,
lambda
,
)
.await
});
})
});
};
bench
(
"srad bench small"
,
100
,
512
,
512
);
bench
(
"srad bench large"
,
30
,
2048
,
2048
);
}
criterion_group!
(
benches
,
srad_bench
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment