Skip to content
Snippets Groups Projects
Commit 4500a35b authored by René Heß's avatar René Heß
Browse files

Instruction dependenci for setup

parent 70cc6a68
No related branches found
No related tags found
No related merge requests found
...@@ -64,14 +64,16 @@ def start_sumfactorization(element, container, restriction, component): ...@@ -64,14 +64,16 @@ def start_sumfactorization(element, container, restriction, component):
lfs = name_lfs(element, restriction, component) lfs = name_lfs(element, restriction, component)
coeff = pymbolic_coefficient(container, lfs, basisiname) coeff = pymbolic_coefficient(container, lfs, basisiname)
assignee = Subscript(Variable(inp), (Variable(basisiname),)) assignee = Subscript(Variable(inp), (Variable(basisiname),))
instruction(assignee = assignee, from dune.perftool.loopy.stages import stage_insn
expression = coeff, insn_dep = instruction(assignee = assignee,
) expression = coeff,
depends_on = frozenset({stage_insn(0)}),
)
return sum_factorization_kernel(a_matrices, inp, "buffer") return sum_factorization_kernel(a_matrices, inp, "buffer", insn_dep)
def sum_factorization_kernel(a_matrices, inp, buffer, stage=0): def sum_factorization_kernel(a_matrices, inp, buffer, insn_dep):
""" """
Calculate a sum factorization matrix product. Calculate a sum factorization matrix product.
...@@ -88,10 +90,6 @@ def sum_factorization_kernel(a_matrices, inp, buffer, stage=0): ...@@ -88,10 +90,6 @@ def sum_factorization_kernel(a_matrices, inp, buffer, stage=0):
buffer: A string identifying the flip flop buffer in use buffer: A string identifying the flip flop buffer in use
for intermediate results. for intermediate results.
""" """
# Get the stage instruction
from dune.perftool.loopy.stages import stage_insn
insn_dep = stage_insn(stage)
for l, a_matrix in enumerate(a_matrices): for l, a_matrix in enumerate(a_matrices):
# Get a temporary that interprets the base storage of the input # Get a temporary that interprets the base storage of the input
# as a column-major matrix. In later iteration of the amatrix loop # as a column-major matrix. In later iteration of the amatrix loop
......
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