-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mlir_parsing_printing_fix
merge main
- Loading branch information
Showing
84 changed files
with
3,545 additions
and
1,349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[run] | ||
branch = True | ||
omit = | ||
# Autogenerated missed code handles other VCSes. | ||
xdsl/_version.py | ||
concurrency = multiprocessing | ||
parallel = True | ||
source = | ||
xdsl/ | ||
tests/ | ||
|
||
|
||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise NotImplementedError | ||
raise ValueError | ||
raise TypeError | ||
raise RuntimeError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# This workflow will install MLIR, Python dependencies, run tests and lint with a single version of Python | ||
|
||
name: CI - MLIR-based Testing | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
|
||
env: | ||
LLVM_SYMBOLIZER_PATH: /usr/lib/llvm-11/bin/llvm-symbolizer | ||
MLIR-Version: 74992f4a5bb79e2084abdef406ef2e5aa2024368 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Python Setup | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Clang Setup | ||
uses: egor-tensin/setup-clang@v1 | ||
|
||
- name: Ninja Setup | ||
uses: lukka/get-cmake@9e431acfe656e5db66cd4930386328fce59cfaba | ||
|
||
- name: CCache Setup (C++ compilation) | ||
uses: hendrikmuhs/ccache-action@v1.2.5 | ||
with: | ||
key: ${{ runner.os }}-${{ env.MLIR-Version }} | ||
restore-keys: ${{ runner.os }}-${{ env.MLIR-Version }} | ||
# LLVM needs serious cache size | ||
max-size: 6G | ||
|
||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
with: | ||
path: xdsl | ||
|
||
- name: Checkout MLIR | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: llvm/llvm-project.git | ||
path: llvm-project | ||
ref: ${{ env.MLIR-Version }} | ||
|
||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip | ||
- name: Install the package locally | ||
run: pip install -e .[extras] | ||
|
||
- name: MLIR Build Setup | ||
run: | | ||
pip install -r ${GITHUB_WORKSPACE}/llvm-project/mlir/python/requirements.txt | ||
mkdir llvm-project/build | ||
cd llvm-project/build | ||
cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_LLD=ON -DMLIR_ENABLE_BINDINGS_PYTHON=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
- name: MLIR Build | ||
run: | | ||
cd llvm-project/build | ||
cmake --build . --target mlir-opt MLIRPythonModules | ||
- name: Test with pytest and generate code coverage | ||
run: | | ||
cd xdsl | ||
# Add the MLIR Python bindings to the PYTHONPATH | ||
export PYTHONPATH=$PYTHONPATH:${GITHUB_WORKSPACE}/llvm-project/build/tools/mlir/python_packages/mlir_core | ||
pytest --cov --cov-config=.coveragerc tests | ||
- name: Execute lit tests | ||
run: | | ||
cd xdsl | ||
export PYTHONPATH=$(pwd) | ||
# Add mlir-opt to the path | ||
export PATH=$PATH:${GITHUB_WORKSPACE}/llvm-project/build/bin/ | ||
# Add the MLIR Python bindings to the PYTHONPATH | ||
export PYTHONPATH=$PYTHONPATH:${GITHUB_WORKSPACE}/llvm-project/build/tools/mlir/python_packages/mlir_core | ||
lit -v tests/filecheck/ -DCOVERAGE -DEXEC_DIR=$(pwd) | ||
- name: Combine coverage data | ||
run: | | ||
cd xdsl | ||
coverage combine --append | ||
coverage report | ||
coverage xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true | ||
directory: ${GITHUB_WORKSPACE}/../ | ||
files: coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: CI - Python Notebooks | ||
|
||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the master branch | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Upgrade pip | ||
run: | | ||
pip install --upgrade pip | ||
- name: Install the package locally | ||
run: pip install -e . | ||
- name: Install nbval | ||
run: | | ||
pip install nbval | ||
- name: Run examples/tutorials | ||
run: | | ||
pytest --nbval-lax docs/irdl.ipynb --maxfail 1 -vv | ||
pytest --nbval docs/tutorial.ipynb --maxfail 1 -vv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ cython_debug/ | |
|
||
# lit tests results | ||
tests/filecheck/.lit_test_times.txt | ||
tests/**/Output/* | ||
|
||
# Mac | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include versioneer.py | ||
include xdsl/_version.py | ||
include requirements.txt requirements-optional.txt | ||
include xdsl/py.typed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
codecov: | ||
require_ci_to_pass: yes | ||
notify: | ||
wait_for_ci: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: 80...90 | ||
|
||
status: | ||
# Learn more at http://docs.codecov.io/docs/codecov-yaml | ||
project: | ||
default: | ||
enabled: yes | ||
target: 1 | ||
threshold: 0.1 | ||
patch: | ||
default: | ||
enabled: off | ||
|
||
ignore: | ||
- "**/*.ipynb" |
Oops, something went wrong.