Skip to content
Snippets Groups Projects
Commit e1d72679 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

FIxup

parent 0d78c584
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,7 @@ def target_costfunction(sf): ...@@ -89,7 +89,7 @@ def target_costfunction(sf):
# The cost of a kernel is given by the difference to the desired target cost. # 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 # Pitfall: The target cost needs to be weighed to account for this being called
# on subsets and not on a full vectorization strategy! # 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) total = len(all_sf)
target = float(get_form_option("vectorization_target")) target = float(get_form_option("vectorization_target"))
realcost = costmodel(sf) realcost = costmodel(sf)
...@@ -169,7 +169,7 @@ def filter_active_inactive_sumfacts(): ...@@ -169,7 +169,7 @@ def filter_active_inactive_sumfacts():
# All sum factorization kernels that get used # All sum factorization kernels that get used
active_sumfacts = [i for i in all_sumfacts if i.stage == 3 or i in basis_sumfacts] 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(): def decide_vectorization_strategy():
...@@ -179,7 +179,7 @@ def decide_vectorization_strategy(): ...@@ -179,7 +179,7 @@ def decide_vectorization_strategy():
""" """
logger = logging.getLogger(__name__) 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 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")): 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(): ...@@ -215,8 +215,7 @@ def decide_vectorization_strategy():
sfdict = add_to_frozendict(sfdict, {sf: 0 for sf in inactive_sumfacts}) sfdict = add_to_frozendict(sfdict, {sf: 0 for sf in inactive_sumfacts})
# Register the results # Register the results
from itertools import chain for sf in all_sumfacts:
for sf in chain(active_sumfacts, inactive_sumfacts):
_cache_vectorization_info(sf, sfdict[sf]) _cache_vectorization_info(sf, sfdict[sf])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment