diff --git a/.github/workflows/ci-tuner.yml b/.github/workflows/ci-tuner.yml new file mode 100644 index 000000000..9a735965f --- /dev/null +++ b/.github/workflows/ci-tuner.yml @@ -0,0 +1,49 @@ +name: CI - Tuner + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + pre-commit-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4.1.7 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.12' + + - name: Install dev dependencies + run: | + python -m pip install --upgrade pip + pip install -r sharktank/sharktank/tools/tuner/requirements-dev.txt + + - name: Run pre-commit test + run: pre-commit run --all-files --show-diff-on-failure --color=always + + - name: Install tuner dependencies + run: | + pip install -r sharktank/sharktank/tools/tuner/requirements-tuner.txt + python -m pip install \ + --find-links https://iree.dev/pip-release-links.html \ + --upgrade \ + iree-compiler iree-runtime + + - name: Run pytest + working-directory: sharktank/sharktank/tests/tuner + run: | + python -m pytest diff --git a/sharktank/sharktank/tools/tuner/requirements-dev.txt b/sharktank/sharktank/tools/tuner/requirements-dev.txt new file mode 100644 index 000000000..51d5b9ba0 --- /dev/null +++ b/sharktank/sharktank/tools/tuner/requirements-dev.txt @@ -0,0 +1,2 @@ +pre-commit==3.8.0 +virtualenv==20.13.0 diff --git a/tuner-requirements.txt b/sharktank/sharktank/tools/tuner/requirements-tuner.txt similarity index 81% rename from tuner-requirements.txt rename to sharktank/sharktank/tools/tuner/requirements-tuner.txt index 26ef8f6c7..f3484c921 100644 --- a/tuner-requirements.txt +++ b/sharktank/sharktank/tools/tuner/requirements-tuner.txt @@ -1,3 +1,4 @@ +pytest==8.2.2 tqdm==4.66.4 -types-tqdm==4.66.0.20240417 z3_solver==4.13.0.0 +types-tqdm==4.66.0.20240417