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
Merge requests
!190
Set up cava benchmark
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Set up cava benchmark
cava_opt_3
into
main
Overview
0
Commits
16
Pipelines
12
Changes
2
Merged
rarbore2
requested to merge
cava_opt_3
into
main
1 month ago
Overview
0
Commits
16
Pipelines
12
Changes
2
Expand
Set up cava benchmark w/ criterion.
GPU schedule for cava.
Convert a bunch of benchmarks from using hercules refs to use hercules boxes.
Define
AlignedAlloc
global allocator in
hercules_rt
that aligns everything to 32 bytes.
Bump nom version.
Edited
1 month ago
by
rarbore2
0
0
Merge request reports
Viewing commit
74aedc81
Prev
Next
Show latest version
2 files
+
155
−
133
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
74aedc81
use criterion to benchmark cava
· 74aedc81
Russel Arbore
authored
1 month ago
juno_samples/cava/benches/cava_bench.rs
+
68
−
13
Options
#![feature(concat_idents)]
use
criterion
::{
criterion_group
,
criterion_main
,
Criterion
};
use
juno_cava
::{
cava_harness
,
CavaInputs
};
use
hercules_rt
::{
runner
,
HerculesImmBoxTo
};
use
juno_cava
::
*
;
juno_build
::
juno!
(
"cava"
);
fn
cava_bench
(
c
:
&
mut
Criterion
)
{
let
mut
group
=
c
.benchmark_group
(
"cava bench"
);
group
.sample_size
(
10
);
let
args
=
CavaInputs
{
input
:
"examples/raw_tulip-small.bin"
.to_string
(),
output
:
None
,
verify
:
false
,
output_verify
:
None
,
cam_model
:
"cam_models/NikonD7000"
.to_string
(),
crop_rows
:
Some
(
144
),
crop_cols
:
Some
(
192
),
};
let
(
raw_image
,
cam_model
)
=
make_raw_image_and_cam_model
(
&
args
);
let
(
rows
,
cols
,
num_ctrl_pts
,
image
,
tstw
,
ctrl_pts
,
weights
,
coefs
,
tonemap
)
=
prepare_hercules_inputs
(
&
raw_image
,
&
cam_model
);
let
mut
r
=
runner!
(
cava
);
group
.bench_function
(
"cava bench small"
,
|
b
|
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
r
.run
(
rows
as
u64
,
cols
as
u64
,
num_ctrl_pts
as
u64
,
image
.to
(),
tstw
.to
(),
ctrl_pts
.to
(),
weights
.to
(),
coefs
.to
(),
tonemap
.to
(),
));
})
});
let
args
=
CavaInputs
{
input
:
"examples/raw_tulips.bin"
.to_string
(),
output
:
None
,
verify
:
true
,
output_verify
:
None
,
cam_model
:
"cam_models/NikonD7000"
.to_string
(),
crop_rows
:
None
,
crop_cols
:
None
,
};
let
(
raw_image
,
cam_model
)
=
make_raw_image_and_cam_model
(
&
args
);
let
(
rows
,
cols
,
num_ctrl_pts
,
image
,
tstw
,
ctrl_pts
,
weights
,
coefs
,
tonemap
)
=
prepare_hercules_inputs
(
&
raw_image
,
&
cam_model
);
let
mut
r
=
runner!
(
cava
);
fn
cava_bench_small
(
c
:
&
mut
Criterion
)
{
c
.bench_function
(
"cava_bench_small"
,
|
b
|
{
group
.bench_function
(
"cava bench full"
,
|
b
|
{
b
.iter
(||
{
cava_harness
(
CavaInputs
{
input
:
"examples/raw_tulip-small.bin"
.to_string
(),
output
:
None
,
verify
:
false
,
output_verify
:
None
,
cam_model
:
"cam_models/NikonD7000"
.to_string
(),
crop_rows
:
Some
(
144
),
crop_cols
:
Some
(
192
),
})
async_std
::
task
::
block_on
(
r
.run
(
rows
as
u64
,
cols
as
u64
,
num_ctrl_pts
as
u64
,
image
.to
(),
tstw
.to
(),
ctrl_pts
.to
(),
weights
.to
(),
coefs
.to
(),
tonemap
.to
(),
));
})
});
}
criterion_group!
(
benches
,
cava_bench
_small
);
criterion_group!
(
benches
,
cava_bench
);
criterion_main!
(
benches
);
Loading