Skip to content

[fusili] Dependency cleanup (remove IREE/LLVM/Catch2 source builds, bring in lit & filecheck standalone) #6300

[fusili] Dependency cleanup (remove IREE/LLVM/Catch2 source builds, bring in lit & filecheck standalone)

[fusili] Dependency cleanup (remove IREE/LLVM/Catch2 source builds, bring in lit & filecheck standalone) #6300

Workflow file for this run

# 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: CI - sharktank perplexity short
on:
workflow_dispatch:
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_perplexity:
name: "Perplexity tests"
strategy:
matrix:
version: [3.11]
runs-on: [linux-mi300-1gpu-ossci-nod-ai]
fail-fast: false
runs-on: ${{matrix.runs-on}}
defaults:
run:
shell: bash
env:
VENV_DIR: ${{ github.workspace }}/.venv
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{matrix.version}}
- name: Create Python venv
run: python -m venv ${VENV_DIR}
- name: Install sharktank deps
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.
pip install --no-compile -r pytorch-rocm-requirements.txt
pip install -r requirements-iree-pinned.txt
pip install --no-compile \
-r sharktank/requirements-tests.txt \
-e sharktank/
pip freeze
- name: Run Perplexity tests
run: |
source ${VENV_DIR}/bin/activate
mkdir perplexity_ci_artifacts
python -m sharktank.models.deepseek.toy_deepseek -o "perplexity_ci_artifacts/toy_deepseek.irpa"
pytest \
-n 8 \
-v \
-s \
sharktank/tests/evaluate/ \
--run-quick-test \
--bs=4 \
--device='cuda:0' \
--iree-device=hip://0 \
--iree-hip-target=gfx942 \
--iree-hal-target-device=hip \
--llama3-8b-f16-model-path=/shark-dev/data/llama3.1/weights/8b/fp16/llama3.1_8b_fp16_instruct.irpa \
--llama3-8b-f8-model-path=/shark-dev/8b/fp8/attnf8/native_fp8_e4m3fnuz_llama3_8b.irpa \
--llama3-8b-tokenizer-path=/shark-dev/data/llama3.1/weights/8b/fp16/tokenizer_config.json \
--deepseek-v3-model-path=perplexity_ci_artifacts/toy_deepseek.irpa \
--log-cli-level=INFO
ls -lha ${{ github.workspace }}/perplexity_ci_artifacts