Skip to content

Commit

Permalink
Cleanup pass through workflow files. (iree-org#316)
Browse files Browse the repository at this point in the history
* Format files
* Pin dependencies (runner images, actions hashes)
* Reorder job steps (start with `actions/checkout`)
* Delete `test_shark_studio.yml` (this has been disabled for some time
and it does not use any iree-turbine code)
* Add copyright/license header comments
  • Loading branch information
ScottTodd authored Dec 5, 2024
1 parent 5cde4de commit e131277
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 171 deletions.
101 changes: 53 additions & 48 deletions .github/workflows/ci-tk.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Copyright 2024 The IREE Authors
#
# 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

name: "TK CI"

on:
pull_request:
push:
branches:
- main
- main

concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
Expand All @@ -21,62 +27,61 @@ jobs:
fail-fast: false
matrix:
version: [3.11]
os: [ubuntu-latest, nodai-amdgpu-mi300-x86-64, nodai-amdgpu-mi250-x86-64]
os: [ubuntu-22.04, nodai-amdgpu-mi300-x86-64, nodai-amdgpu-mi250-x86-64]
runs-on: ${{matrix.os}}
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache"
steps:
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@v3
with:
python-version: ${{matrix.version}}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Checkout Code"
uses: actions/checkout@v3
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{matrix.version}}

- name: Cache Pip Packages
uses: actions/cache@v4
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}
- name: Cache Pip Packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}

- name: Install pip deps
run: |
python -m pip install --no-compile --upgrade pip
# Note: We install in three steps in order to satisfy requirements
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt --upgrade
pip install -r requirements.txt -e .
- name: Install pip deps
run: |
python -m pip install --no-compile --upgrade pip
# Note: We install in three steps in order to satisfy requirements
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt --upgrade
pip install -r requirements.txt -e .
- name: Run unit tests
if: ${{ !cancelled() }}
run: |
pytest -n 4 --capture=tee-sys -vv ./tests/kernel/wave/
- name: Run unit tests
if: ${{ !cancelled() }}
run: |
pytest -n 4 --capture=tee-sys -vv ./tests/kernel/wave/
- name: Run e2e tests on AMD GPU MI300
if: "contains(matrix.os, 'mi300') && !cancelled()"
run: |
pip install --no-compile -r pytorch-rocm-requirements.txt
export WAVE_RUN_E2E_TESTS=1
pytest -n 4 --capture=tee-sys -vv ./tests/kernel/wave/
- name: Run e2e tests on AMD GPU MI300
if: "contains(matrix.os, 'mi300') && !cancelled()"
run: |
pip install --no-compile -r pytorch-rocm-requirements.txt
export WAVE_RUN_E2E_TESTS=1
pytest -n 4 --capture=tee-sys -vv ./tests/kernel/wave/
- name: Run e2e tests on AMD GPU MI250
if: "contains(matrix.os, 'mi250') && !cancelled()"
run: |
pip install --no-compile -r pytorch-rocm-requirements.txt
export WAVE_RUN_E2E_TESTS=1
pytest -n 2 --capture=tee-sys -vv ./tests/kernel/wave/
- name: Run e2e tests on AMD GPU MI250
if: "contains(matrix.os, 'mi250') && !cancelled()"
run: |
pip install --no-compile -r pytorch-rocm-requirements.txt
export WAVE_RUN_E2E_TESTS=1
pytest -n 2 --capture=tee-sys -vv ./tests/kernel/wave/
- name: Run LIT tests
if: ${{ !cancelled() }}
run: |
lit lit_tests/ -v
- name: Run LIT tests
if: ${{ !cancelled() }}
run: |
lit lit_tests/ -v
- name: MyPy Type Checking
if: ${{ !cancelled() }}
run: |
mypy
- name: MyPy Type Checking
if: ${{ !cancelled() }}
run: |
mypy
77 changes: 41 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Copyright 2024 The IREE Authors
#
# 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

name: CI

on:
pull_request:
push:
branches:
- main
- main

concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
Expand All @@ -21,48 +27,47 @@ jobs:
fail-fast: false
matrix:
version: [3.11]
os: [ubuntu-latest]
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache"
steps:
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@v3
with:
python-version: ${{matrix.version}}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Checkout Code"
uses: actions/checkout@v3
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{matrix.version}}

- name: Cache Pip Packages
uses: actions/cache@v4
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}
- name: Cache Pip Packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}

- name: Install pip deps
run: |
python -m pip install --no-compile --upgrade pip
# Note: We install in three steps in order to satisfy requirements
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt
pip install -r requirements.txt -e .
- name: Install pip deps
run: |
python -m pip install --no-compile --upgrade pip
# Note: We install in three steps in order to satisfy requirements
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt
pip install -r requirements.txt -e .
- name: Run unit tests
if: ${{ !cancelled() }}
run: |
pytest -n 4 --capture=tee-sys -vv .
- name: Run unit tests
if: ${{ !cancelled() }}
run: |
pytest -n 4 --capture=tee-sys -vv .
- name: Run LIT tests
if: ${{ !cancelled() }}
run: |
lit lit_tests/ -v
- name: Run LIT tests
if: ${{ !cancelled() }}
run: |
lit lit_tests/ -v
- name: MyPy Type Checking
if: ${{ !cancelled() }}
run: |
mypy
- name: MyPy Type Checking
if: ${{ !cancelled() }}
run: |
mypy
73 changes: 39 additions & 34 deletions .github/workflows/perf.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Copyright 2024 The IREE Authors
#
# 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

name: PERF

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- main
schedule:
- cron: '30 5 * * *'
- cron: "30 5 * * *"

concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
Expand All @@ -29,35 +35,34 @@ jobs:
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache"
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: Cache Pip Packages
uses: actions/cache@v4
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}

- name: Install pip deps
run: |
python -m pip install --no-compile --upgrade pip
# Note: We install in three steps in order to satisfy requirements
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-rocm-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt --upgrade
pip install -r requirements.txt -e .
- name: Run e2e tests on MI300
if: "contains(matrix.os, 'mi300') && !cancelled()"
run: |
export WAVE_RUN_E2E_TESTS=1
export TEST_PARAMS_PATH="tests/kernel/wave/test_param.json"
pytest -n 1 --capture=tee-sys -vv ./tests/kernel/wave/
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{matrix.version}}

- name: Cache Pip Packages
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}

- name: Install pip deps
run: |
python -m pip install --no-compile --upgrade pip
# Note: We install in three steps in order to satisfy requirements
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-rocm-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt --upgrade
pip install -r requirements.txt -e .
- name: Run e2e tests on MI300
if: "contains(matrix.os, 'mi300') && !cancelled()"
run: |
export WAVE_RUN_E2E_TESTS=1
export TEST_PARAMS_PATH="tests/kernel/wave/test_param.json"
pytest -n 1 --capture=tee-sys -vv ./tests/kernel/wave/
14 changes: 10 additions & 4 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright 2024 The IREE Authors
#
# 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

name: pre-commit

on:
Expand All @@ -8,8 +14,8 @@ on:

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
15 changes: 10 additions & 5 deletions .github/workflows/test_build_release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright 2024 The IREE Authors
#
# 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

name: Build Release

on:
Expand All @@ -22,18 +28,17 @@ jobs:
fail-fast: false
matrix:
version: [3.11]
os: [ubuntu-latest]
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@v3
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{matrix.version}}

- name: "Checkout Code"
uses: actions/checkout@v3

- name: Build Release Wheels
run: ./build_tools/build_release.py --package-version 2.5.0.dev

Expand Down
Loading

0 comments on commit e131277

Please sign in to comment.