Skip to content

Commit faa6421

Browse files
committed
[GAP9] Add CI
1 parent 3a1d877 commit faa6421

4 files changed

Lines changed: 438 additions & 0 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
---
6+
name: _runner-gap9-tiled
7+
8+
"on":
9+
workflow_call:
10+
inputs:
11+
runner:
12+
required: true
13+
type: string
14+
docker-image:
15+
required: true
16+
type: string
17+
test-name:
18+
required: true
19+
type: string
20+
num-cores:
21+
required: false
22+
default: 8
23+
type: number
24+
L1:
25+
required: false
26+
default: "[64000]"
27+
type: string
28+
default-memory-level:
29+
required: false
30+
default: "L2"
31+
type: string
32+
double-buffer:
33+
required: false
34+
default: false
35+
type: boolean
36+
memory-allocation-strategy:
37+
required: false
38+
default: "MiniMalloc"
39+
type: string
40+
search-strategy:
41+
required: false
42+
default: "random-max"
43+
type: string
44+
45+
jobs:
46+
test-runner-gap9-tiled:
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
L1: ${{ fromJSON(inputs.L1) }}
51+
runs-on: ${{ inputs.runner }}
52+
container:
53+
image: ${{ inputs.docker-image }}
54+
steps:
55+
- name: Checkout Repo
56+
uses: actions/checkout@v4
57+
with:
58+
submodules: recursive
59+
- name: Build Deeploy
60+
shell: bash
61+
run: pip install -e .
62+
- name: Cache ccache
63+
uses: actions/cache/restore@v4
64+
with:
65+
path: /app/.ccache
66+
key: ccache-ci
67+
- name: Run Test
68+
uses: nick-fields/retry@v3
69+
with:
70+
timeout_minutes: 15
71+
max_attempts: 3
72+
retry_on: timeout
73+
command: |
74+
cd DeeployTest
75+
mkdir -p /app/.ccache
76+
export CCACHE_DIR=/app/.ccache
77+
python testRunner_tiled_gap9.py -t Tests/${{ inputs.test-name }} --cores=${{ inputs.num-cores }} --l1 ${{ matrix.L1 }} --defaultMemLevel=${{ inputs.default-memory-level }} ${{ inputs.double-buffer && '--doublebuffer' || '' }} --memAllocStrategy=${{ inputs.memory-allocation-strategy }} --searchStrategy=${{ inputs.search-strategy }}
78+
shell: bash

