-
Notifications
You must be signed in to change notification settings - Fork 129
329 lines (322 loc) · 13.3 KB
/
canary-gpu.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
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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
name: Canary-GPU
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
inputs:
repo-id:
description: 'staging repository id to test'
required: false
default: ''
djl-version:
description: 'djl version to test'
required: false
pt-version:
description: 'pytorch version to test'
required: false
default: ''
jobs:
canary-test-cuda112:
if: github.repository == 'deepjavalibrary/djl-demo'
runs-on: [ self-hosted, gpu ]
container:
image: nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu18.04
options: --gpus all --runtime=nvidia
env:
AWS_REGION: us-east-1
DJL_STAGING: ${{github.event.inputs.repo-id}}
DJL_VERSION: ${{github.event.inputs.djl-version}}
PT_VERSION: ${{github.event.inputs.pt-version}}
timeout-minutes: 30
needs: create-gpu-runner
steps:
- name: Setup Environment
run: |
apt-get update
apt-get install -y software-properties-common wget libgomp1
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: corretto
- name: Test MXNet
working-directory: canary
run: |
set -x
DJL_ENGINE=mxnet-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=mxnet-native-mkl ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=mxnet-native-cu112mkl ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test PyTorch
working-directory: canary
run: |
set -x
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=$PT_VERSION ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=$PT_VERSION ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cpu-precxx11 ./gradlew clean run
rm -rf /root/.djl.ai/
# not support lower version of CUDA since 0.22.0, fallback to CPU
DJL_ENGINE=pytorch-native-cu117 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu113 PT_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu116 PT_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117 PT_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu118 PT_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117-precxx11 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu113-precxx11 PT_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu116-precxx11 PT_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117-precxx11 PT_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu118-precxx11 PT_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Tensorflow
working-directory: canary
run: |
set -x
DJL_ENGINE=mxnet-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=tensorflow-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
# tensorflow-native-cu113 cannot run on CU112 since 0.22.0
- name: Test Paddle
working-directory: canary
run: |
set -x
mkdir -p $HOME/.djl.ai/paddle/2.3.2-cu112-linux-x86_64
DJL_CACHE_DIR=$HOME/.djl.ai/ DJL_ENGINE=paddlepaddle-native-auto \
LD_LIBRARY_PATH=$DJL_CACHE_DIR/paddle/2.3.2-cu112-linux-x86_64 \
./gradlew clean run
rm -rf /root/.djl.ai/
mkdir -p $HOME/.djl.ai/paddle/2.3.2-20221103-cu112-linux-x86_64
DJL_CACHE_DIR=$HOME/.djl.ai/ DJL_ENGINE=paddlepaddle-native-cu112 \
LD_LIBRARY_PATH=$DJL_CACHE_DIR/paddle/2.3.2-20221103-cu112-linux-x86_64 \
./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Xgboost GPU
working-directory: canary
run: |
DJL_ENGINE=xgboost-gpu ./gradlew clean run
rm -rf /root/.djl.ai/
canary-test-cuda113:
if: github.repository == 'deepjavalibrary/djl-demo'
runs-on: [ self-hosted, gpu ]
container:
image: nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu18.04
options: --gpus all --runtime=nvidia
env:
AWS_REGION: us-east-1
DJL_STAGING: ${{github.event.inputs.repo-id}}
DJL_VERSION: ${{github.event.inputs.djl-version}}
PT_VERSION: ${{github.event.inputs.pt-version}}
timeout-minutes: 30
needs: create-gpu-runner
steps:
- name: Setup Environment
run: |
apt-get update
apt-get install -y software-properties-common wget libgomp1
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: corretto
- name: Test MXNet
working-directory: canary
run: |
set -x
DJL_ENGINE=mxnet-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=mxnet-native-mkl ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test PyTorch
working-directory: canary
run: |
set -x
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=$PT_VERSION ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=2.0.1 PYTORCH_FLAVOR=cu118 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=2.0.1 PYTORCH_FLAVOR=cu118-precxx11 ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Tensorflow
working-directory: canary
run: |
set -x
DJL_ENGINE=tensorflow-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=tensorflow-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=tensorflow-native-cu113 ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Paddle
working-directory: canary
run: |
set -x
DJL_ENGINE=paddlepaddle-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=paddlepaddle-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Xgboost GPU
working-directory: canary
run: |
set -x
DJL_ENGINE=xgboost-gpu ./gradlew clean run
rm -rf /root/.djl.ai/
canary-test-cuda118:
if: github.repository == 'deepjavalibrary/djl-demo'
runs-on: [ self-hosted, gpu ]
container:
image: nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu18.04
options: --gpus all --runtime=nvidia
env:
AWS_REGION: us-east-1
DJL_STAGING: ${{github.event.inputs.repo-id}}
DJL_VERSION: ${{github.event.inputs.djl-version}}
PT_VERSION: ${{github.event.inputs.pt-version}}
timeout-minutes: 30
needs: create-gpu-runner
steps:
- name: Setup Environment
run: |
apt-get update
apt-get install -y software-properties-common wget libgomp1
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: corretto
- name: Test MXNet
working-directory: canary
run: |
set -x
DJL_ENGINE=mxnet-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=mxnet-native-mkl ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test PyTorch
working-directory: canary
run: |
set -x
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=$PT_VERSION ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=$PT_VERSION ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cpu-precxx11 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu113 PT_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu116 PT_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117 PT_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu118 PT_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117-precxx11 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu113-precxx11 PT_VERSION=1.11.0 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu116-precxx11 PT_VERSION=1.12.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu117-precxx11 PT_VERSION=1.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu118-precxx11 PT_VERSION=2.0.1 ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Tensorflow
working-directory: canary
run: |
set -x
DJL_ENGINE=tensorflow-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=tensorflow-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Paddle
working-directory: canary
run: |
set -x
DJL_ENGINE=paddlepaddle-native-auto ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=paddlepaddle-native-cpu ./gradlew clean run
rm -rf /root/.djl.ai/
- name: Test Xgboost GPU
working-directory: canary
run: |
set -x
DJL_ENGINE=xgboost-gpu ./gradlew clean run
rm -rf /root/.djl.ai/
create-gpu-runner:
if: github.repository == 'deepjavalibrary/djl-demo'
runs-on: [ self-hosted, scheduler ]
steps:
- name: Create new GPU instance
id: create_gpu
run: |
cd /home/ubuntu/djl_benchmark_script/scripts
token=$( curl -X POST -H "Authorization: token ${{ secrets.ACTION_RUNNER_PERSONAL_TOKEN }}" \
https://api.github.com/repos/deepjavalibrary/djl-demo/actions/runners/registration-token \
--fail \
| jq '.token' | tr -d '"' )
./start_instance.sh action_gpu $token djl-demo
outputs:
gpu_instance_id: ${{ steps.create_gpu.outputs.action_gpu_instance_id }}
stop-runners:
if: always()
runs-on: [ self-hosted, scheduler ]
needs: [ create-gpu-runner, canary-test-cuda112, canary-test-cuda113, canary-test-cuda118 ]
steps:
- name: Stop all instances
run: |
cd /home/ubuntu/djl_benchmark_script/scripts
instance_id=${{ needs.create-gpu-runner.outputs.gpu_instance_id }}
./stop_instance.sh $instance_id