Skip to content

Commit

Permalink
ci: xfail more
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Nov 14, 2023
1 parent e7c64e8 commit 64c7a9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
4 changes: 3 additions & 1 deletion tests/test_xdsl_op_correctness.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import numpy as np
from devito import Grid, TimeFunction, Eq, Operator, XDSLOperator, norm
import pytest
# flake8: noqa

@pytest.mark.xfail(reason="Deprecated, will be dropped")
def test_udx_conversion():

# Define a simple Devito Operator
Expand Down Expand Up @@ -35,13 +37,13 @@ def test_u_plus1_conversion():

u.data[:] = 0
xdsl_op = XDSLOperator([eq])
xdsl_op.__class__ = XDSLOperator
xdsl_op.apply(time_M=5)
norm2 = norm(u)

assert np.isclose(norm1, norm2, atol=1e-5, rtol=0)
assert np.isclose(norm1, 23.43075, atol=1e-5, rtol=0)

@pytest.mark.xfail(reason="Deprecated, will be dropped")
def test_u_and_v_conversion():
# Define a simple Devito Operator
grid = Grid(shape=(3, 3))
Expand Down
8 changes: 1 addition & 7 deletions tests/test_xdsl_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ def test_create_xdsl_operator():
u = TimeFunction(name='u', grid=grid)
eq = Eq(u.forward, u.dx)
xdsl_op = XDSLOperator([eq])
xdsl_op.__class__ = XDSLOperator
xdsl_op.apply(time_M=5)

op = Operator([eq])
op = XDSLOperator([eq])
op.apply(time_M=5)

print(xdsl_op.ccode)
print(op.ccode)

# assert(str(op.ccode) == xdsl_op.ccode)
12 changes: 5 additions & 7 deletions tests/test_xdsl_parpragma.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
from devito.ir.ietxdsl import *
from xdsl.dialects.builtin import ModuleOp, i32
from xdsl.dialects.arith import Constant
import pytest
from devito.xdslpasses.iet.parpragma import make_simd


@pytest.mark.xfail(reason="Deprecated, will be dropped")
def test_example():
ctx = MLContext()
Builtin(ctx)
iet = IET(ctx)

mod = ModuleOp.from_region_or_ops([
mod = ModuleOp([
Callable.get(
"kernel", ["u"], ["u"], ["struct dataobj*"], ["restrict"], "int", "",
Block.from_callable([i32], lambda u: [
Expand All @@ -32,8 +30,8 @@ def test_example():
Block.
from_callable([i32], lambda y: [
cst1 := Constant.from_int_and_width(1, i32),
x1 := Addi.get(x, cst1),
y1 := Addi.get(y, cst1),
x1 := Addi(x, cst1),
y1 := Addi(y, cst1),
#ut0 := Idx.get(u, t0),
#ut0x1 := Idx.get(ut0, x1),
#ut0x1y1 := Idx.get(ut0x1, y1),
Expand Down

0 comments on commit 64c7a9b

Please sign in to comment.