From 855c689fd72a087f99c83280a992fbcf2c301247 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Fri, 23 Mar 2018 15:01:03 +0100 Subject: [PATCH] pep8 --- python/dune/perftool/loopy/target.py | 4 ++-- python/dune/perftool/sumfact/accumulation.py | 9 +++++---- python/dune/perftool/sumfact/geometry.py | 2 +- python/dune/perftool/sumfact/realization.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/python/dune/perftool/loopy/target.py b/python/dune/perftool/loopy/target.py index 5afce149..b718c2c6 100644 --- a/python/dune/perftool/loopy/target.py +++ b/python/dune/perftool/loopy/target.py @@ -191,7 +191,7 @@ class DuneASTBuilder(CASTBuilder): size = [] for t in temps: if isinstance(t, DuneTemporaryVariable) and t.custom_base_storage == bs: - #TODO Extract alignment from the temporaries after switching to loopy 2018.1 + # TODO Extract alignment from the temporaries after switching to loopy 2018.1 alignment.append(get_option("max_vector_width") // 8) from pytools import product size.append(product(t.shape)) @@ -200,7 +200,7 @@ class DuneASTBuilder(CASTBuilder): size = max(size) size = round_to_multiple(size, alignment) - decl = "char {}[{}] __attribute__ ((aligned({})));".format(bs, size * 8, alignment) + decl = "char {}[{}] __attribute__ ((aligned({})));".format(bs, size * 8, alignment) ret.append(cgen.Line(decl)) if self.target.declare_temporaries: diff --git a/python/dune/perftool/sumfact/accumulation.py b/python/dune/perftool/sumfact/accumulation.py index dd760508..d576562e 100644 --- a/python/dune/perftool/sumfact/accumulation.py +++ b/python/dune/perftool/sumfact/accumulation.py @@ -450,11 +450,12 @@ def generate_accumulation_instruction(expr, visitor): # Write timing stuff for jacobian (for alpha methods it is done at the end of stage 1) timer_dep = frozenset() if get_option("instrumentation_level") >= 4: - timer_name ="{}_kernel_stage1".format(assembler_routine_name()) + timer_name = "{}_kernel_stage1".format(assembler_routine_name()) timer_dep = frozenset({instruction(code="HP_TIMER_STOP({});".format(timer_name), - depends_on=frozenset({lp.match.Tagged("sumfact_stage1"), 'hptimerstart_{}'.format(timer_name)}), - id="hptimerstop_{}".format(timer_name) - )}) + depends_on=frozenset({lp.match.Tagged("sumfact_stage1"), 'hptimerstart_{}'.format(timer_name)}), + id="hptimerstop_{}".format(timer_name) + )} + ) timer_name = '{}_kernel_quadratureloop'.format(assembler_routine_name()) post_include('HP_DECLARE_TIMER({});'.format(timer_name), filetag='operatorfile') dump_accumulate_timer(timer_name) diff --git a/python/dune/perftool/sumfact/geometry.py b/python/dune/perftool/sumfact/geometry.py index 97256886..d0e96c00 100644 --- a/python/dune/perftool/sumfact/geometry.py +++ b/python/dune/perftool/sumfact/geometry.py @@ -41,7 +41,7 @@ class GeoCornersInput(SumfactKernelInputBase, ImmutableRecord): def realize(self, sf, index, insn_dep): from dune.perftool.sumfact.realization import name_buffer_storage - name = name="input_{}".format(sf.buffer) + name = "input_{}".format(sf.buffer) temporary_variable(name, shape=(2 ** local_dimension(), sf.vector_width), custom_base_storage=name_buffer_storage(sf.buffer, 0), diff --git a/python/dune/perftool/sumfact/realization.py b/python/dune/perftool/sumfact/realization.py index ee7ff4d7..23284ffd 100644 --- a/python/dune/perftool/sumfact/realization.py +++ b/python/dune/perftool/sumfact/realization.py @@ -368,7 +368,7 @@ def realize_sumfact_kernel_function(sf): # cache_key_generator=lambda s, **kw: s.cache_key) # def old_realize_sum_factorization_kernel(sf): # insn_dep = sf.insn_dep -# +# # # Measure times and count operations in c++ code # if get_option("instrumentation_level") >= 4: # if sf.stage == 1: -- GitLab