Skip to content

Commit

Permalink
tests: More cleanup and add MPI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Nov 16, 2023
1 parent ac5bc25 commit cd110b3
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 371 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci-mlir-mpi.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

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:
branches:
- master
workflow_dispatch:

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

- name: Install native dependencies
run: |
apt install -y curl mpich
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Install requirements and xDSL
run: |
pip install -e .[tests]
pip install mpi4py
pip install xdsl==0.14
- name: Test with MPI
run: |
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
pytest -m "parallel" -k "not adjoint" tests/
2 changes: 1 addition & 1 deletion .github/workflows/ci-mlir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
pip install mpi4py
pip install xdsl==0.14
- name: Test with pytest and generate code coverage
- name: Test non-MPI
run: |
# Add mlir-opt to the path
export PATH=/xdsl-sc/llvm-project/build/bin/:$PATH
Expand Down
2 changes: 1 addition & 1 deletion devito/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@


# Imports from xdsl
from devito.xdslpasses import * # noqa
# from devito.xdslpasses import * # noqa

from ._version import get_versions # noqa
__version__ = get_versions()['version']
Expand Down
2 changes: 1 addition & 1 deletion devito/ir/iet/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,4 +1252,4 @@ def generate(self):
tip += ";"
if self.cast:
tip = '(%s)%s' % (self.cast, tip)
yield tip
yield tip
Loading

0 comments on commit cd110b3

Please sign in to comment.