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
1dd164a4
Commit
1dd164a4
authored
3 weeks ago
by
Aaron Councilman
Browse files
Options
Downloads
Patches
Plain Diff
Fix cfd bench
parent
cdcc0afd
No related branches found
No related tags found
1 merge request
!208
IP SROA Parameters
Pipeline
#201960
failed
3 weeks ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
juno_samples/rodinia/cfd/benches/cfd_bench.rs
+76
-46
76 additions, 46 deletions
juno_samples/rodinia/cfd/benches/cfd_bench.rs
with
76 additions
and
46 deletions
juno_samples/rodinia/cfd/benches/cfd_bench.rs
+
76
−
46
View file @
1dd164a4
...
@@ -28,40 +28,55 @@ fn cfd_bench(c: &mut Criterion) {
...
@@ -28,40 +28,55 @@ fn cfd_bench(c: &mut Criterion) {
elements_surrounding_elements
,
elements_surrounding_elements
,
normals
,
normals
,
}
=
read_domain_geometry
(
data_file
,
block_size
);
}
=
read_domain_geometry
(
data_file
,
block_size
);
let
mut
variables
=
initialize_variables
(
nelr
,
ff_variable
.as_slice
());
let
mut
variables
=
initialize_variables
(
nelr
,
&
ff_variable
);
let
mut
variables
=
HerculesMutBox
::
from
(
variables
.as_mut_slice
());
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
areas
=
HerculesImmBox
::
from
(
areas
.as_slice
());
let
elements_surrounding_elements
=
let
elements_surrounding_elements
=
HerculesImmBox
::
from
(
elements_surrounding_elements
.as_slice
());
HerculesImmBox
::
from
(
elements_surrounding_elements
.as_slice
());
let
normals
=
HerculesImmBox
::
from
(
normals
.as_slice
());
let
ff_variable
=
HerculesImmBox
::
from
(
ff_variable
.as_slice
());
let
normals_x
=
HerculesImmBox
::
from
(
normals
.x
.as_slice
());
let
ff_fc_density_energy
=
vec!
[
let
normals_y
=
HerculesImmBox
::
from
(
normals
.y
.as_slice
());
ff_fc_density_energy
.x
,
let
normals_z
=
HerculesImmBox
::
from
(
normals
.z
.as_slice
());
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
());
group
.bench_function
(
"cfd bench euler"
,
|
b
|
{
group
.bench_function
(
"cfd bench euler"
,
|
b
|
{
b
.iter
(||
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
r
.run
(
nelr
as
u64
,
nelr
as
u64
,
iterations
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
(),
areas
.to
(),
elements_surrounding_elements
.to
(),
elements_surrounding_elements
.to
(),
normals
.to
(),
normals_x
.to
(),
ff_variable
.to
(),
normals_y
.to
(),
ff_fc_density_energy
.to
(),
normals_z
.to
(),
ff_fc_momentum_x
.to
(),
ff_variable
.density
,
ff_fc_momentum_y
.to
(),
ff_variable
.momentum.x
,
ff_fc_momentum_z
.to
(),
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
.await
});
});
...
@@ -85,40 +100,55 @@ fn cfd_bench(c: &mut Criterion) {
...
@@ -85,40 +100,55 @@ fn cfd_bench(c: &mut Criterion) {
elements_surrounding_elements
,
elements_surrounding_elements
,
normals
,
normals
,
}
=
read_domain_geometry
(
data_file
,
block_size
);
}
=
read_domain_geometry
(
data_file
,
block_size
);
let
mut
variables
=
initialize_variables
(
nelr
,
ff_variable
.as_slice
());
let
mut
variables
=
initialize_variables
(
nelr
,
&
ff_variable
);
let
mut
variables
=
HerculesMutBox
::
from
(
variables
.as_mut_slice
());
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
areas
=
HerculesImmBox
::
from
(
areas
.as_slice
());
let
elements_surrounding_elements
=
let
elements_surrounding_elements
=
HerculesImmBox
::
from
(
elements_surrounding_elements
.as_slice
());
HerculesImmBox
::
from
(
elements_surrounding_elements
.as_slice
());
let
normals
=
HerculesImmBox
::
from
(
normals
.as_slice
());
let
ff_variable
=
HerculesImmBox
::
from
(
ff_variable
.as_slice
());
let
normals_x
=
HerculesImmBox
::
from
(
normals
.x
.as_slice
());
let
ff_fc_density_energy
=
vec!
[
let
normals_y
=
HerculesImmBox
::
from
(
normals
.y
.as_slice
());
ff_fc_density_energy
.x
,
let
normals_z
=
HerculesImmBox
::
from
(
normals
.z
.as_slice
());
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
());
group
.bench_function
(
"cfd bench pre-euler"
,
|
b
|
{
group
.bench_function
(
"cfd bench pre-euler"
,
|
b
|
{
b
.iter
(||
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
r
.run
(
nelr
as
u64
,
nelr
as
u64
,
iterations
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
(),
areas
.to
(),
elements_surrounding_elements
.to
(),
elements_surrounding_elements
.to
(),
normals
.to
(),
normals_x
.to
(),
ff_variable
.to
(),
normals_y
.to
(),
ff_fc_density_energy
.to
(),
normals_z
.to
(),
ff_fc_momentum_x
.to
(),
ff_variable
.density
,
ff_fc_momentum_y
.to
(),
ff_variable
.momentum.x
,
ff_fc_momentum_z
.to
(),
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
.await
});
});
...
...
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