-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes required for a successful build that passes tests (#39)
This commit makes the necessary changes to get out a successful release that passes all tests. Also added some scripts to help with release validation. New build release CI to make sure no commits break iree-turbine release build. --------- Signed-off-by: saienduri <saimanas.enduri@amd.com>
- Loading branch information
Showing
15 changed files
with
176 additions
and
99 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
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 @@ | ||
name: Build Release | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
# A PR number if a pull request and otherwise the commit hash. This cancels | ||
# queued and in-progress runs for the same PR (presubmit) or commit | ||
# (postsubmit). The workflow name is prepended to avoid conflicts between | ||
# different workflows. | ||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: "Test Build Release Process" | ||
strategy: | ||
matrix: | ||
version: [3.11] | ||
os: [ubuntu-latest] | ||
runs-on: ${{matrix.os}} | ||
steps: | ||
- name: "Setting up Python" | ||
id: setup_python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{matrix.version}} | ||
|
||
- name: "Checkout Code" | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Release Wheels | ||
run: ./build_tools/build_release.py --core-version 2.3.0 | ||
|
||
- name: Validate Release Build | ||
if: ${{ !cancelled() }} | ||
run: ./build_tools/post_build_release_test.sh |
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
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 @@ | ||
#!/bin/bash | ||
# Copyright 2024 Advanced Micro Devices, Inc | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
set -xeuo pipefail | ||
|
||
THIS_DIR="$(cd $(dirname $0) && pwd)" | ||
REPO_ROOT="$(cd ${THIS_DIR?}/.. && pwd)" | ||
WHEELHOUSE_DIR="${REPO_ROOT?}/wheelhouse" | ||
|
||
# Set up environment. | ||
python -m venv "${WHEELHOUSE_DIR}"/test.venv | ||
source "${WHEELHOUSE_DIR}"/test.venv/bin/activate | ||
|
||
# Install wheels | ||
# --no-index is required so that we don't pick up different versions from pypi | ||
pip install --no-index -f "${WHEELHOUSE_DIR}" iree-turbine[testing] | ||
pip install --no-index -f "${WHEELHOUSE_DIR}" torchvision | ||
|
||
# Run tests | ||
pytest -n 4 "${REPO_ROOT}" |
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,22 @@ | ||
#!/bin/bash | ||
# Copyright 2024 Advanced Micro Devices, Inc | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
set -xeuo pipefail | ||
|
||
THIS_DIR="$(cd $(dirname $0) && pwd)" | ||
REPO_ROOT="$(cd ${THIS_DIR?}/.. && pwd)" | ||
WHEELHOUSE_DIR="${REPO_ROOT?}/wheelhouse" | ||
|
||
# Use same environment from build_release, but uninstall the local wheels | ||
source "${WHEELHOUSE_DIR}"/test.venv/bin/activate | ||
pip uninstall -y shark-turbine iree-turbine iree-compiler iree-runtime | ||
|
||
# Install from pypi now that latest is released | ||
pip install iree-turbine | ||
|
||
# Run tests | ||
pytest -n 4 "${REPO_ROOT}" |
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,2 +1,2 @@ | ||
iree-compiler==20240514.893 | ||
iree-runtime==20240514.893 | ||
iree-compiler | ||
iree-runtime |
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
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"core-version": "2.3.0rc20240410", "package-version": "0.9.7.dev1"} | ||
{"core-version": "2.3.0rc20240621", "package-version": "0.9.7.dev1"} |