Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into users/scotttodd/req…
Browse files Browse the repository at this point in the history
…uirements-matrix
  • Loading branch information
ScottTodd committed Jan 10, 2025
2 parents fa7ab97 + 2edde8d commit d4f56bf
Show file tree
Hide file tree
Showing 70 changed files with 2,211 additions and 4,317 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-libshortfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
ctest --timeout 30 --output-on-failure --test-dir build
pytest -s --durations=10
pytest -s --durations=10 --timeout=30
# Depends on all other jobs to provide an aggregate job status.
ci_libshortfin_summary:
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/ci-llama-quick-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,13 @@ jobs:
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.
# from non default locations first.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install -r requirements-iree-pinned.txt
pip install --no-compile \
-r sharktank/requirements-tests.txt \
-e sharktank/
# Install nightly IREE packages.
# We could also pin to a known working or stable version.
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
iree-base-compiler \
iree-base-runtime \
iree-turbine
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
pip freeze
- name: Run llama 8b f16 decomposed test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-sglang-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
pip install --no-compile -r requirements.txt -e sharktank/ shortfin/
# Pin to known-working versions.
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
pip install -f https://iree.dev/pip-release-links.html \
iree-base-compiler==3.1.0rc20241220 \
iree-base-runtime==3.1.0rc20241220 \
"numpy<2.0"
Expand Down
72 changes: 0 additions & 72 deletions .github/workflows/ci-shark-ai.yml

This file was deleted.

52 changes: 21 additions & 31 deletions .github/workflows/ci-sharktank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,15 @@ jobs:
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 --index-url https://download.pytorch.org/whl/cpu torch==${{matrix.torch-version}}+cpu
# from non default locations first.
pip install --no-compile \
--index-url https://download.pytorch.org/whl/cpu torch==${{matrix.torch-version}}+cpu
pip install -r requirements-iree-pinned.txt
pip install --no-compile \
-r sharktank/requirements-tests.txt \
-e sharktank/
# Install nightly IREE packages.
# We could also pin to a known working or stable version.
pip install -f https://iree.dev/pip-release-links.html --pre \
iree-base-compiler \
iree-base-runtime \
iree-turbine
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
pip freeze
- name: Run sharktank tests
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -121,19 +118,16 @@ jobs:
run: |
source ${VENV_DIR}/bin/activate
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.
# from non default locations first.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install -r requirements-iree-pinned.txt
pip install --no-compile \
-r sharktank/requirements-tests.txt \
-e sharktank/
# Install nightly IREE packages.
# We could also pin to a known working or stable version.
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
iree-base-compiler \
iree-base-runtime \
iree-turbine
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
pip freeze
- name: Run tests
# TODO: unify with-*-data flags into a single flag and make it possible to run
Expand Down Expand Up @@ -180,18 +174,14 @@ jobs:
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.
# from non default locations first.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install -r requirements-iree-pinned.txt
pip install --no-compile \
-r sharktank/requirements-tests.txt \
-e sharktank/
# Install nightly IREE packages.
# We could also pin to a known working or stable version.
pip install -f https://iree.dev/pip-release-links.html --pre \
iree-base-compiler \
iree-base-runtime \
iree-turbine
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
pip freeze
- name: Run punet tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Run perplexity test with IREE
run: |
source ${VENV_DIR}/bin/activate
pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --run-nightly-llama-tests --bs=100 --iree-device=hip://0 --iree-hip-target=gfx942 --iree-hal-target-backends=rocm --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json --html=out/llm/llama/perplexity/iree_perplexity/index.html
pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --run-nightly-llama-tests --bs=100 --iree-device=hip://0 --iree-hip-target=gfx942 --iree-hal-target-device=hip --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json --html=out/llm/llama/perplexity/iree_perplexity/index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/ci_eval_short.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,16 @@ jobs:
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.
# from non default locations first.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install -r requirements-iree-pinned.txt
pip install --no-compile \
-r sharktank/requirements-tests.txt \
-e sharktank/
# Install nightly IREE packages.
# We could also pin to a known working or stable version.
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
iree-base-compiler \
iree-base-runtime \
iree-turbine
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
pip freeze
- name: Run perplexity test with vmfb
run: |
source ${VENV_DIR}/bin/activate
pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --bs=5 --iree-device=hip://0 --iree-hip-target=gfx942 --iree-hal-target-backends=rocm --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json
pytest -n 8 -v -s sharktank/tests/evaluate/perplexity_iree_test.py --bs=5 --iree-device=hip://0 --iree-hip-target=gfx942 --iree-hal-target-device=hip --llama3-8b-f16-model-path=/data/llama3.1/8b/llama8b_f16.irpa --llama3-8b-tokenizer-path=/data/llama3.1/8b/tokenizer_config.json
16 changes: 8 additions & 8 deletions .github/workflows/ci_linux_x64_asan-libshortfin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ concurrency:

