-
Notifications
You must be signed in to change notification settings - Fork 4
138 lines (118 loc) · 4.59 KB
/
Copy pathhardware.yml
File metadata and controls
138 lines (118 loc) · 4.59 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
name: models-hardware
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: models-hardware-${{ github.ref }}
cancel-in-progress: true
jobs:
scope:
name: scope (hardware)
runs-on: ubuntu-24.04
timeout-minutes: 10
outputs:
run_all: ${{ steps.discover.outputs.run_all }}
v1_quantized: ${{ steps.discover.outputs.v1_quantized }}
v1_akida: ${{ steps.discover.outputs.v1_akida }}
v2_quantized: ${{ steps.discover.outputs.v2_quantized }}
v2_akida: ${{ steps.discover.outputs.v2_akida }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
lfs: false
- name: Discover models in scope
id: discover
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
python test/discover_models.py --all --github-output >> "$GITHUB_OUTPUT"
else
python test/discover_models.py --diff "origin/${{ github.base_ref }}" --github-output >> "$GITHUB_OUTPUT"
fi
akd1500:
name: AKD1500 (v1 models)
needs: scope
if: >-
(github.event_name == 'workflow_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository) &&
(needs.scope.outputs.v1_quantized != '' || needs.scope.outputs.v1_akida != '')
runs-on: [self-hosted, linux, akd1500]
timeout-minutes: 120
container:
image: bender:5000/akida-gpu-tf2.19:2.19.3
options: --privileged
volumes:
- /dev/akd1500_0:/dev/akd1500_0
- /opt/ci-cache/lfs:/lfs-cache
env:
MODELS: ${{ needs.scope.outputs.v1_quantized }} ${{ needs.scope.outputs.v1_akida }}
steps:
- name: Report host
run: echo "Running on $(hostname)"
- name: Ensure git and git-lfs
run: |
(command -v git && command -v git-lfs) >/dev/null 2>&1 || \
(apt-get update && apt-get install -y git git-lfs)
- uses: actions/checkout@v5
with:
lfs: false
- name: Fetch model files (LFS, scoped, cached)
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global lfs.storage /lfs-cache
INCLUDE=$(echo $MODELS | xargs | tr ' ' ',')
git lfs pull --include="$INCLUDE"
- name: Install pinned toolchain
run: |
AKIDA_MODELS_SPEC=$(grep -oE 'akida_models==[0-9][0-9a-z.]*' pyproject.toml | head -1)
pip install "$AKIDA_MODELS_SPEC" pytest pytest-rerunfailures
- name: Check device
run: |
python -c "import akida; ds = akida.devices(); print('Devices:', [d.desc for d in ds]); assert ds, 'No Akida device visible in container'"
- name: Hardware model tests
run: pytest test/test_models.py -v -m hardware --models "$MODELS"
fpga-v2-6node:
name: FPGA v2 6-node (v2 models)
needs: scope
if: >-
(github.event_name == 'workflow_dispatch' ||
github.event.pull_request.head.repo.full_name == github.repository) &&
(needs.scope.outputs.v2_quantized != '' || needs.scope.outputs.v2_akida != '')
runs-on: [self-hosted, linux, fpga-v2-6node]
timeout-minutes: 120
container:
image: bender:5000/akida-gpu-tf2.19:2.19.3
options: --privileged
volumes:
- /dev/xdma/card0:/dev/xdma/card0
- /dev/xdma0_user:/dev/xdma0_user
- /opt/ci-cache/lfs:/lfs-cache
env:
MODELS: ${{ needs.scope.outputs.v2_quantized }} ${{ needs.scope.outputs.v2_akida }}
steps:
- name: Report host
run: echo "Running on $(hostname)"
- name: Ensure git and git-lfs
run: |
(command -v git && command -v git-lfs) >/dev/null 2>&1 || \
(apt-get update && apt-get install -y git git-lfs)
- uses: actions/checkout@v5
with:
lfs: false
- name: Fetch model files (LFS, scoped, cached)
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global lfs.storage /lfs-cache
INCLUDE=$(echo $MODELS | xargs | tr ' ' ',')
git lfs pull --include="$INCLUDE"
- name: Install pinned toolchain
run: |
AKIDA_MODELS_SPEC=$(grep -oE 'akida_models==[0-9][0-9a-z.]*' pyproject.toml | head -1)
pip install "$AKIDA_MODELS_SPEC" pytest pytest-rerunfailures
- name: Check device
run: |
python -c "import akida; ds = akida.devices(); print('Devices:', [d.desc for d in ds]); assert ds, 'No Akida device visible in container'"
- name: Hardware model tests
run: pytest test/test_models.py -v -m hardware --models "$MODELS"