From e1d72679ea86ad1c5b590b631e910779c40d52e5 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Thu, 23 Aug 2018 16:22:50 +0200 Subject: [PATCH] FIxup --- python/dune/perftool/sumfact/vectorization.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/dune/perftool/sumfact/vectorization.py b/python/dune/perftool/sumfact/vectorization.py index d98ba5e7..6e228abe 100644 --- a/python/dune/perftool/sumfact/vectorization.py +++ b/python/dune/perftool/sumfact/vectorization.py @@ -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]) -- GitLab