interplane.Get Omega
Read in your language

openaccel-lab

aien-dev/openaccel-lab

Brought by drakestapleton

branch main Branches Tags History

openaccel-lab / .github / workflows / lab.yml

155 lines · 5932 bytes Raw Blame History
1# OpenAccel Lab: run every workload and control on every entrant that a free GitHub runner can host,
2# judge them against one reference, fail on any entrant failure or any control that passes, and
3# publish the board to GitHub Pages. No GPU is used here; GPU rows enter only as labelled receipts.
4name: OpenAccel Lab
5
6on:
7 push:
8 branches: [main]
9 pull_request:
10 workflow_dispatch:
11 schedule:
12 - cron: "17 5 * * 1"
13
14permissions:
15 contents: read
16
17concurrency:
18 group: lab-${{ github.ref }}
19 cancel-in-progress: true
20
21jobs:
22 run:
23 name: ${{ matrix.backend }} on ${{ matrix.os }}
24 runs-on: ${{ matrix.os }}
25 timeout-minutes: 120
26 strategy:
27 fail-fast: false
28 matrix:
29 include:
30 - { os: ubuntu-24.04-arm, backend: omega }
31 - { os: ubuntu-24.04-arm, backend: opencl }
32 - { os: ubuntu-24.04-arm, backend: triton }
33 - { os: ubuntu-24.04-arm, backend: hip }
34 - { os: ubuntu-24.04, backend: opencl }
35 - { os: ubuntu-24.04, backend: triton }
36 - { os: ubuntu-24.04, backend: hip }
37 - { os: ubuntu-24.04, backend: cuda }
38 env:
39 OAL_RUNNER_LABEL: gh-${{ matrix.os }}
40 TRITON_INTERPRET: "1"
41 steps:
42 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43
44 - name: Install Ubuntu packages
45 run: |
46 sudo apt-get update -qq
47 case "${{ matrix.backend }}@${{ matrix.os }}" in
48 opencl@ubuntu-24.04-arm) pk="clang-18 libllvm18 libllvmspirvlib18.1 ocl-icd-libopencl1 ocl-icd-opencl-dev" ;;
49 opencl@ubuntu-24.04) pk="pocl-opencl-icd ocl-icd-libopencl1 ocl-icd-opencl-dev" ;;
50 hip@*) pk="libtbb-dev g++ perl" ;;
51 cuda@*) pk="nvidia-cuda-toolkit" ;;
52 *) pk="" ;;
53 esac
54 [ -z "$pk" ] || sudo apt-get install -y -qq --no-install-recommends $pk
55
56 - name: Install Python packages
57 run: |
58 python3 -m pip install --user --break-system-packages -q numpy==2.5.4
59 case "${{ matrix.backend }}" in
60 opencl) python3 -m pip install --user --break-system-packages -q pyopencl==2026.1.4 ;;
61 triton) python3 -m pip install --user --break-system-packages -q triton==3.8.0 torch==2.14.1 \
62 --extra-index-url https://download.pytorch.org/whl/cpu ;;
63 esac
64
65 - name: Fetch pinned toolchain (sha256-checked)
66 run: |
67 case "${{ matrix.backend }}@${{ matrix.os }}" in
68 omega@*) sh tools/fetch.sh omega ;;
69 opencl@ubuntu-24.04-arm) sh tools/fetch.sh pocl; echo "OCL_ICD_VENDORS=$PWD/.oal/icd" >> "$GITHUB_ENV" ;;
70 hip@*) sh tools/fetch.sh hip ;;
71 esac
72
73 - name: Run matrix
74 run: |
75 mkdir -p out
76 python3 bin/oal-matrix --backends ${{ matrix.backend }} --controls --seeds 1,2,3 \
77 > "out/results-${{ matrix.backend }}-${{ matrix.os }}.jsonl"
78 wc -l out/*.jsonl
79
80 - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
81 if: always()
82 with:
83 name: results-${{ matrix.backend }}-${{ matrix.os }}
84 path: out/
85 if-no-files-found: error
86
87 gate:
88 name: gate + board
89 needs: run
90 if: always()
91 runs-on: ubuntu-24.04-arm
92 timeout-minutes: 60
93 env:
94 TRITON_INTERPRET: "1"
95 steps:
96 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
97 - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
98 with:
99 pattern: results-*
100 path: out
101 merge-multiple: true
102 - name: Install Python packages
103 run: python3 -m pip install --user --break-system-packages -q numpy==2.5.4
104 - name: Fetch Omega compiler (for shrinking Omega failures)
105 run: sh tools/fetch.sh omega
106 - name: Every expected runner reported
107 run: |
108 ls -l out
109 test "$(ls out/results-*.jsonl | wc -l)" -eq 8
110 - name: Minimise Omega failures and record control verdicts
111 run: |
112 mkdir -p site out/shrink
113 python3 - <<'EOF' > out/shrink/todo.txt
114 import json, glob
115 seen = set()
116 for p in glob.glob("out/results-*.jsonl"):
117 for l in open(p):
118 r = json.loads(l)
119 if r["backend"] == "omega" and r["status"] == "FAIL" and r["workload"] not in seen:
120 seen.add(r["workload"])
121 print(r["workload"], r["seed"], " ".join("--set %s=%s" % kv for kv in r["params"].items()))
122 EOF
123 : > out/results.shrink.jsonl
124 while read -r w s rest; do
125 [ -n "$w" ] || continue
126 python3 bin/oal-shrink omega "$w" --seed "$s" >> out/results.shrink.jsonl || true
127 done < out/shrink/todo.txt
128 wc -l out/results.shrink.jsonl
129 - name: Build board
130 if: always()
131 run: |
132 python3 bin/oal-board out/results-*.jsonl out/results.shrink.jsonl > site/data.json
133 cat out/results-*.jsonl > site/results.jsonl
134 - name: Gate (controls must fail, entrants must pass, >= 3 backends per workload)
135 shell: bash
136 run: python3 bin/oal-gate --min-backends 3 out/results-*.jsonl | tee -a "$GITHUB_STEP_SUMMARY"
137 - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
138 if: always() && github.ref == 'refs/heads/main'
139 with:
140 path: site/
141
142 pages:
143 name: publish board
144 needs: gate
145 if: always() && github.ref == 'refs/heads/main' && needs.gate.result != 'skipped'
146 runs-on: ubuntu-24.04
147 permissions:
148 pages: write
149 id-token: write
150 environment:
151 name: github-pages
152 url: ${{ steps.deploy.outputs.page_url }}
153 steps:
154 - id: deploy
155 uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1