Skip to content
Snippets Groups Projects
Commit 393e1fd6 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Update all instructions in collect_rotate (independent of processing order)

parent 56997384
No related branches found
No related tags found
No related merge requests found
...@@ -153,7 +153,6 @@ def collect_vector_data_rotate(knl): ...@@ -153,7 +153,6 @@ def collect_vector_data_rotate(knl):
if isinstance(insn, lp.Assignment): if isinstance(insn, lp.Assignment):
assignee = prim.Subscript(prim.Variable(arrname), get_quantity_subscripts(insn.assignee) + (prim.Variable('rotate_index'),)) assignee = prim.Subscript(prim.Variable(arrname), get_quantity_subscripts(insn.assignee) + (prim.Variable('rotate_index'),))
new_insns.append(insn.copy(assignee=assignee, new_insns.append(insn.copy(assignee=assignee,
expression=substitute(insn.expression, replacemap_arr),
depends_on=insn.depends_on.union(frozenset({lp.match.Tagged("sumfact_stage1")})), depends_on=insn.depends_on.union(frozenset({lp.match.Tagged("sumfact_stage1")})),
) )
) )
...@@ -236,6 +235,8 @@ def collect_vector_data_rotate(knl): ...@@ -236,6 +235,8 @@ def collect_vector_data_rotate(knl):
(vector_indices.get(1), prim.Variable(new_iname)), (vector_indices.get(1), prim.Variable(new_iname)),
) )
new_insns = [i.copy(expression=substitute(i.expression, replacemap_arr)) for i in new_insns]
other_insns = [i for i in knl.instructions if i.id not in [j.id for j in insns + new_insns]] other_insns = [i for i in knl.instructions if i.id not in [j.id for j in insns + new_insns]]
# #
......
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