Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split TK CI from main CI #195

Merged
merged 6 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/ci-tk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "TK CI"

on:
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: "Unit Tests and Type Checking"
strategy:
fail-fast: false
matrix:
version: [3.11]
os: [ubuntu-latest, nodai-amdgpu-mi300-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}}

- 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-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 ./tests/kernel/wave/

- name: Run e2e tests on MI300
if: "contains(matrix.os, 'mi300') && !cancelled()"
run: |
export WAVE_RUN_E2E_TESTS=1
pytest -n 4 --capture=tee-sys -vv ./tests/kernel/wave/

- name: Run LIT tests
if: ${{ !cancelled() }}
run: |
lit lit_tests/ -v

- name: MyPy Type Checking
harsh-nod marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ !cancelled() }}
run: |
mypy
10 changes: 2 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
matrix:
version: [3.11]
os: [ubuntu-latest, nodai-amdgpu-mi300-x86-64]
os: [ubuntu-latest]
runs-on: ${{matrix.os}}
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache"
Expand Down Expand Up @@ -55,13 +55,7 @@ jobs:
- name: Run unit tests
if: ${{ !cancelled() }}
run: |
pytest -n 4 .

- name: Run e2e tests on MI300
if: "contains(matrix.os, 'mi300') && !cancelled()"
run: |
export WAVE_RUN_E2E_TESTS=1
pytest -n 4 --capture=tee-sys ./tests/kernel/wave/
pytest -n 4 --capture=tee-sys -vv .

- name: Run LIT tests
if: ${{ !cancelled() }}
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
version: [3.11]
os: [ubuntu-latest, nodai-amdgpu-mi300-x86-64]
os: [nodai-amdgpu-mi300-x86-64]
runs-on: ${{matrix.os}}
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache"
Expand Down Expand Up @@ -54,21 +54,10 @@ jobs:
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 .

- 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 ./tests/kernel/wave/
- name: Run LIT tests
if: ${{ !cancelled() }}
run: |
lit lit_tests/ -v
- name: MyPy Type Checking
if: ${{ !cancelled() }}
run: |
mypy
pytest -n 1 --capture=tee-sys -vv ./tests/kernel/wave/
harsh-nod marked this conversation as resolved.
Show resolved Hide resolved
Loading