forked from deepjavalibrary/djl-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
202 lines (197 loc) · 7.27 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
name: Canary-GPU
on:
workflow_call:
inputs:
repo-id:
description: 'staging repository id to test'
required: false
type: string
default: ''
djl-version:
description: 'djl version to test'
type: string
required: false
pt-version:
description: 'pytorch version to test'
type: string
required: false
default: ''
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-cuda113:
if: github.repository == 'deepjavalibrary/djl-demo'
runs-on: [ self-hosted, gpu ]
container:
image: nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.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 17
uses: actions/setup-java@v3
with:
java-version: 17
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/
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 Xgboost GPU
working-directory: canary
run: |
set -x
DJL_ENGINE=xgboost-gpu ./gradlew clean run
rm -rf /root/.djl.ai/
canary-test-cuda121:
if: github.repository == 'deepjavalibrary/djl-demo'
runs-on: [ self-hosted, gpu ]
container:
image: nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.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 17
uses: actions/setup-java@v3
with:
java-version: 17
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
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.2.2 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_VERSION=2.3.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.13.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=2.2.2 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-auto PYTORCH_PRECXX11=true PYTORCH_VERSION=2.3.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-cu121 ./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-cu121 PT_VERSION=2.2.2 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu121 PT_VERSION=2.3.1 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu121-precxx11 ./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-cu121-precxx11 PT_VERSION=2.2.2 ./gradlew clean run
rm -rf /root/.djl.ai/
DJL_ENGINE=pytorch-native-cu121-precxx11 PT_VERSION=2.3.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/
DJL_ENGINE=tensorflow-native-cu121 ./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-cuda113, canary-test-cuda121 ]
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