env:
PYENV_ROOT: ${{ github.workspace }}/pyenv
PYENV_REF: 96b3fb2fc3bee85650cb22e2cb06c83c24509a6d # v2.4.17
PYTHON_VER: 3.12.7
PYENV_REF: 2aff0df76deacd9b6c49de8870f0255d24d3b31b # v2.5.0
PYTHON_VER: 3.12.8
CACHE_ASAN_VER: 2
CACHE_DEPS_VER: 1
LIBSHORTFIN_DIR: ${{ github.workspace }}/shortfin/
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
working-directory: ${{ env.PYENV_ROOT }}
run: |
src/configure && make -C src
export PATH=${{ env.PYENV_ROOT }}/bin:$PATH && eval "$(pyenv init -)"
export PATH=${{ env.PYENV_ROOT }}/bin:$PATH && eval "$(pyenv init - bash)"
CC=clang-18 CXX=clang++-18 LDFLAGS="-lstdc++" PYTHON_CONFIGURE_OPTS="--with-address-sanitizer" pyenv install -v ${{ env.PYTHON_VER }}
pyenv global ${{ env.PYTHON_VER }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ env.PYENV_ROOT }}
key: ${{ runner.os }}-python-deps-${{ hashFiles('shortfin/requirements-tests.txt') }}-v${{ env.CACHE_DEPS_VER }}
key: ${{ runner.os }}-python-deps-${{ hashFiles('shortfin/requirements-tests.txt', 'requirements-iree-pinned.txt') }}-v${{ env.CACHE_DEPS_VER }}

- name: Restore Python ASan cache
id: cache-python-asan
Expand All @@ -122,7 +122,7 @@ jobs:
if: steps.cache-python-deps-restore.outputs.cache-hit != 'true'
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
eval "$(pyenv init -)"
eval "$(pyenv init - bash)"
pip install -r requirements-tests.txt
pip install -r ../requirements-iree-pinned.txt
pip freeze
Expand All @@ -138,7 +138,7 @@ jobs:
- name: Build shortfin
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
eval "$(pyenv init -)"
eval "$(pyenv init - bash)"
SHORTFIN_ENABLE_ASAN=ON \
SHORTFIN_DEV_MODE=ON \
SHORTFIN_RUN_CTESTS=ON \
Expand All @@ -151,5 +151,5 @@ jobs:
ASAN_OPTIONS: detect_odr_violation=0
working-directory: ${{ env.LIBSHORTFIN_DIR }}
run: |
eval "$(pyenv init -)"
pytest -s
eval "$(pyenv init - bash)"
pytest -s --durations=10 --timeout=30
39 changes: 39 additions & 0 deletions .github/workflows/pkgci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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

name: PkgCI

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

permissions:
contents: read

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:
build_packages:
name: Build Packages
uses: ./.github/workflows/build_packages.yml
permissions:
contents: write
with:
build_type: "dev"

test_shark_ai:
name: Test shark-ai
needs: [build_packages]
uses: ./.github/workflows/pkgci_shark_ai.yml
Loading

0 comments on commit d4f56bf

Please sign in to comment.