Skip to content

Commit

Permalink
Use memref.atomic_rmw instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed Jun 10, 2024
1 parent 4972b91 commit fad6922
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-mlir-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
pip install -e .[tests]
pip install mpi4py
pip install git+https://github.com/xdslproject/xdsl@210181350d926f91ee5fdb27f0eb5d1cf53a8997
pip install git+https://github.com/xdslproject/xdsl@1ffdc2d9f33a435af7382a668e153fade01a1255
- name: Test with MPI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-mlir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
pip install -e .[tests]
pip install mpi4py
pip install git+https://github.com/xdslproject/xdsl@210181350d926f91ee5fdb27f0eb5d1cf53a8997
pip install git+https://github.com/xdslproject/xdsl@1ffdc2d9f33a435af7382a668e153fade01a1255
- name: Test no-MPI, no-Openmp
run: |
Expand Down
5 changes: 2 additions & 3 deletions devito/ir/ietxdsl/cluster_to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,9 @@ def build_generic_step_expression(self, dim: SteppingDimension, eq: LoweredEq):

match eq.operation:
case None:
pass
memref.Store.get(value, memtemp, ssa_indices)
case OpInc:
value = arith.Addf(value, memref.Load.get(memtemp, ssa_indices).res)
memref.Store.get(value, memtemp, ssa_indices)
memref.AtomicRMWOp(operands=[value, memtemp, ssa_indices], result_types=[value.type], properties={"kind" : builtin.IntegerAttr(0, builtin.i64)})

def build_condition(self, dim: SteppingDimension, eq: BooleanFunction):
return self._visit_math_nodes(dim, eq, None)
Expand Down

0 comments on commit fad6922

Please sign in to comment.