Skip to content

Commit

Permalink
Add copy-out and dealloc.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Jul 31, 2023
1 parent f0b6aca commit b135fba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions devito/ir/ietxdsl/cluster_to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,10 @@ def match_and_rewrite(self, op: iet_ssa.LoadSymbolic, rewriter: PatternRewriter,
incast = builtin.UnrealizedConversionCastOp.get(arg, memref_type)
copy = gpu.MemcpyOp(source=incast, destination=alloc)
body.insert_ops_before([alloc, outcast, incast, copy], body.ops.first)
print(arg)
print(arg.uses)
print(parent)

copy_out = gpu.MemcpyOp(source=alloc, destination=incast)
dealloc = gpu.DeallocOp(alloc)
body.insert_ops_before([copy_out, dealloc], body.ops.last)

op.result.replace_by(args[symb_name])

Expand Down

0 comments on commit b135fba

Please sign in to comment.