Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to xDSL supporting inplace bufferization #59

Merged
merged 13 commits into from
Aug 30, 2024
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@c0bd8d3fb67b63950601a43b0779d2c35e29f3b7
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@c0bd8d3fb67b63950601a43b0779d2c35e29f3b7

- 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@c0bd8d3fb67b63950601a43b0779d2c35e29f3b7

- 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@c0bd8d3fb67b63950601a43b0779d2c35e29f3b7

- 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@c0bd8d3fb67b63950601a43b0779d2c35e29f3b7

- 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)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add tests remider


# 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():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably no meaning for this

# Define a simple Devito Operator
grid = Grid(shape=(3, 3))
u = TimeFunction(name='u', grid=grid, time_order=2)
Expand Down