diff --git a/.github/workflows/ci-mlir.yml b/.github/workflows/ci-mlir.yml index 6c38f27900..b6d53c19ed 100644 --- a/.github/workflows/ci-mlir.yml +++ b/.github/workflows/ci-mlir.yml @@ -26,7 +26,6 @@ jobs: python-version: ['3.10'] env: - LLVM_SYMBOLIZER_PATH: /usr/lib/llvm-11/bin/llvm-symbolizer MLIR-Version: 04fc02e583b06b846315904a55af9c273c8b20b9 steps: @@ -89,7 +88,6 @@ jobs: -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=OFF \ - -DLLVM_BINUTILS_INCDIR=/usr/include \ -DCMAKE_CXX_FLAGS="-stdlib=libc++" - name: MLIR Build and add to PATH diff --git a/tests/test_xdsl_base.py b/tests/test_xdsl_base.py index 4edeb6364d..36b9def00e 100644 --- a/tests/test_xdsl_base.py +++ b/tests/test_xdsl_base.py @@ -3,8 +3,10 @@ from devito import Grid, TimeFunction, Eq, XDSLOperator, Operator, solve +from xdsl.dialects.scf import For, Yield from xdsl.dialects.arith import Addi -from xdsl.dialects.stencil import FieldType +from xdsl.dialects.func import Call, Return +from xdsl.dialects.stencil import FieldType, ApplyOp, LoadOp, StoreOp from xdsl.dialects.llvm import LLVMPointerType @@ -50,9 +52,22 @@ def test_xdsl_III(): assert type(op._module.regions[0].blocks[0].ops.first.body.blocks[0]._args[1].type) == FieldType assert type(op._module.regions[0].blocks[0].ops.first.body.blocks[0]._args[2].type) == LLVMPointerType - myops = list(op._module.regions[0].blocks[0].ops.first.body.blocks[0].ops) - assert type(myops[5] == Addi) - # import pdb;pdb.set_trace() + ops = list(op._module.regions[0].blocks[0].ops.first.body.blocks[0].ops) + assert type(ops[5] == Addi) + assert type(ops[6] == For) + + scffor_ops = list(ops[6].regions[0].blocks[0].ops) + + assert type(scffor_ops[0]) == LoadOp + assert type(scffor_ops[1]) == ApplyOp + assert type(scffor_ops[2]) == StoreOp + assert type(scffor_ops[3]) == Yield + + assert type(ops[7] == Call) + assert type(ops[8] == StoreOp) + assert type(ops[9] == Return) + + def test_diffusion_2D():