From ef9630e626c6d75dd7fdb94a84cdd5a187873246 Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Fri, 17 Nov 2023 17:53:02 +0000 Subject: [PATCH] ci: Use hash origin/devito/backport - 282589 --- .github/workflows/ci-mlir-mpi.yml | 2 +- .github/workflows/ci-mlir.yml | 2 +- devito/ir/ietxdsl/cluster_to_ssa.py | 7 ++++--- devito/ir/ietxdsl/ietxdsl_functions.py | 3 --- devito/ir/ietxdsl/lowering.py | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-mlir-mpi.yml b/.github/workflows/ci-mlir-mpi.yml index 3ce6912a9a..7d39f457e7 100644 --- a/.github/workflows/ci-mlir-mpi.yml +++ b/.github/workflows/ci-mlir-mpi.yml @@ -38,7 +38,7 @@ jobs: run: | pip install -e .[tests] pip install mpi4py - pip install xdsl==0.14 + pip install git+https://github.com/xdslproject/xdsl@2825897b87443c9369abf89871f4721e2fce2da9 - name: Test with MPI run: | diff --git a/.github/workflows/ci-mlir.yml b/.github/workflows/ci-mlir.yml index 9214475dba..345662357c 100644 --- a/.github/workflows/ci-mlir.yml +++ b/.github/workflows/ci-mlir.yml @@ -38,7 +38,7 @@ jobs: run: | pip install -e .[tests] pip install mpi4py - pip install xdsl==0.14 + pip install git+https://github.com/xdslproject/xdsl@2825897b87443c9369abf89871f4721e2fce2da9 - name: Test non-MPI run: | diff --git a/devito/ir/ietxdsl/cluster_to_ssa.py b/devito/ir/ietxdsl/cluster_to_ssa.py index 49a9c54948..9bf155d206 100644 --- a/devito/ir/ietxdsl/cluster_to_ssa.py +++ b/devito/ir/ietxdsl/cluster_to_ssa.py @@ -55,11 +55,12 @@ def _convert_eq(self, eq: LoweredEq): # (for derivative regions) halo = [function.halo[function.dimensions.index(d)] for d in grid.dimensions] - # shift all time values so that for all accesses at t + n, n>=0. + # Shift all time values so that for all accesses at t + n, n>=0. self.time_offs = min( int(idx.indices[0] - grid.stepping_dim) for idx in retrieve_indexed(eq) ) - # calculate the actual size of our time dimension + + # Calculate the actual size of our time dimension actual_time_size = ( max(int(idx.indices[0] - grid.stepping_dim) for idx in retrieve_indexed(eq)) - self.time_offs @@ -71,7 +72,7 @@ def _convert_eq(self, eq: LoweredEq): loop = self._build_iet_for(grid.stepping_dim, actual_time_size) # build stencil - perf("Init out stencil Op") + perf("Initialize a stencil Op") stencil_op = iet_ssa.Stencil.get( loop.subindice_ssa_vals(), grid.shape_local, diff --git a/devito/ir/ietxdsl/ietxdsl_functions.py b/devito/ir/ietxdsl/ietxdsl_functions.py index e031661686..bf007bcd8f 100644 --- a/devito/ir/ietxdsl/ietxdsl_functions.py +++ b/devito/ir/ietxdsl/ietxdsl_functions.py @@ -2,17 +2,14 @@ import ctypes import numpy from sympy import Indexed, Integer, Symbol, Add, Eq, Mod, Pow, Mul, Float -import cgen from typing import Any import devito.ir.iet.nodes as nodes from devito import SpaceDimension -from devito.passes.iet.languages.openmp import OmpRegion from devito.tools import as_list -from devito.tools.utils import as_tuple from devito.types.basic import IndexedData # XDSL specific imports diff --git a/devito/ir/ietxdsl/lowering.py b/devito/ir/ietxdsl/lowering.py index 8ccf6b6d25..b1c50db2e9 100644 --- a/devito/ir/ietxdsl/lowering.py +++ b/devito/ir/ietxdsl/lowering.py @@ -1,11 +1,11 @@ from dataclasses import dataclass, field -from xdsl.ir import Block, Attribute, BlockArgument, SSAValue, Operation, OpResult +from xdsl.ir import Block, SSAValue, Operation, OpResult from xdsl.dialects import builtin, scf, arith, func, llvm, memref -from xdsl.dialects.experimental import math from devito.ir.ietxdsl import iet_ssa -from xdsl.pattern_rewriter import RewritePattern, PatternRewriter, GreedyRewritePatternApplier, op_type_rewrite_pattern, PatternRewriteWalker +from xdsl.pattern_rewriter import (RewritePattern, PatternRewriter, PatternRewriteWalker, + GreedyRewritePatternApplier, op_type_rewrite_pattern) def _generate_subindices(subindices: int, block: Block,