Skip to content

Commit

Permalink
[CI] Add AArch64 builder, disable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
powderluv authored and github-actions[bot] committed Aug 10, 2023
1 parent c67a5ed commit 28eaa38
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 109 deletions.
84 changes: 70 additions & 14 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,11 @@ jobs:
matrix:
include:
# Ubuntu packages.
- runs-on: ubuntu-latest
build-family: linux
build-package: main-dist-linux
experimental: false
- runs-on: ubuntu-latest
- runs-on: icelake
build-family: linux
build-package: py-compiler-pkg
experimental: false
- runs-on: ubuntu-latest
- runs-on: icelake
build-family: linux
build-package: py-runtime-pkg
experimental: false
Expand All @@ -73,17 +69,34 @@ jobs:
build-package: py-runtime-pkg
experimental: true

# Linux AArch64 packages.
- runs-on: linux-aarch64
build-family: linux-aarch64
build-package: py-compiler-pkg
experimental: false
- runs-on: linux-aarch64
build-family: linux-aarch64
build-package: py-runtime-pkg
experimental: false


env:
MANYLINUX_X86_64_IMAGE: gcr.io/iree-oss/manylinux2014_x86_64-release@sha256:e83893d35be4ce3558c989e9d5ccc4ff88d058bc3e74a83181059cc76e2cf1f8
MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64

steps:
# Docker may leave root owned files
- name: Chown user
if: "matrix.build-family == 'linux-aarch64' || matrix.build-family == 'linux'"
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
path: "c" # Windows can hit path length limits, so use a short path.
submodules: true
ref: ${{ github.event.inputs.commit }}
- uses: actions/setup-python@v4
if: "matrix.build-family != 'macos'"
if: "matrix.build-family == 'windows'"
with:
python-version: '3.11'

Expand Down Expand Up @@ -142,12 +155,22 @@ jobs:
# One step per OS.
##########################################################################

