From 293974eab58af69b0919d83383424429332be2eb Mon Sep 17 00:00:00 2001 From: Marcel Koch <marcel.koch@uni-muenster.de> Date: Wed, 10 Jan 2018 09:52:28 +0100 Subject: [PATCH] adjusts evaluate_coefficient* to changes in get_pymbolic_indices and nested basis loops --- python/dune/perftool/pdelab/basis.py | 9 ++++----- python/dune/perftool/pdelab/localoperator.py | 5 ++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/python/dune/perftool/pdelab/basis.py b/python/dune/perftool/pdelab/basis.py index 0c7ab18a..0f5b7f5e 100644 --- a/python/dune/perftool/pdelab/basis.py +++ b/python/dune/perftool/pdelab/basis.py @@ -170,14 +170,13 @@ def evaluate_coefficient(visitor, element, name, container, restriction, index): lfs = name_lfs(element, restriction, index) basis = visitor.interface.pymbolic_basis(sub_element, restriction, 0, context='trial') - basisindex, _ = get_pymbolic_indices(basis) - + basisindex = get_pymbolic_indices(basis)[:-1] if get_option("blockstructured"): from dune.perftool.blockstructured.argument import pymbolic_coefficient coeff = pymbolic_coefficient(container, lfs, sub_element, basisindex) else: from dune.perftool.pdelab.argument import pymbolic_coefficient - coeff = pymbolic_coefficient(container, lfs, basisindex) + coeff = pymbolic_coefficient(container, lfs, basisindex[0]) assignee = Variable(name) @@ -207,7 +206,7 @@ def evaluate_coefficient_gradient(visitor, element, name, container, restriction lfs = name_lfs(element, restriction, index) basis = visitor.interface.pymbolic_reference_gradient(sub_element, restriction, 0, context='trialgrad') - basisindex, _ = get_pymbolic_indices(basis) + basisindex = get_pymbolic_indices(basis)[:-1] from dune.perftool.tools import maybe_wrap_subscript basis = maybe_wrap_subscript(basis, Variable(dimindex)) @@ -216,7 +215,7 @@ def evaluate_coefficient_gradient(visitor, element, name, container, restriction coeff = pymbolic_coefficient(container, lfs, sub_element, basisindex) else: from dune.perftool.pdelab.argument import pymbolic_coefficient - coeff = pymbolic_coefficient(container, lfs, basisindex) + coeff = pymbolic_coefficient(container, lfs, basisindex[0]) assignee = Subscript(Variable(name), (Variable(dimindex),)) diff --git a/python/dune/perftool/pdelab/localoperator.py b/python/dune/perftool/pdelab/localoperator.py index 23c92da1..64a96ed3 100644 --- a/python/dune/perftool/pdelab/localoperator.py +++ b/python/dune/perftool/pdelab/localoperator.py @@ -247,7 +247,7 @@ def determine_accumulation_space(info, number): if get_option("blockstructured"): from dune.perftool.blockstructured.tools import micro_index_to_macro_index from dune.perftool.blockstructured.spaces import lfs_inames - lfsi = micro_index_to_macro_index(subel, lfs_inames(subel, info.restriction, count=number)[0]) + lfsi = micro_index_to_macro_index(subel, lfs_inames(subel, info.restriction, count=number)) else: from dune.perftool.pdelab.spaces import lfs_inames lfsi = Variable(lfs_iname(subel, info.restriction, count=number)) @@ -551,6 +551,8 @@ def extract_kernel_from_cache(tag, wrap_in_cgen=True): from dune.perftool.loopy import heuristic_duplication kernel = heuristic_duplication(kernel) + from dune.perftool.blockstructured.vectorization import vectorize_micro_elements + kernel = vectorize_micro_elements(kernel) # Maybe apply vectorization strategies if get_option("vectorization_quadloop"): if get_option("sumfact"): @@ -569,6 +571,7 @@ def extract_kernel_from_cache(tag, wrap_in_cgen=True): # Do the loopy preprocessing! kernel = preprocess_kernel(kernel) + # *REALLY* ignore boostability. This is - so far - necessary due to a mystery bug. kernel = kernel.copy(instructions=[i.copy(boostable=False, boostable_into=frozenset()) for i in kernel.instructions]) -- GitLab