-
Notifications
You must be signed in to change notification settings - Fork 2
193 lines (187 loc) · 7.37 KB
/
tests.yml
File metadata and controls
193 lines (187 loc) · 7.37 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
name: Test example applications
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
# Cancel previous running actions for the same PR
cancel_previous:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.11.0
checks:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
# --- Update code ---
- name: "Checkout code"
uses: actions/checkout@v3
with:
submodules: true
# --- Formatting ---
- name: "Format code"
run: ./bin/inv_wrapper.sh format-code --check
build-examples:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm/examples-build:0.2.2_0.2.3
steps:
- name: "Checkout code"
uses: actions/checkout@v3
with:
submodules: true
- name: "Build FFmpeg"
run: ./bin/inv_wrapper.sh ffmpeg
- name: "Build ImageMagick"
run: ./bin/inv_wrapper.sh libpng imagemagick
- name: "Build Kernels"
run: ./bin/inv_wrapper.sh kernels kernels --native
- name: "Build LAMMPS"
run: ./bin/inv_wrapper.sh lammps lammps --native
- name: "Build Lulesh"
run: ./bin/inv_wrapper.sh lulesh lulesh --native
- name: "Build TensorFlow"
run: ./bin/inv_wrapper.sh tensorflow
- name: "Upload examples wasm"
uses: actions/upload-artifact@v3.1.0
with:
name: examples-wasm
path: /usr/local/faasm/wasm
- name: "Copy WASM files to distribute as an artifact"
run: ./bin/inv_wrapper.sh wasm
- uses: actions/upload-artifact@v3
with:
name: examples-wasm
path: ./wasm
run-examples:
if: github.event.pull_request.draft == false
needs: [build-examples]
runs-on: ubuntu-latest
defaults:
run:
working-directory: /usr/local/code/faasm
env:
CGROUP_MODE: off
DEFAULT_MPI_WORLD_SIZE: 4
HOST_TYPE: ci
LOG_LEVEL: info
NETNS_MODE: off
OVERRIDE_CPU_COUNT: 30
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm/examples-run:0.9.4
services:
redis:
image: faasm/redis:0.9.4
minio:
image: faasm/minio:0.9.4
env:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
steps:
- name: "Download examples wasm"
uses: actions/download-artifact@v3.0.1
with:
name: examples-wasm
path: /usr/local/faasm/wasm
- name: "Run codegen for all the examples"
run: |
./bin/inv_wrapper.sh codegen.user kernels-mpi
./bin/inv_wrapper.sh codegen.user kernels-omp
./bin/inv_wrapper.sh codegen imagemagick main
./bin/inv_wrapper.sh codegen lammps main
./bin/inv_wrapper.sh codegen lulesh main
./bin/inv_wrapper.sh codegen ffmpeg check
./bin/inv_wrapper.sh codegen tf check
- name: "Put all data files in place"
run: ./bin/inv_wrapper.sh data
working-directory: /code/examples
- name: "Run MPI kernels"
run: |
# The global MPI kernel stopped working when enabling SIMD
# ./bin/inv_wrapper.sh run.pool kernels-mpi global --cmdline '10 1024'
./bin/inv_wrapper.sh run.pool kernels-mpi p2p --cmdline '10 1024 1024'
./bin/inv_wrapper.sh run.pool kernels-mpi sparse --cmdline '10 10 5'
./bin/inv_wrapper.sh run.pool kernels-mpi transpose --cmdline '10 1024 32'
./bin/inv_wrapper.sh run.pool kernels-mpi stencil --cmdline '10 1000'
# The dgemm MPI kernel does not work because we are missing
# implementations for MPI_Comm_group, MPI_Group_incl, and MPI_Comm_create
# ./bin/inv_wrapper.sh run.pool kernels-mpi dgemm --cmdline '10 1024 32 1'
./bin/inv_wrapper.sh run.pool kernels-mpi nstream --cmdline '10 1024 32'
./bin/inv_wrapper.sh run.pool kernels-mpi reduce --cmdline '10 1024'
# The random MPI kernel does not work because we are missing
# implementations for MPI_Alltoallv
# ./bin/inv_wrapper.sh run.pool kernels-mpi random --cmdline '32 20'
- name: "Run OpenMP kernels"
run: |
./bin/inv_wrapper.sh run.pool kernels-omp global --cmdline '2 10 1024'
./bin/inv_wrapper.sh run.pool kernels-omp p2p --cmdline '2 10 1024 1024'
# The sparse OpenMP kernel fails during the result integrity checks
# ./bin/inv_wrapper.sh run.pool kernels-omp sparse --cmdline '2 10 10 5'
# The transpose OpenMP kernel can not be cross-compiled due to problems
# with the static_for signature and symbol definition
# ./bin/inv_wrapper.sh run.pool kernels-omp transpose --cmdline '10 1024 32'
# The stencil OpenMP kernel can not be cross-compiled due to a problem
# with the faasm_sm_reduce signature
# ./bin/inv_wrapper.sh run.pool kernels-omp stencil --cmdline '10 1000'
./bin/inv_wrapper.sh run.pool kernels-omp dgemm --cmdline '2 2 1024 32'
./bin/inv_wrapper.sh run.pool kernels-omp nstream --cmdline '2 10 1024 32'
./bin/inv_wrapper.sh run.pool kernels-omp reduce --cmdline '2 10 1024'
# The random OpenMP kernel can not be cross-compiled due to a problem
# with the faasm_sm_reduce signature
# ./bin/inv_wrapper.sh run.pool kernels-omp random --cmdline '32 20'
- name: "Run ImageMagick"
run: ./bin/inv_wrapper.sh run imagemagick main --cmdline 'faasm://im/sample_image.png -flip faasm://im/image_out.png'
- name: "Run LAMMPS"
run: ./bin/inv_wrapper.sh run.pool lammps main --cmdline '-in faasm://lammps-data/in.controller.wall'
- name: "Run LULESH"
run: ./bin/inv_wrapper.sh run.pool lulesh main --cmdline '-i 5 -s 20 -r 11 -c 1 -b 1' --data '4'
- name: "Run TFlite check"
run: ./bin/inv_wrapper.sh run tf check
- name: "Run FFmpeg check"
run: ./bin/inv_wrapper.sh run ffmpeg check
run-sgx-examples:
if: github.event.pull_request.draft == false
needs: [build-examples]
runs-on: ubuntu-latest
env:
WASM_VM: sgx
container:
image: faasm/examples-run-sgx-sim:0.9.4
services:
redis:
image: faasm/redis:0.9.4
minio:
image: faasm/minio:0.9.4
env:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
steps:
- name: "Download examples wasm"
uses: actions/download-artifact@v3.0.1
with:
name: examples-wasm
path: /usr/local/faasm/wasm
- name: "Checkout latest Faasm code"
uses: actions/checkout@v3
with:
repository: faasm/faasm
# TODO: remove after merge
ref: wamr-fs
submodules: true
- name: "Re-build targets"
run: ./bin/inv_wrapper.sh dev.tools --sgx Simulation
- name: "Run codegen"
run: |
./bin/inv_wrapper.sh codegen imagemagick main
./bin/inv_wrapper.sh codegen tf check
- name: "Run ImageMagick"
run: ./bin/inv_wrapper.sh run imagemagick main --cmdline 'faasm://im/sample_image.png -flip faasm://im/image_out.png'
- name: "Run TFlite check"
run: ./bin/inv_wrapper.sh run tf check