forked from nod-ai/SHARK-TestSuite
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (122 loc) · 3.98 KB
/
test_e2eshark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# 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:
schedule:
# Runs at 12:00 PM UTC, which is 5:00 AM PST
- cron: '0 12 * * *'
jobs:
e2eshark:
runs-on: nodai-amdgpu-mi250-x86-64
env:
E2E_VENV_DIR: ${{ github.workspace }}/test-suite_venv
steps:
- name: Checkout Test Suite
uses: actions/checkout@v2
with:
repository: nod-ai/SHARK-TestSuite
path: test-suite
- name: Checkout SHARK Turbine
uses: actions/checkout@v2
with:
repository: nod-ai/SHARK-Turbine
path: SHARK-Turbine
- name: Checkout iree turbine
uses: actions/checkout@v2
with:
repository: iree-org/iree-turbine
path: iree-turbine
- name: "Setup e2eshark python venv"
run: |
python3.11 -m venv ${E2E_VENV_DIR}
source ${E2E_VENV_DIR}/bin/activate
pip install --upgrade pip
pip install -r ./e2eshark/requirements.txt
pip uninstall -y numpy
pip install numpy==1.26.3
pip install --upgrade transformers
pip install \
--find-links https://iree.dev/pip-release-links.html \
--upgrade \
iree-compiler \
iree-runtime
pip install \
--find-links https://github.com/llvm/torch-mlir-release/releases/expanded_assets/dev-wheels \
--upgrade \
torch-mlir
working-directory: ./test-suite
- name: Run Onnx Mode
run: |
source ${E2E_VENV_DIR}/bin/activate
pip list
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 ~/sai/test-suite-ci-cache \
--mode onnx \
-f onnx pytorch \
-g models \
--tolerance .01 .01 \
--cleanup \
--postprocess \
--ci \
-v
working-directory: ./test-suite
- name: Setup turbine python venv
run: |
source ${E2E_VENV_DIR}/bin/activate
pip install -f https://iree.dev/pip-release-links.html --upgrade \
-r ../iree-turbine/iree-requirements.txt
pip install -e ../iree-turbine[testing]
pip install -e ../SHARK-Turbine/models
working-directory: ./test-suite
- name: Run Turbine Mode
run: |
source ${E2E_VENV_DIR}/bin/activate
cd e2eshark
free -mh
HF_TOKEN=${{ secrets.HF_TOKEN }} python3.11 ./run.py \
-r ./test-turbine \
--report \
--cachedir ~/sai/test-suite-ci-cache \
--mode turbine \
-g models \
--cleanup \
--postprocess \
--ci \
-v
working-directory: ./test-suite
- uses: actions/upload-artifact@master
with:
name: ci_reports
path: ./test-suite/e2eshark/ci_reports
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
- uses: actions/download-artifact@master
with:
name: ci_reports
path: ./e2eshark-reports
- name: Push artifacts
run: |
date=$(date '+%Y-%m-%d')
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