Skip to content

Commit

Permalink
Add sharktank model test to presubmits (#19329)
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Suderman <rob.suderman@gmail.com>
  • Loading branch information
rsuderman authored Nov 28, 2024
1 parent 9789438 commit 7f99587
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pkgci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ jobs:
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_onnx')
uses: ./.github/workflows/pkgci_test_onnx.yml

test_sharktank:
name: Test Sharktank
needs: [setup, build_packages]
if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_sharktank')
uses: ./.github/workflows/pkgci_test_sharktank.yml

test_tensorflow:
name: Test TensorFlow
needs: [setup, build_packages]
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/pkgci_test_sharktank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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: PkgCI Test Sharktank
on:
workflow_call:
inputs:
artifact_run_id:
type: string
default: ""
workflow_dispatch:
inputs:
artifact_run_id:
type: string
default: ""

jobs:
test_sharktank_models:
name: "test_sharktank_models :: ${{ matrix.name }}"
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
# CPU
- name: cpu_llvm_task
runs-on: ubuntu-20.04

env:
VENV_DIR: ${{ github.workspace }}/venv
steps:
- name: Checking out IREE repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: false
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0
with:
# Must match the subset of versions built in pkgci_build_packages.
python-version: "3.11"
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: linux_x86_64_release_packages
path: ${{ env.PACKAGE_DOWNLOAD_DIR }}
- name: Setup venv
run: |
./build_tools/pkgci/setup_venv.py ${VENV_DIR} \
--artifact-path=${PACKAGE_DOWNLOAD_DIR} \
--fetch-gh-workflow=${{ inputs.artifact_run_id }}
- name: Checkout test suites repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: iree-org/iree-test-suites
ref: a0c84d59c4332463dd46a3c4877d8e0ab2e0a80d
path: iree-test-suites
lfs: true
- name: Install Sharktank models test suite requirements
run: |
source ${VENV_DIR}/bin/activate
python -m pip install -r iree-test-suites/sharktank_models/requirements.txt
- name: Run Sharktank models test suite
run: |
source ${VENV_DIR}/bin/activate
pytest iree-test-suites/sharktank_models/ \
-rA \
-m "target_cpu" \
--log-cli-level=info \
--override-ini=xfail_strict=false \
--timeout=120 \
--durations=0

0 comments on commit 7f99587

Please sign in to comment.