From ac5d6bddb1fcdb7418b0a31a590af13b4cf9f1c2 Mon Sep 17 00:00:00 2001 From: Emilien Bauer Date: Fri, 6 Oct 2023 17:06:58 +0100 Subject: [PATCH] Update to xDSL main. (Modulo deprecated calls) --- devito/ir/ietxdsl/cluster_to_ssa.py | 2 +- devito/ir/ietxdsl/iet_ssa.py | 6 +++--- requirements.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/devito/ir/ietxdsl/cluster_to_ssa.py b/devito/ir/ietxdsl/cluster_to_ssa.py index 80b169d14e..7eb048ea3c 100644 --- a/devito/ir/ietxdsl/cluster_to_ssa.py +++ b/devito/ir/ietxdsl/cluster_to_ssa.py @@ -184,7 +184,7 @@ def _visit_math_nodes(self, node: Expr) -> SSAValue: else: raise ValueError("Expected float or int as pow args!") - op = op_cls.get(base, ex) + op = op_cls(base, ex) self.block.add_op(op) return op.result diff --git a/devito/ir/ietxdsl/iet_ssa.py b/devito/ir/ietxdsl/iet_ssa.py index 1dcb65fb81..a3cc049175 100644 --- a/devito/ir/ietxdsl/iet_ssa.py +++ b/devito/ir/ietxdsl/iet_ssa.py @@ -364,7 +364,7 @@ class For(IRDLOperation): subindices: IntAttr = attr_def(IntAttr) - properties: ArrayAttr[builtin.StringAttr] = attr_def(ArrayAttr[builtin.StringAttr]) + props: ArrayAttr[builtin.StringAttr] = attr_def(ArrayAttr[builtin.StringAttr]) pragmas: ArrayAttr[builtin.StringAttr] = attr_def(ArrayAttr[builtin.StringAttr]) def subindice_ssa_vals(self) -> tuple[SSAValue, ...]: @@ -380,7 +380,7 @@ def parallelism_property(self) -> str | None: Return either "parallel" or "sequential" (or None), depending on the properties present """ - for attr in self.properties.data: + for attr in self.props.data: if attr.data in ('parallel', 'sequential'): return attr.data return None @@ -405,7 +405,7 @@ def get( for i in range(subindices): body.blocks[0].args[i+1].name_hint = f"{loop_var_name[0]}{i}" - return For.build( + return For( operands=[lb, ub, step], attributes={ 'subindices': IntAttr(subindices), diff --git a/requirements.txt b/requirements.txt index b138a80c3e..1bd5684937 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,5 +18,5 @@ distributed<2022.10 pytest>=3.6,<8.0 pytest-runner pytest-cov -xdsl>=0.11 +git+https://github.com/xdslproject/xdsl.git@138298bdaaf44e54d07cf905615936f90b050a12 frozenlist<=1.4