diff --git a/python/dune/perftool/sumfact/accumulation.py b/python/dune/perftool/sumfact/accumulation.py index 6b1972a201e43320102211691a64292d53057174..d24e100c29725f2beb27aca5fa6483afeb553aeb 100644 --- a/python/dune/perftool/sumfact/accumulation.py +++ b/python/dune/perftool/sumfact/accumulation.py @@ -59,12 +59,6 @@ def accum_iname(restriction, bound, i): return sumfact_iname(bound, "accum") -def name_test_function_contribution(test): - count = get_counter('sumfact_contribution_counter') - grad = "grad_" if test.reference_grad else "" - return restricted_name("contrib_{}phi_{}".format(grad, str(count)), test.restriction) - - @backend(interface="accum_insn", name="sumfact") def generate_accumulation_instruction(visitor, accterm, measure, subdomain_id): # When doing sumfactorization we want to split the test function @@ -148,7 +142,7 @@ def generate_accumulation_instruction(visitor, accterm, measure, subdomain_id): temp = get_buffer_temporary(buffer, shape=vsf.quadrature_shape, dim_tags=vsf.quadrature_dimtags, - name=vsf.input, + name="input_{}".format(buffer), ) # Those input fields, that are padded need to be set to zero diff --git a/python/dune/perftool/sumfact/realization.py b/python/dune/perftool/sumfact/realization.py index de5e61f055683fbf081b3f2225004dda6189aa5f..4ff4dfb4c4d4873641a67090d637fcd7a912252f 100644 --- a/python/dune/perftool/sumfact/realization.py +++ b/python/dune/perftool/sumfact/realization.py @@ -64,12 +64,11 @@ def _realize_sum_factorization_kernel(sf): # Set up the input for stage 1 if sf.stage == 1 and not get_option("fastdg"): assert sf.coeff_func - assert sf.input is not None # Get the input temporary! input_setup = get_buffer_temporary(sf.buffer, shape=sf.flat_input_shape, - name=sf.input + name="input_{}".format(sf.buffer) ) def _write_input(inputsf, index=0): @@ -113,7 +112,7 @@ def _realize_sum_factorization_kernel(sf): else: _write_input(sf) - insn_dep = insn_dep.union(frozenset({lp.match.Writes(sf.input)})) + insn_dep = insn_dep.union(frozenset({lp.match.Writes("input_{}".format(sf.buffer))})) # Construct the direct_input for the FastDG case direct_input = None diff --git a/python/dune/perftool/sumfact/symbolic.py b/python/dune/perftool/sumfact/symbolic.py index e4188107250743b123baf0a14417dea86e95a0b2..b254d5c66904566353c55c49ab23d5dbb9b2292b 100644 --- a/python/dune/perftool/sumfact/symbolic.py +++ b/python/dune/perftool/sumfact/symbolic.py @@ -26,7 +26,6 @@ class SumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable): preferred_position=None, restriction=0, within_inames=(), - input=None, insn_dep=frozenset(), coeff_func=None, coeff_func_index=None, @@ -94,7 +93,6 @@ class SumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable): preferred_position: Will be used in the dry run to order kernels when doing vectorization e.g. (dx u,dy u,dz u, u). restriction: Restriction for faces values. - input: The name to use for the input temporary padding: a set of slots in the input temporary to be padded index: The slot in the input temporary dedicated to this kernel coeff_func: The function to call to get the input coefficient @@ -291,7 +289,6 @@ class VectorizedSumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable) horizontal_width=1, vertical_width=1, buffer=None, - input=None, insn_dep=frozenset(), ): # Assert the input data structure @@ -321,7 +318,6 @@ class VectorizedSumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable) kernels=kernels, horizontal_width=horizontal_width, buffer=buffer, - input=input, insn_dep=insn_dep, vertical_width=vertical_width, ) @@ -329,14 +325,14 @@ class VectorizedSumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable) prim.Variable.__init__(self, "VecSUMFAC") def __getinitargs__(self): - return (self.kernels, self.horizontal_width, self.vertical_width, self.buffer, self.input, self.insn_dep) + return (self.kernels, self.horizontal_width, self.vertical_width, self.buffer, self.insn_dep) def stringifier(self): return lp.symbolic.StringifyMapper mapper_method = "map_vectorized_sumfact_kernel" - init_arg_names = ("kernels", "horizontal_width", "vertical_width", "buffer", "input", "insn_dep") + init_arg_names = ("kernels", "horizontal_width", "vertical_width", "buffer", "insn_dep") # # Some cache key definitions diff --git a/python/dune/perftool/sumfact/vectorization.py b/python/dune/perftool/sumfact/vectorization.py index 6900885499385a62fc9dbca9d1e9adac7e444551..bdaa5bd76b93666b2d2fb4cdf87fb80a516c0f1f 100644 --- a/python/dune/perftool/sumfact/vectorization.py +++ b/python/dune/perftool/sumfact/vectorization.py @@ -36,8 +36,7 @@ def attach_vectorization_info(sf): def no_vec(sf): - return sf.copy(buffer=get_counted_variable("buffer"), - input=get_counted_variable("input")) + return sf.copy(buffer=get_counted_variable("buffer")) def no_vectorization(sumfacts): @@ -75,10 +74,8 @@ def vertical_vectorization_strategy(sumfact, depth): if isinstance(sumfact, SumfactKernel): buffer = get_counted_variable("vertical_buffer") - input = get_counted_variable("vertical_input") result[sumfact] = VectorizedSumfactKernel(kernels=tuple(newkernels), buffer=buffer, - input=input, vertical_width=depth, ) else: @@ -118,14 +115,12 @@ def horizontal_vectorization_strategy(sumfacts, width, allow_padding=1): kernels = tuple(kernels) buffer = get_counted_variable("joined_buffer") - input = get_counted_variable("joined_input") for sumf in kernels: if len(kernels) in range(width - allow_padding, width + 1): result[sumf] = VectorizedSumfactKernel(kernels=kernels, horizontal_width=width, buffer=buffer, - input=input, ) return result