Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
n-io committed Nov 7, 2024
1 parent 587a69f commit 353bbcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xdsl/transforms/csl_stencil_bufferize.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ def match_and_rewrite(self, op: csl_stencil.ApplyOp, rewriter: PatternRewriter,
)
arg_to_tensor = to_tensor_op(arg, writable=True)

# set offset going from a buf with ghost cells to one without, assuming symmetric ghost cells on all sides
symmetric_offsets = tuple(
# offset of core data, assuming symmetric ghost cells in each direction
offsets = tuple(
(src - dst) // 2 # symmetric offset
for src, dst in zip(
arg_t.get_shape(), yld_arg.type.get_shape(), strict=True
Expand All @@ -428,7 +428,7 @@ def match_and_rewrite(self, op: csl_stencil.ApplyOp, rewriter: PatternRewriter,
operands=[arg_to_tensor, [], [], []],
result_types=[yld_arg.op.tensor.type],
properties={
"static_offsets": DenseArrayBase.from_list(i64, symmetric_offsets),
"static_offsets": DenseArrayBase.from_list(i64, offsets),
"static_sizes": DenseArrayBase.from_list(
i64, yld_arg.type.get_shape()
),
Expand Down

0 comments on commit 353bbcb

Please sign in to comment.