.github/workflows/_runner-gap9.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
---
6+
name: _runner-gap9
7+
8+
"on":
9+
workflow_call:
10+
inputs:
11+
runner:
12+
required: true
13+
type: string
14+
docker-image:
15+
required: true
16+
type: string
17+
test-names:
18+
required: true
19+
type: string
20+
num-cores:
21+
required: true
22+
type: number
23+
24+
jobs:
25+
test-runner-gap9:
26+
runs-on: ${{ inputs.runner }}
27+
container:
28+
image: ${{ inputs.docker-image }}
29+
steps:
30+
- name: Checkout Repo
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
- name: Build Deeploy
35+
shell: bash
36+
run: pip install -e .
37+
- name: Cache ccache
38+
uses: actions/cache/restore@v4
39+
with:
40+
path: /app/.ccache
41+
key: ccache-ci
42+
- name: Run Test
43+
run: |
44+
testNames="${{ inputs.test-names }}"
45+
cd DeeployTest
46+
mkdir -p /app/.ccache
47+
export CCACHE_DIR=/app/.ccache
48+
echo "$testNames" | while IFS= read -r testName; do
49+
if [[ -n "$testName" ]]; then
50+
echo "Running test: $testName"
51+
python testRunner_gap9.py -t Tests/$testName --cores=${{ inputs.num-cores }}
52+
fi
53+
done
54+
shell: bash
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
---
6+
name: CI • GAP9 (Tiled)
7+
8+
"on":
9+
push:
10+
branches:
11+
- "**"
12+
tags:
13+
- "v*.*.*"
14+
pull_request:
15+
workflow_dispatch:
16+
inputs:
17+
docker_image_deeploy:
18+
description: "Deeploy Image to use"
19+
required: false
20+
default: "ghcr.io/pulp-platform/deeploy:devel"
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
select-env:
28+
uses: ./.github/workflows/_select-env.yml
29+
with:
30+
docker_image_deeploy: ${{ inputs.docker_image_deeploy }}
31+
32+
gap9-kernels-tiled-singlebuffer-L2:
33+
needs: select-env
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
test-data:
38+
- name: "testMatMul"
39+
L1: [64000, 32000, 16000]
40+
- name: "test2DRequantizedConv"
41+
L1: [8000, 6000, 4000]
42+
- name: "test2DRequantizedStriddedPaddedConv"
43+
L1: [600]
44+
- name: "testRequantizedDWConv"
45+
L1: [2561]
46+
- name: "iSoftmax"
47+
L1: [800, 500, 300]
48+
- name: "testConcat"
49+
L1: [32000, 16000, 8000]
50+
- name: "testRMSNorm"
51+
L1: [2048, 1024, 512]
52+
- name: "Hardswish"
53+
L1: [750]
54+
- name: "RQHardswish"
55+
L1: [750]
56+
- name: "testFloatGEMM"
57+
L1: [8000]
58+
- name: "testFloat2DConvolution"
59+
L1: [1600]
60+
- name: "testFloat2DConvolutionBias"
61+
L1: [6600]
62+
- name: "testFloat2DConvolutionZeroBias"
63+
L1: [6600]
64+
- name: "testFloat2DDWConvolution"
65+
L1: [7200]
66+
- name: "testFloat2DDWConvolutionBias"
67+
L1: [7200]
68+
- name: "testFloat2DDWConvolutionZeroBias"
69+
L1: [7200]
70+
- name: "testFloatLayerNorm"
71+
L1: [2000]
72+
- name: "testFloatMaxPool"
73+
L1: [2000]
74+
- name: "testFloatMatmul"
75+
L1: [2000]
76+
- name: "testFloatRelu"
77+
L1: [2000]
78+
- name: "testFloatReshapeWithSkipConnection"
79+
L1: [1400]
80+
- name: "testFloatSoftmax"
81+
L1: [4000]
82+
- name: "testFloatTranspose"
83+
L1: [2000]
84+
- name: "testFloatMul"
85+
L1: [2000]
86+
- name: "largeFloatAdd"
87+
L1: [220000]
88+
- name: "testRQGEMMwBatch"
89+
L1: [20000]
90+
- name: "testMatMulBatch"
91+
L1: [20000]
92+
uses: ./.github/workflows/_runner-gap9-tiled.yml
93+
with:
94+
runner: ${{ needs.select-env.outputs.runner }}
95+
docker-image: ${{ needs.select-env.outputs.image }}
96+
test-name: ${{ matrix.test-data.name }}
97+
num-cores: 8
98+
L1: ${{ toJson(matrix.test-data.L1) }}
99+
100+
gap9-kernels-tiled-doublebuffer-L2:
101+
needs: select-env
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
test-data:
106+
- name: "testMatMul"
107+
L1: [64000, 32000, 16000]
108+
- name: "test2DRequantizedConv"
109+
L1: [8000, 6000, 5000]
110+
- name: "testRequantizedDWConv"
111+
L1: [5121]
112+
- name: "iSoftmax"
113+
L1: [1600, 1000, 600]
114+
- name: "testConcat"
115+
L1: [64000, 32000, 16000]
116+
- name: "testRMSNorm"
117+
L1: [4096, 2048, 1024]
118+
- name: "Hardswish"
119+
L1: [750]
120+
- name: "RQHardswish"
121+
L1: [800]
122+
- name: "testFloatGEMM"
123+
L1: [8000]
124+
- name: "testFloat2DConvolution"
125+
L1: [2000]
126+
- name: "testFloat2DConvolutionBias"
127+
L1: [8800]
128+
- name: "testFloat2DConvolutionZeroBias"
129+
L1: [8800]
130+
- name: "testFloat2DDWConvolution"
131+
L1: [9800]
132+
- name: "testFloat2DDWConvolutionBias"
133+
L1: [10000]
134+
- name: "testFloat2DDWConvolutionZeroBias"
135+
L1: [9800]
136+
- name: "testFloatLayerNorm"
137+
L1: [2000]
138+
- name: "testFloatMaxPool"
139+
L1: [5000]
140+
- name: "testFloatMatmul"
141+
L1: [5000]
142+
- name: "testFloatRelu"
143+
L1: [20]
144+
- name: "testFloatReshapeWithSkipConnection"
145+
L1: [2600]
146+
- name: "testFloatSoftmax"
147+
L1: [8000]
148+
- name: "testFloatTranspose"
149+
L1: [2000]
150+
- name: "testFloatMul"
151+
L1: [2000]
152+
uses: ./.github/workflows/_runner-gap9-tiled.yml
153+
with:
154+
runner: ${{ needs.select-env.outputs.runner }}
155+
docker-image: ${{ needs.select-env.outputs.image }}
156+
test-name: ${{ matrix.test-data.name }}
157+
num-cores: 8
158+
L1: ${{ toJson(matrix.test-data.L1) }}
159+
double-buffer: true
160+
161+
gap9-models-tiled-singlebuffer-L2:
162+
needs: select-env
163+
strategy:
164+
fail-fast: false
165+
matrix:
166+
test-data:
167+
- name: "simpleRegression"
168+
L1: [45000, 30000, 15000]
169+
- name: "miniMobileNet"
170+
L1: [60000, 12000, 6000, 3000]
171+
- name: "miniMobileNetv2"
172+
L1: [60000, 16000, 12000, 8000]
173+
- name: "Attention"
174+
L1: [60000, 10000, 5000]
175+
- name: "MLPerf/KeywordSpotting"
176+
L1: [64000]
177+
- name: "MLPerf/ImageClassification"
178+
L1: [64000]
179+
- name: "MLPerf/AnomalyDetection"
180+
L1: [64000]
181+
num-cores: [8]
182+
uses: ./.github/workflows/_runner-gap9-tiled.yml
183+
with:
184+
runner: ${{ needs.select-env.outputs.runner }}
185+
docker-image: ${{ needs.select-env.outputs.image }}
186+
test-name: ${{ matrix.test-data.name }}
187+
num-cores: ${{ matrix.num-cores }}
188+
L1: ${{ toJson(matrix.test-data.L1) }}
189+
190+
gap9-models-tiled-doublebuffer-L2:
191+
needs: select-env
192+
strategy:
193+
fail-fast: false
194+
matrix:
195+
test-data:
196+
- name: "simpleRegression"
197+
L1: [60000, 45000, 30000]
198+
- name: "miniMobileNet"
199+
L1: [60000, 24000, 12000, 6000]
200+
- name: "miniMobileNetv2"
201+
L1: [60000, 32000, 24000, 16000]
202+
- name: "Attention"
203+
L1: [60000, 20000, 10000, 5000]
204+
num-cores: [8]
205+
double-buffer: [true]
206+
uses: ./.github/workflows/_runner-gap9-tiled.yml
207+
with:
208+
runner: ${{ needs.select-env.outputs.runner }}
209+
docker-image: ${{ needs.select-env.outputs.image }}
210+
test-name: ${{ matrix.test-data.name }}
211+
num-cores: ${{ matrix.num-cores }}
212+
L1: ${{ toJson(matrix.test-data.L1) }}
213+
double-buffer: ${{ matrix.double-buffer }}

0 commit comments

Comments
 (0)