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
!208
IP SROA Parameters
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
IP SROA Parameters
ip-sroa-params
into
main
Overview
4
Commits
6
Pipelines
6
Changes
8
1 unresolved thread
Hide all comments
Merged
rarbore2
requested to merge
ip-sroa-params
into
main
3 weeks ago
Overview
4
Commits
6
Pipelines
6
Changes
1
1 unresolved thread
Hide all comments
Expand
Break up products in parameters to functions, not just return values.
TODO: Fix CFD test to not use products in Rust interface.
0
0
Merge request reports
Compare
version 4
version 5
1dd164a4
2 weeks ago
version 4
cdcc0afd
2 weeks ago
version 3
f3ddf1d2
3 weeks ago
version 2
263b2e0c
3 weeks ago
version 1
ff03fe68
3 weeks ago
main (base)
and
version 5
latest version
5fb96a38
6 commits,
2 weeks ago
version 5
1dd164a4
5 commits,
2 weeks ago
version 4
cdcc0afd
4 commits,
2 weeks ago
version 3
f3ddf1d2
3 commits,
3 weeks ago
version 2
263b2e0c
2 commits,
3 weeks ago
version 1
ff03fe68
1 commit,
3 weeks ago
Show latest version
1 file
+
76
−
46
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
juno_samples/rodinia/cfd/benches/cfd_bench.rs
+
76
−
46
Options
@@ -28,40 +28,55 @@ fn cfd_bench(c: &mut Criterion) {
elements_surrounding_elements
,
normals
,
}
=
read_domain_geometry
(
data_file
,
block_size
);
let
mut
variables
=
initialize_variables
(
nelr
,
ff_variable
.as_slice
());
let
mut
variables
=
HerculesMutBox
::
from
(
variables
.as_mut_slice
());
let
mut
variables
=
initialize_variables
(
nelr
,
&
ff_variable
);
let
mut
v_density
=
HerculesMutBox
::
from
(
variables
.density
.as_mut_slice
());
let
mut
v_momentum_x
=
HerculesMutBox
::
from
(
variables
.momentum.x
.as_mut_slice
());
let
mut
v_momentum_y
=
HerculesMutBox
::
from
(
variables
.momentum.y
.as_mut_slice
());
let
mut
v_momentum_z
=
HerculesMutBox
::
from
(
variables
.momentum.z
.as_mut_slice
());
let
mut
v_energy
=
HerculesMutBox
::
from
(
variables
.energy
.as_mut_slice
());
let
areas
=
HerculesImmBox
::
from
(
areas
.as_slice
());
let
elements_surrounding_elements
=
HerculesImmBox
::
from
(
elements_surrounding_elements
.as_slice
());
let
normals
=
HerculesImmBox
::
from
(
normals
.as_slice
());
let
ff_variable
=
HerculesImmBox
::
from
(
ff_variable
.as_slice
());
let
ff_fc_density_energy
=
vec!
[
ff_fc_density_energy
.x
,
ff_fc_density_energy
.y
,
ff_fc_density_energy
.z
,
];
let
ff_fc_density_energy
=
HerculesImmBox
::
from
(
ff_fc_density_energy
.as_slice
());
let
ff_fc_momentum_x
=
vec!
[
ff_fc_momentum_x
.x
,
ff_fc_momentum_x
.y
,
ff_fc_momentum_x
.z
];
let
ff_fc_momentum_x
=
HerculesImmBox
::
from
(
ff_fc_momentum_x
.as_slice
());
let
ff_fc_momentum_y
=
vec!
[
ff_fc_momentum_y
.x
,
ff_fc_momentum_y
.y
,
ff_fc_momentum_y
.z
];
let
ff_fc_momentum_y
=
HerculesImmBox
::
from
(
ff_fc_momentum_y
.as_slice
());
let
ff_fc_momentum_z
=
vec!
[
ff_fc_momentum_z
.x
,
ff_fc_momentum_z
.y
,
ff_fc_momentum_z
.z
];
let
ff_fc_momentum_z
=
HerculesImmBox
::
from
(
ff_fc_momentum_z
.as_slice
());
let
normals_x
=
HerculesImmBox
::
from
(
normals
.x
.as_slice
());
let
normals_y
=
HerculesImmBox
::
from
(
normals
.y
.as_slice
());
let
normals_z
=
HerculesImmBox
::
from
(
normals
.z
.as_slice
());
group
.bench_function
(
"cfd bench euler"
,
|
b
|
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
nelr
as
u64
,
iterations
as
u64
,
variables
.to
(),
v_density
.to
(),
v_momentum_x
.to
(),
v_momentum_y
.to
(),
v_momentum_z
.to
(),
v_energy
.to
(),
areas
.to
(),
elements_surrounding_elements
.to
(),
normals
.to
(),
ff_variable
.to
(),
ff_fc_density_energy
.to
(),
ff_fc_momentum_x
.to
(),
ff_fc_momentum_y
.to
(),
ff_fc_momentum_z
.to
(),
normals_x
.to
(),
normals_y
.to
(),
normals_z
.to
(),
ff_variable
.density
,
ff_variable
.momentum.x
,
ff_variable
.momentum.y
,
ff_variable
.momentum.z
,
ff_variable
.energy
,
ff_fc_density_energy
.x
,
ff_fc_density_energy
.y
,
ff_fc_density_energy
.z
,
ff_fc_momentum_x
.x
,
ff_fc_momentum_x
.y
,
ff_fc_momentum_x
.z
,
ff_fc_momentum_y
.x
,
ff_fc_momentum_y
.y
,
ff_fc_momentum_y
.z
,
ff_fc_momentum_z
.x
,
ff_fc_momentum_z
.y
,
ff_fc_momentum_z
.z
,
)
.await
});
@@ -85,40 +100,55 @@ fn cfd_bench(c: &mut Criterion) {
elements_surrounding_elements
,
normals
,
}
=
read_domain_geometry
(
data_file
,
block_size
);
let
mut
variables
=
initialize_variables
(
nelr
,
ff_variable
.as_slice
());
let
mut
variables
=
HerculesMutBox
::
from
(
variables
.as_mut_slice
());
let
mut
variables
=
initialize_variables
(
nelr
,
&
ff_variable
);
let
mut
v_density
=
HerculesMutBox
::
from
(
variables
.density
.as_mut_slice
());
let
mut
v_momentum_x
=
HerculesMutBox
::
from
(
variables
.momentum.x
.as_mut_slice
());
let
mut
v_momentum_y
=
HerculesMutBox
::
from
(
variables
.momentum.y
.as_mut_slice
());
let
mut
v_momentum_z
=
HerculesMutBox
::
from
(
variables
.momentum.z
.as_mut_slice
());
let
mut
v_energy
=
HerculesMutBox
::
from
(
variables
.energy
.as_mut_slice
());
let
areas
=
HerculesImmBox
::
from
(
areas
.as_slice
());
let
elements_surrounding_elements
=
HerculesImmBox
::
from
(
elements_surrounding_elements
.as_slice
());
let
normals
=
HerculesImmBox
::
from
(
normals
.as_slice
());
let
ff_variable
=
HerculesImmBox
::
from
(
ff_variable
.as_slice
());
let
ff_fc_density_energy
=
vec!
[
ff_fc_density_energy
.x
,
ff_fc_density_energy
.y
,
ff_fc_density_energy
.z
,
];
let
ff_fc_density_energy
=
HerculesImmBox
::
from
(
ff_fc_density_energy
.as_slice
());
let
ff_fc_momentum_x
=
vec!
[
ff_fc_momentum_x
.x
,
ff_fc_momentum_x
.y
,
ff_fc_momentum_x
.z
];
let
ff_fc_momentum_x
=
HerculesImmBox
::
from
(
ff_fc_momentum_x
.as_slice
());
let
ff_fc_momentum_y
=
vec!
[
ff_fc_momentum_y
.x
,
ff_fc_momentum_y
.y
,
ff_fc_momentum_y
.z
];
let
ff_fc_momentum_y
=
HerculesImmBox
::
from
(
ff_fc_momentum_y
.as_slice
());
let
ff_fc_momentum_z
=
vec!
[
ff_fc_momentum_z
.x
,
ff_fc_momentum_z
.y
,
ff_fc_momentum_z
.z
];
let
ff_fc_momentum_z
=
HerculesImmBox
::
from
(
ff_fc_momentum_z
.as_slice
());
let
normals_x
=
HerculesImmBox
::
from
(
normals
.x
.as_slice
());
let
normals_y
=
HerculesImmBox
::
from
(
normals
.y
.as_slice
());
let
normals_z
=
HerculesImmBox
::
from
(
normals
.z
.as_slice
());
group
.bench_function
(
"cfd bench pre-euler"
,
|
b
|
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
nelr
as
u64
,
iterations
as
u64
,
variables
.to
(),
v_density
.to
(),
v_momentum_x
.to
(),
v_momentum_y
.to
(),
v_momentum_z
.to
(),
v_energy
.to
(),
areas
.to
(),
elements_surrounding_elements
.to
(),
normals
.to
(),
ff_variable
.to
(),
ff_fc_density_energy
.to
(),
ff_fc_momentum_x
.to
(),
ff_fc_momentum_y
.to
(),
ff_fc_momentum_z
.to
(),
normals_x
.to
(),
normals_y
.to
(),
normals_z
.to
(),
ff_variable
.density
,
ff_variable
.momentum.x
,
ff_variable
.momentum.y
,
ff_variable
.momentum.z
,
ff_variable
.energy
,
ff_fc_density_energy
.x
,
ff_fc_density_energy
.y
,
ff_fc_density_energy
.z
,
ff_fc_momentum_x
.x
,
ff_fc_momentum_x
.y
,
ff_fc_momentum_x
.z
,
ff_fc_momentum_y
.x
,
ff_fc_momentum_y
.y
,
ff_fc_momentum_y
.z
,
ff_fc_momentum_z
.x
,
ff_fc_momentum_z
.y
,
ff_fc_momentum_z
.z
,
)
.await
});
Loading