Skip to content

Commit

Permalink
Litlle dictionary fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Aug 21, 2024
1 parent ef1fbf5 commit 6e0673c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 2 additions & 3 deletions devito/ir/xdsl_iet/cluster_to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,12 @@ def build_stencil_step(self, dim: SteppingDimension, eq: LoweredEq) -> None:

lb = stencil.IndexAttr.get(*([0] * len(shape)))
ub = stencil.IndexAttr.get(*shape)

store = stencil.StoreOp.get(
apply.res[0],
self.function_values[self.out_time_buffer],
self.block_args[self.out_time_buffer],
stencil.StencilBoundsAttr(zip(lb, ub)),
)
load = stencil.LoadOp.get(self.function_values[self.out_time_buffer])
load = stencil.LoadOp.get(self.block_args[self.out_time_buffer])
load.res.name_hint = f"{write_function.name}_t{self.out_time_buffer[1]}_temp" # noqa
self.temps[self.out_time_buffer] = load.res

Expand Down
3 changes: 0 additions & 3 deletions tests/test_xdsl_op_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ def test_symbol_I():
assert ops[0].result.name_hint == a.name
assert type(ops[0] == Return)


# This test should fail, as we are trying to use an inplace operation
@pytest.mark.xfail(reason="Cannot store to a field that is loaded from")
def test_inplace():
# Define a simple Devito Operator
grid = Grid(shape=(3, 3))
Expand Down

0 comments on commit 6e0673c

Please sign in to comment.