Skip to content

Commit

Permalink
Merge pull request #94 from xdslproject/separate_concerns_I
Browse files Browse the repository at this point in the history
compiler: Separate concerns
  • Loading branch information
georgebisbas authored May 28, 2024
2 parents 56c164e + 2fef414 commit 95bf4c4
Show file tree
Hide file tree
Showing 15 changed files with 821 additions and 781 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-mlir-mpi-openmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will install MLIR, Python dependencies, run tests and lint with a single version of Python
# File inherited from https://github.com/xdslproject/xdsl/blob/main/.github/workflows/ci-mlir.yml

name: CI - MLIR-based Testing for MPI + openmp

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container: papychacal/xdsl-llvm:98e674c9f16d677d95c67bc130e267fae331e43c
steps:
- name: Checkout Devito
uses: actions/checkout@v3

- name: Install native dependencies
run: |
apt-get update && apt install curl mpich -y
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Install requirements and xDSL
run: |
pip install -e .[tests]
pip install mpi4py
pip install git+https://github.com/xdslproject/xdsl@210181350d926f91ee5fdb27f0eb5d1cf53a8997
- name: Test with MPI + openmp
run: |
export DEVITO_LANGUAGE=openmp
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
pytest -m "parallel" -k "not adjoint" tests/test_xdsl_* -vvv
3 changes: 2 additions & 1 deletion .github/workflows/ci-mlir-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
pip install mpi4py
pip install git+https://github.com/xdslproject/xdsl@210181350d926f91ee5fdb27f0eb5d1cf53a8997
- name: Test with MPI
- name: Test with MPI - no Openmp
run: |
export DEVITO_LANGUAGE=C
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
pytest -m "parallel" -k "not adjoint" tests/test_xdsl_* -vvv
47 changes: 47 additions & 0 deletions .github/workflows/ci-mlir-openmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow will install MLIR, Python dependencies, run tests and lint with a single version of Python
# File inherited from https://github.com/xdslproject/xdsl/blob/main/.github/workflows/ci-mlir.yml

name: CI - MLIR-based Testing + openmp

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container: papychacal/xdsl-llvm:98e674c9f16d677d95c67bc130e267fae331e43c
steps:
- name: Checkout Devito
uses: actions/checkout@v3

- name: Install native dependencies
run: |
apt-get update && apt install curl mpich -y
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Install requirements and xDSL
run: |
pip install -e .[tests]
pip install mpi4py
pip install git+https://github.com/xdslproject/xdsl@210181350d926f91ee5fdb27f0eb5d1cf53a8997
- name: Test no-MPI, Openmp
run: |
export DEVITO_MPI=0
export DEVITO_LANGUAGE=openmp
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
pytest -m "not parallel" -k "not adjoint" tests/test_xdsl_* -vvv
10 changes: 1 addition & 9 deletions .github/workflows/ci-mlir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,4 @@ jobs:
export DEVITO_LANGUAGE=C
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
pytest -m "not parallel" -k "not adjoint" tests/test_xdsl_* -vvv
- name: Test no-MPI, Openmp
run: |
export DEVITO_MPI=0
export DEVITO_LANGUAGE=openmp
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
pytest -m "not parallel" -k "not adjoint" tests/test_xdsl_* -vvv
pytest -m "not parallel" -k "not adjoint" tests/test_xdsl_* -vvv
1 change: 1 addition & 0 deletions devito/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
# Apply monkey-patching while we wait for our patches to be upstreamed and released
from devito.mpatches import * # noqa


from ._version import get_versions # noqa
__version__ = get_versions()['version']
del get_versions
Expand Down
5 changes: 3 additions & 2 deletions devito/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
from devito.core.cpu import (Cpu64NoopCOperator, Cpu64NoopOmpOperator,
Cpu64AdvCOperator, Cpu64AdvOmpOperator,
Cpu64FsgCOperator, Cpu64FsgOmpOperator,
Cpu64CustomOperator, XdslnoopOperator,
XdslAdvOperator)
Cpu64CustomOperator)

from devito.core.cpu_xdsl import XdslnoopOperator, XdslAdvOperator
from devito.core.intel import (Intel64AdvCOperator, Intel64AdvOmpOperator,
Intel64FsgCOperator, Intel64FsgOmpOperator)
from devito.core.arm import ArmAdvCOperator, ArmAdvOmpOperator
Expand Down
Loading

0 comments on commit 95bf4c4

Please sign in to comment.