Skip to content

Commit

Permalink
Merge pull request #59 from xdslproject/emilien/inplace
Browse files Browse the repository at this point in the history
Bump to xDSL supporting inplace bufferization
  • Loading branch information
georgebisbas authored Aug 30, 2024
2 parents 261b3b6 + b099001 commit 9f76499
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-lit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install requirements and xDSL
run: |
pip install git+https://github.com/xdslproject/xdsl@bd700e9665c040d478a4f3bfa286ede66216b5ed
pip install git+https://github.com/xdslproject/xdsl@48b530615ab877e980d1f6339c18e63970011311
pip install -e .[tests]
- name: Execute lit tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-mlir-mpi-openmp.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@bd700e9665c040d478a4f3bfa286ede66216b5ed
pip install git+https://github.com/xdslproject/xdsl@48b530615ab877e980d1f6339c18e63970011311
- name: Test with MPI + openmp
run: |
Expand Down
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@bd700e9665c040d478a4f3bfa286ede66216b5ed
pip install git+https://github.com/xdslproject/xdsl@48b530615ab877e980d1f6339c18e63970011311
- name: Test with MPI - no Openmp
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-mlir-openmp.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@bd700e9665c040d478a4f3bfa286ede66216b5ed
pip install git+https://github.com/xdslproject/xdsl@48b530615ab877e980d1f6339c18e63970011311
- name: Test no-MPI, Openmp
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 @@ -35,7 +35,7 @@ jobs:
- name: Install requirements and xDSL
run: |
pip install -e .[tests]
pip install git+https://github.com/xdslproject/xdsl@bd700e9665c040d478a4f3bfa286ede66216b5ed
pip install git+https://github.com/xdslproject/xdsl@48b530615ab877e980d1f6339c18e63970011311
- name: Test no-MPI, no-Openmp
run: |
Expand Down
1 change: 0 additions & 1 deletion tests/test_xdsl_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,6 @@ def test_function_III():
assert np.isclose(norm(v), devito_norm_v)


@pytest.mark.xfail(reason="Operation does not verify: Cannot Load and Store the same field!") # noqa
def test_function_IV():
# Define a Devito Operator with multiple eqs
grid = Grid(shape=(4, 4))
Expand Down
18 changes: 16 additions & 2 deletions tests/test_xdsl_op_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,23 @@ def test_symbol_I():
assert type(ops[0] == Return)


# This test should fail, as we are trying to use an inplace operation
def test_inplace_I():
# Define a simple Devito Operator
grid = Grid(shape=(3, 3))
u = TimeFunction(name="u", grid=grid, time_order=2)

u.data[:] = 0.0001

eq0 = Eq(u, u + 2)

xdsl_op = Operator([eq0], opt="xdsl")
xdsl_op.apply(time_M=5, dt=0.1)


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

0 comments on commit 9f76499

Please sign in to comment.