From 64c7a9b62fdf71fac2cc34fea1b7eb3c5d5e7d2c Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Tue, 14 Nov 2023 18:57:13 +0000 Subject: [PATCH] ci: xfail more --- tests/test_xdsl_op_correctness.py | 4 +++- tests/test_xdsl_operator.py | 8 +------- tests/test_xdsl_parpragma.py | 12 +++++------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/tests/test_xdsl_op_correctness.py b/tests/test_xdsl_op_correctness.py index 13850c34aa..8fb45f1eb5 100644 --- a/tests/test_xdsl_op_correctness.py +++ b/tests/test_xdsl_op_correctness.py @@ -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 @@ -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)) diff --git a/tests/test_xdsl_operator.py b/tests/test_xdsl_operator.py index e2622c7075..9af768b3e3 100644 --- a/tests/test_xdsl_operator.py +++ b/tests/test_xdsl_operator.py @@ -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) diff --git a/tests/test_xdsl_parpragma.py b/tests/test_xdsl_parpragma.py index fe133d3645..d3f4b435e8 100644 --- a/tests/test_xdsl_parpragma.py +++ b/tests/test_xdsl_parpragma.py @@ -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: [ @@ -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),