Updated e2eshark CI #115
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 Advanced Micro Devices | |
# | |
# 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: E2ESHARK Test Suite | |
on: | |
workflow_dispatch: | |
pull_request: | |
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: | |
turbine: | |
runs-on: nodai-amdgpu-mi250-x86-64 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
repository: nod-ai/SHARK-Turbine | |
ref: torch_2.1_support | |
path: turbine | |
e2eshark: | |
needs: [turbine] | |
runs-on: nodai-amdgpu-mi250-x86-64 | |
env: | |
E2E_VENV_DIR: ${{ github.workspace }}/test-suite_venv | |
TURBINE_VENV_DIR: ${{ github.workspace }}/turbine_venv | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
repository: nod-ai/SHARK-TestSuite | |
path: test-suite | |
- name: "Setup e2eshark python venv" | |
run: | | |
python3.11 -m venv ${E2E_VENV_DIR} | |
pip install --upgrade pip | |
pip install torch-mlir -f https://github.com/llvm/torch-mlir-release/releases/expanded_assets/dev-wheels | |
pip install -r ./e2eshark/requirements.txt | |
working-directory: ./test-suite | |
# - name: Run Onnx Mode | |
# run: | | |
# source ${E2E_VENV_DIR}/bin/activate | |
# cd e2eshark | |
# free -mh | |
# HF_TOKEN=${{ secrets.HF_TOKEN }} AZ_PRIVATE_CONNECTION=${{ secrets.AZ_PRIVATE_CONNECTION }} python3.11 ./run.py -r ./test-onnx --report --cachedir ~/huggingface_cache --mode onnx -f onnx pytorch -g models --tolerance .001 .001 --cleanup --postprocess --ci -v | |
# working-directory: ./test-suite | |
- name: Steup turbine python venv | |
run: | | |
python3.11 -m venv ${TURBINE_VENV_DIR} | |
source ${TURBINE_VENV_DIR}/bin/activate | |
pip install --upgrade pip | |
pip install --index-url https://download.pytorch.org/whl/cpu \ | |
-r ../turbine/core/pytorch-cpu-requirements.txt \ | |
-r ../turbine/core/torchvision-requirements.txt | |
pip install --upgrade -r ../turbine/core/requirements.txt | |
pip install -e ../turbine/core[testing] | |
pip install -e ../turbine/models | |
pip uninstall -y transformers | |
pip install transformers --no-dependencies | |
working-directory: ./test-suite | |
- name: Run Turbine Mode | |
run: | | |
source ${TURBINE_VENV_DIR}/bin/activate | |
cd e2eshark | |
free -mh | |
HF_TOKEN=${{ secrets.HF_TOKEN }} python3.11 ./run.py -r ./test-turbine --report --cachedir ~/huggingface_cache --mode turbine -g models --cleanup --postprocess --ci -v | |
working-directory: ./test-suite | |
upload_artifacts: | |
needs: [e2eshark] | |
runs-on: nodai-amdgpu-mi250-x86-64 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
with: | |
repository: nod-ai/e2eshark-reports | |
ref: 'main' | |
token: ${{ secrets.E2ESHARK_GITHUB_TOKEN }} | |
path: e2eshark-reports | |
- name: Push artifacts | |
run: | | |
date=$(date '+%Y-%m-%d') | |
cd ../test-suite/e2eshark/ci_reports | |
mv $date ../../../e2eshark-reports | |
cd ../../../e2eshark-reports | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git add $date | |
git commit -m "add CI reports for e2eshark" | |
git push origin main | |
working-directory: ./e2eshark-reports |