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
e1d72679
Commit
e1d72679
authored
6 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
FIxup
parent
0d78c584
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/perftool/sumfact/vectorization.py
+4
-5
4 additions, 5 deletions
python/dune/perftool/sumfact/vectorization.py
with
4 additions
and
5 deletions
python/dune/perftool/sumfact/vectorization.py
+
4
−
5
View file @
e1d72679
...
...
@@ -89,7 +89,7 @@ def target_costfunction(sf):
# The cost of a kernel is given by the difference to the desired target cost.
# Pitfall: The target cost needs to be weighed to account for this being called
# on subsets and not on a full vectorization strategy!
all_sf
,
_
=
filter_active_inactive_sumfacts
()
_
,
all_sf
,
_
=
filter_active_inactive_sumfacts
()
total
=
len
(
all_sf
)
target
=
float
(
get_form_option
(
"
vectorization_target
"
))
realcost
=
costmodel
(
sf
)
...
...
@@ -169,7 +169,7 @@ def filter_active_inactive_sumfacts():
# All sum factorization kernels that get used
active_sumfacts
=
[
i
for
i
in
all_sumfacts
if
i
.
stage
==
3
or
i
in
basis_sumfacts
]
return
active_sumfacts
,
inactive_sumfacts
return
all_sumfacts
,
active_sumfacts
,
inactive_sumfacts
def
decide_vectorization_strategy
():
...
...
@@ -179,7 +179,7 @@ def decide_vectorization_strategy():
"""
logger
=
logging
.
getLogger
(
__name__
)
active_sumfacts
,
inactive_sumfacts
=
filter_active_inactive_sumfacts
()
all_sumfacts
,
active_sumfacts
,
inactive_sumfacts
=
filter_active_inactive_sumfacts
()
# If no vectorization is needed, abort now
if
get_form_option
(
"
vectorization_strategy
"
)
==
"
none
"
or
(
get_global_context_value
(
"
form_type
"
)
==
"
jacobian
"
and
not
get_form_option
(
"
vectorization_jacobians
"
)):
...
...
@@ -215,8 +215,7 @@ def decide_vectorization_strategy():
sfdict
=
add_to_frozendict
(
sfdict
,
{
sf
:
0
for
sf
in
inactive_sumfacts
})
# Register the results
from
itertools
import
chain
for
sf
in
chain
(
active_sumfacts
,
inactive_sumfacts
):
for
sf
in
all_sumfacts
:
_cache_vectorization_info
(
sf
,
sfdict
[
sf
])
...
...
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