Fix onnx test failure with new LLVM #872
Workflow file for this run
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
name: GitHub Action MacOS amd64 | |
on: | |
pull_request: | |
push: | |
branches: [ main, feature/onnx-to-tosa ] | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: remove system python | |
run: | | |
sudo rm -rf /Library/Frameworks/Python.framework/Versions/3* /usr/local/Frameworks/Python.framework/Versions/3* /usr/local/bin/python3* || true | |
- name: install tools that are needed for compilation | |
run: | | |
brew install automake ninja pybind11 | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
with: | |
# Create symlinks to intercept compiler calls without modifying the cmake invocation | |
create-symlink: true | |
key: ${{ runner.os }}-ccache | |
- name: install protobuf | |
run: | | |
cd ~/work | |
sh ~/work/onnx-mlir/onnx-mlir/utils/install-protobuf.sh | |
- name: cache MLIR directory | |
id: cache-mlir | |
uses: actions/cache@v3 | |
with: | |
path: ~/work/onnx-mlir/llvm-project | |
key: ${{ runner.os }}-mlir-${{ hashFiles('**/clone-mlir.sh', '**/build-mlir.sh') }} | |
- name: clone & build MLIR | |
if: steps.cache-mlir.outputs.cache-hit != 'true' | |
run: | | |
cd ~/work/onnx-mlir | |
sh ~/work/onnx-mlir/onnx-mlir/utils/clone-mlir.sh | |
sh ~/work/onnx-mlir/onnx-mlir/utils/build-mlir.sh | |
- name: install python requirements | |
run: | | |
cd ~/work/onnx-mlir/onnx-mlir | |
python3 -m pip install --upgrade wheel | |
python3 -m pip install -r requirements.txt | |
- name: install third_party/onnx | |
run: | | |
cd ~/work/onnx-mlir/onnx-mlir/third_party/onnx | |
git fetch --prune --unshallow --tags | |
python3 -m pip install -v . | |
- name: build onnx-mlir | |
run: | | |
# Disable stablehlo to ease bumping; we don't need it. | |
export EXTRA_CMAKE_ARGS="-DONNX_MLIR_ENABLE_STABLEHLO=OFF -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" | |
cd ~/work/onnx-mlir | |
sh ~/work/onnx-mlir/onnx-mlir/utils/install-onnx-mlir.sh | |
- name: build and run docs/doc_example tests | |
run: | | |
cd ~/work/onnx-mlir | |
sh ~/work/onnx-mlir/onnx-mlir/utils/check-doc-example.sh | |
- name: build and run unit tests | |
run: | | |
cd ~/work/onnx-mlir | |
sh ~/work/onnx-mlir/onnx-mlir/utils/check-unittest.sh | |
- name: run onnx-mlir backend and numerical tests | |
# Those tests are not relevant to the work on the xilinx fork, but take | |
# 40 min. Don't run them on PRs. | |
if: github.event_name != 'pull_request' | |
run: | | |
cd ~/work/onnx-mlir | |
sh ~/work/onnx-mlir/onnx-mlir/utils/check-onnx-backend-numerical.sh |