Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
24391f12
Commit
24391f12
authored
6 years ago
by
René Heß
Browse files
Options
Downloads
Patches
Plain Diff
Choose vectorization strategy based on cost permuted matrix sequence
parent
8b1b7acd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/dune/codegen/sumfact/symbolic.py
+12
-5
12 additions, 5 deletions
python/dune/codegen/sumfact/symbolic.py
test/sumfact/poisson/poisson_dg_3d.mini
+1
-0
1 addition, 0 deletions
test/sumfact/poisson/poisson_dg_3d.mini
with
13 additions
and
5 deletions
python/dune/codegen/sumfact/symbolic.py
+
12
−
5
View file @
24391f12
...
...
@@ -376,7 +376,10 @@ class SumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable):
@property
def
parallel_key
(
self
):
"""
A key that identifies parallellizable kernels.
"""
return
tuple
(
m
.
basis_size
for
m
in
self
.
permuted_matrix_sequence
)
+
(
self
.
stage
,
self
.
buffer
,
self
.
interface
.
within_inames
)
# TODO: For now we do not vectorize SumfactKernels with different
# quadrature_permutation. This should be handled like upper/lower
# vectorization
return
self
.
quadrature_permutation
+
tuple
(
m
.
basis_size
for
m
in
self
.
permuted_matrix_sequence
)
+
(
self
.
stage
,
self
.
buffer
,
self
.
interface
.
within_inames
)
@property
def
cache_key
(
self
):
...
...
@@ -576,8 +579,10 @@ class SumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable):
def
operations
(
self
):
"""
The total number of floating point operations for the kernel
to be carried out
"""
from
dune.codegen.sumfact.permutation
import
flop_cost
return
flop_cost
(
self
.
permuted_matrix_sequence
)
from
dune.codegen.sumfact.permutation
import
flop_cost
,
sumfact_permutation_strategy
,
permute_forward
perm
=
sumfact_permutation_strategy
(
self
)
permuted_matrix_sequence_cost
=
permute_forward
(
self
.
matrix_sequence
,
perm
)
return
flop_cost
(
permuted_matrix_sequence_cost
)
# Extract the argument list and store it on the class. This needs to be done
...
...
@@ -881,5 +886,7 @@ class VectorizedSumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable)
def
operations
(
self
):
"""
The total number of floating point operations for the kernel
to be carried out
"""
from
dune.codegen.sumfact.permutation
import
flop_cost
return
flop_cost
(
self
.
matrix_sequence
)
from
dune.codegen.sumfact.permutation
import
flop_cost
,
sumfact_permutation_strategy
,
permute_forward
perm
=
sumfact_permutation_strategy
(
self
)
permuted_matrix_sequence_cost
=
permute_forward
(
self
.
matrix_sequence
,
perm
)
return
flop_cost
(
permuted_matrix_sequence_cost
)
This diff is collapsed.
Click to expand it.
test/sumfact/poisson/poisson_dg_3d.mini
+
1
−
0
View file @
24391f12
...
...
@@ -15,6 +15,7 @@ extension = vtu
[formcompiler]
compare_l2errorsquared = 1e-4, 5e-6 | expand deg
debug_interpolate_input = 1
[formcompiler.r]
numerical_jacobian = 1, 0 | expand num
...
...
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