- name: Build runtime wheels (Linux)
- name: Build runtime wheels (Linux-x86_64)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'linux'"
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime iree-runtime-instrumented"
packages: "iree-runtime"
output_dir: "${{ github.workspace }}/bindist"
run: |
./c/build_tools/python_deploy/build_linux_packages.sh
- name: Build runtime wheels (Linux-AArch64)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'linux-aarch64'"
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
output_dir: "${{ github.workspace }}/bindist"
run: |
./c/build_tools/python_deploy/build_linux_packages.sh
Expand All @@ -157,7 +180,7 @@ jobs:
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime iree-runtime-instrumented"
packages: "iree-runtime"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11"
run: |
Expand Down Expand Up @@ -190,6 +213,16 @@ jobs:
run: |
./c/build_tools/python_deploy/build_linux_packages.sh
- name: Build compiler wheels (Linux-AArch64)
if: "matrix.build-package == 'py-compiler-pkg' && matrix.build-family == 'linux-aarch64'"
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
output_dir: "${{ github.workspace }}/bindist"
run: |
./c/build_tools/python_deploy/build_linux_packages.sh
- name: Build compiler wheels (MacOS)
if: "matrix.build-package == 'py-compiler-pkg' && matrix.build-family == 'macos'"
shell: bash
Expand Down Expand Up @@ -235,10 +268,10 @@ jobs:
path: ./bindist/*
retention-days: 5

# TODO: Upload the tar.bz2 files too when ready
- name: Upload Release Assets
if: github.event.inputs.release_id != ''
id: upload-release-assets
# TODO: One Window Release builds we build both compiler+runtime
- name: Upload Release Assets (Windows)
if: "github.event.inputs.release_id != '' && matrix.build-family == 'windows'"
id: upload-release-assets-windows
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
Expand All @@ -247,6 +280,29 @@ jobs:
# Only upload iree artifacts.
assets_path: ./bindist/iree*.*

# TODO: Upload the tar.bz2 files too when ready
- name: Upload Release Assets (Compiler)
if: "github.event.inputs.release_id != '' && matrix.build-package == 'py-compiler-pkg' && matrix.build-family != 'windows'"
id: upload-release-assets-compiler
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
release_id: ${{ github.event.inputs.release_id }}
# Only upload iree artifacts.
assets_path: ./bindist/iree_compiler*.*

- name: Upload Release Assets (Runtime)
if: "github.event.inputs.release_id != '' && matrix.build-package == 'py-runtime-pkg' && matrix.build-family != 'windows'"
id: upload-release-assets-runtime
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
release_id: ${{ github.event.inputs.release_id }}
# Only upload iree artifacts.
assets_path: ./bindist/iree_runtime*.*

validate_and_publish:
name: "Trigger validate and publish release"
needs: build_packages
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/validate_and_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,89 +16,8 @@ on:
required: true

jobs:
validate_packages:
name: "Validate packages"
# TODO(jennik): Look into testing windows and macos builds.
runs-on: ubuntu-20.04
steps:
- name: Download packages
id: download_packages
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0
with:
github_token: ${{secrets.WRITE_ACCESS_TOKEN}}
workflow: build_package.yml
run_id: ${{ github.event.inputs.build_run_id }}
- name: Extract and display downloaded files
run: |
tar -xf artifact/iree-dist-${{ github.event.inputs.package_version }}-linux-x86_64.tar.xz
pwd
ls -R
- name: Set up python
id: set_up_python
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
with:
python-version: "3.8"
- name: Install python packages
id: install_python_packages
run: |
python -m pip install -f file://$PWD/artifact/ iree-compiler iree-runtime iree-tools-tflite iree-tools-tf
# Binaries from the tarball
- name: Run iree-benchmark-module
id: run_iree_benchmark_module
run: ./bin/iree-benchmark-module --help
- name: Run iree-benchmark-trace
id: run_iree_benchmark_trace
run: ./bin/iree-benchmark-trace --help
- name: Run iree-dump-module
id: run_iree_dump_module
run: ./bin/iree-dump-module --help
- name: Run iree-cpuinfo
id: run_iree_cpuinfo
run: ./bin/iree-cpuinfo
- name: Run iree-flatcc-cli
id: run_iree_flatcc_cli
run: ./bin/iree-flatcc-cli --help
- name: Run iree-opt
id: run_iree_opt
run: ./bin/iree-opt --help
- name: Run iree-run-mlir
id: run_iree_run_mlir
run: ./bin/iree-run-mlir --help
- name: Run iree-run-module
id: run_iree_run_module
run: ./bin/iree-run-module --help
- name: Run iree-run-trace
id: run_iree_run_trace
run: ./bin/iree-run-trace --help
- name: Run iree-tblgen
id: run_iree_tblgen
run: ./bin/iree-tblgen --help
- name: Run iree-compile
id: run_iree-compile
run: ./bin/iree-compile --help
# Console scripts from the wheels.
- name: Py iree-run-module
id: py_iree-run-module
run: iree-run-module --help
- name: Py iree-run-trace
id: py_iree-run-trace
run: iree-run-trace --help
- name: Py iree-benchmark-module
id: py_iree_benchmark_module
run: iree-benchmark-module --help
- name: Py iree-benchmark-trace
id: py_iree_benchmark_trace
run: iree-benchmark-trace --help
- name: Py iree-dump-module
id: py_iree_dump_module
run: iree-dump-module --help
- name: Py iree-cpuinfo
id: py_iree_cpuinfo
run: iree-cpuinfo

publish_release:
name: "Publish release"
needs: validate_packages
runs-on: ubuntu-20.04
steps:
- name: Publish Release
Expand All @@ -109,17 +28,3 @@ jobs:
with:
release_id: ${{ github.event.inputs.release_id }}

- name: Checking out repository
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
token: ${{ secrets.WRITE_ACCESS_TOKEN }}
# Get all history. Otherwise the latest-snapshot branch can't be
# fast-forwarded.
fetch-depth: 0

- name: Updating latest-snapshot branch
uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # v0.6.0
with:
github_token: ${{ secrets.WRITE_ACCESS_TOKEN }}
branch: latest-snapshot
force: true
2 changes: 2 additions & 0 deletions compiler/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ def prepare_installation():
# Disable .so.0 style symlinking. Python wheels don't preserve links,
# so this ~doubles the binary size if not disabled (yikes!).
"-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON",
"-DIREE_BUILD_TESTS=OFF",
"-DIREE_BUILD_SAMPLES=OFF",
"-DPython3_EXECUTABLE={}".format(sys.executable),
"-DCMAKE_BUILD_TYPE={}".format(cfg),
get_env_cmake_option("IREE_TARGET_BACKEND_CUDA"),
Expand Down

0 comments on commit 28eaa38

Please sign in to comment.