-
Notifications
You must be signed in to change notification settings - Fork 53
217 lines (199 loc) · 7.21 KB
/
Copy pathci.yml
File metadata and controls
217 lines (199 loc) · 7.21 KB
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
name: Olive Recipes CI
permissions:
contents: read
on:
schedule:
- cron: '0 15 * * 5'
push:
branches:
- main
workflow_dispatch:
inputs:
test_scope:
type: choice
description: 'Which tests to run'
options:
- all
- linux-cpu-only
- linux-gpu-only
- windows-cpu-only
default: all
env:
PYTHON_VERSION: "3.10"
jobs:
linux-cpu:
name: Linux CPU - ${{ matrix.test.name }}
if: |
github.event.inputs.test_scope == 'all' ||
github.event.inputs.test_scope == 'linux-cpu-only' ||
github.event.inputs.test_scope == ''
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
test:
- name: "PTQ"
path: "intel-bert-base-uncased-mrpc/oci/cpu"
config: "ptq.json"
- name: "INC Smooth Quant"
path: "intel-bert-base-uncased-mrpc/oci/cpu"
config: "inc_smooth_quant.json"
- name: "ResNet-50 Session Param Tuning"
path: "microsoft-resnet-50/olive"
config: "resnet_cpu.json"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Olive
run: pip install git+https://github.com/microsoft/Olive.git@main
- name: Install optimum-onnx for HuggingFace export
run: pip install optimum-onnx
- name: Install requirements
working-directory: ${{ matrix.test.path }}
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run Olive workflow and verify output
working-directory: ${{ matrix.test.path }}
env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
run: python ${{ github.workspace }}/.github/scripts/verify_model.py ${{ matrix.test.config }}
# ========================================
# GPU TESTS TEMPORARILY DISABLED and Will re-enable once pool hardware is upgraded
# ========================================
# linux-gpu:
# name: Linux GPU - ${{ matrix.name }}
# if: |
# github.event.inputs.test_scope == 'all' ||
# github.event.inputs.test_scope == 'linux-gpu-only' ||
# github.event.inputs.test_scope == ''
# runs-on: ["self-hosted", "1ES.Pool=olive-github-ubuntu2204-cuda-A10"]
# timeout-minutes: 180
# strategy:
# fail-fast: false
# max-parallel: 1
# matrix:
# include:
# - name: "Dora"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "dora.json"
# - name: "HQQ"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "hqq.json"
# - name: "Lmeval"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "lmeval.json"
# - name: "Lmeval-ONNX"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "lmeval_onnx.json"
# - name: "Loha"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "loha.json"
# - name: "Lokr"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "lokr.json"
# - name: "QLoRA"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "qlora.json"
# - name: "RTN"
# path: "meta-llama-Llama-3.2-1B-Instruct/olive"
# config: "rtn.json"
#
# steps:
# - name: DEBUG - Print system and GPU information
# run: |
# echo "=========================================="
# echo "DEBUG: This step is running!"
# echo "=========================================="
# uname -a || true
# echo "--- Attempting to get Azure VM metadata ---"
# curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2021-02-01" 2>/dev/null | jq '.' || echo "Metadata not available"
# echo "--- GPU Information ---"
# nvidia-smi --query-gpu=name,compute_cap,driver_version,memory.total --format=csv || echo "nvidia-smi failed"
# nvidia-smi || echo "nvidia-smi not found"
# echo "=========================================="
# echo "DEBUG: Step completed!"
# echo "=========================================="
#
# - uses: actions/checkout@v4
#
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
#
# - name: Install Olive
# run: pip install git+https://github.com/microsoft/Olive.git@main
#
# - name: Install ONNX Runtime GPU
# run: pip install onnxruntime-gpu
#
# - name: Install optimum-onnx for HuggingFace export
# run: pip install optimum-onnx
#
# - name: Install requirements
# working-directory: ${{ matrix.path }}
# run: |
# if [ -f requirements.txt ]; then
# pip install -r requirements.txt
# fi
#
# - name: Run Olive workflow and verify output
# working-directory: ${{ matrix.path }}
# env:
# HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
# run: python ${{ github.workspace }}/.github/scripts/verify_model.py ${{ matrix.config }}
#
# - name: Cleanup GPU
# if: always()
# run: |
# nvidia-smi
# python -c "import torch; torch.cuda.empty_cache()" || true
# - name: Upload artifacts
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: linux-gpu-${{ matrix.name }}-output
# path: ${{ matrix.path }}/models/
# retention-days: 7
windows-cpu:
name: Windows CPU - ${{ matrix.test.name }}
if: |
github.event.inputs.test_scope == 'all' ||
github.event.inputs.test_scope == 'windows-cpu-only' ||
github.event.inputs.test_scope == ''
runs-on: windows-latest
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
test:
- name: "PTQ"
path: "intel-bert-base-uncased-mrpc/oci/cpu"
config: "ptq.json"
# Temporarily disabled - has dtype issues
# - name: "INC Smooth Quant"
# path: "intel-bert-base-uncased-mrpc/oci/cpu"
# config: "inc_smooth_quant.json"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Olive
run: pip install git+https://github.com/microsoft/Olive.git@main
- name: Install optimum-onnx for HuggingFace export
run: pip install optimum-onnx
- name: Install requirements
working-directory: ${{ matrix.test.path }}
shell: pwsh
run: |
if (Test-Path requirements.txt) { pip install -r requirements.txt }
- name: Run Olive workflow and verify output
working-directory: ${{ matrix.test.path }}
shell: pwsh
env:
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
PYTHONIOENCODING: utf-8
run: python ${{ github.workspace }}/.github/scripts/verify_model.py ${{ matrix.test.config }}