-
Notifications
You must be signed in to change notification settings - Fork 0
277 lines (240 loc) · 9.35 KB
/
opensource-projects.yml
File metadata and controls
277 lines (240 loc) · 9.35 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# Copyright 2025-2026, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
name: Build opensource projects
permissions: read-all
on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- 'snap/**'
- 'benchmarks/**'
- 'tests/**'
- 'examples/**'
- 'tools/**'
- 'utils/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-ispc:
name: Build ISPC (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
install_deps_args: ""
artifact_name: ispc-archive
artifact_path: build/ispc-*-linux.tar.gz
- os: macos-14
install_deps_args: macos-14
artifact_name: ispc-macos-arm
artifact_path: build/ispc-*-macos.tar.gz
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
submodules: true
- name: Install ISPC build dependencies
run: .github/workflows/scripts/install-build-deps.sh ${{ matrix.install_deps_args }}
- name: Build ISPC
run: .github/workflows/scripts/build-ispc.sh
- name: Upload ISPC artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_path }}
build-projects:
name: Build ${{ matrix.project.name }}
needs: build-ispc
runs-on: ubuntu-22.04
container:
image: archlinux@sha256:2fcdd55448255f87dd337ef5c0fdbd5e4fec432345db1aa5faea4bf2764b4ca8
strategy:
fail-fast: false
matrix:
project:
- name: hfisher/nbody
extra_packages: mercurial glfw
build_cmd: |
hg clone https://hg.sr.ht/~hfisher/nbody
cd nbody
sed -i 's/BUILD_ISPC 0/BUILD_ISPC 1/' CMakeLists.txt
hg diff
cmake -S ./ -B build -G Ninja
cmake --build build
- name: ISPCTextureCompressor
build_cmd: |
git clone https://github.com/GameTechDev/ISPCTextureCompressor.git
cd ISPCTextureCompressor/
make -f Makefile.linux ISPC_ARCH=x86_64 ISPC_TARGETS=sse2,avx2,avx512skx-x16 ISPC=/usr/local/bin/ispc
- name: GPSnoopy/RayTracingInOneWeekend
build_cmd: |
git clone https://github.com/GPSnoopy/RayTracingInOneWeekend.git
cmake -G Ninja -B build -S RayTracingInOneWeekend/ispc
cmake --build build --verbose
- name: ispc-upwind
build_cmd: |
git clone https://gitlab.com/rossinelli/ispc-upwind.git
cd ispc-upwind/
make TARGET=sse4,avx2,avx512skx-x16
- name: FlashAttentionGPTonCPU
build_cmd: |
git clone https://github.com/ZipXuan/FlashAttentionGPTonCPU.git
cd FlashAttentionGPTonCPU/
ispc -O3 --target=avx2-i32x8 --arch=x86-64 --pic module.ispc -h module_ispc.h -o module_ispc.o
- name: merle
extra_packages: libx11 libxext
build_cmd: |
# Pinned to commit before VCPKG migration (fbfbdb7f12fb79a3280c45ea12ea81fa824a682f)
# VCPKG builds are too complex/fragile for CI (deep dependency chains, libsystemd build failures)
# This version uses git submodules and builds reliably
git clone --recursive https://github.com/chinmaygarde/merle.git
cd merle/
git checkout 3eecb311ac8862c41f0c53a5d9b360be923142bb
git submodule update --init --recursive
sed -i '/add_custom_command(/,/DEPENDS src\/texture.ispc/ s/--werror/--werror\n --pic/' CMakeLists.txt
git diff
cmake -B build -S ./ -G Ninja
cmake --build build
steps:
- name: Setup Arch Linux
run: |
pacman-key --init
pacman-key --populate archlinux
# Update keyring first, then re-populate to trust new signing keys
pacman -Sy --noconfirm archlinux-keyring
pacman-key --populate archlinux
pacman -Su --noconfirm
pacman -S --needed --noconfirm base-devel git sudo cmake ninja ${{ matrix.project.extra_packages }}
- name: Download ISPC artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ispc-archive
path: /tmp/ispc-build
- name: Install ISPC
run: |
cd /tmp/ispc-build
ISPC_TAR=$(ls ispc-*-linux.tar.gz)
tar -xzf "$ISPC_TAR"
ISPC_DIR=$(basename "$ISPC_TAR" .tar.gz)
cp -r "$ISPC_DIR"/* /usr/local/
chmod +x /usr/local/bin/ispc
ispc --version
- name: Build ${{ matrix.project.name }}
run: ${{ matrix.project.build_cmd }}
build-projects-with-builder:
name: Build ${{ matrix.project.name }}
needs: build-ispc
runs-on: ubuntu-22.04
container:
image: archlinux@sha256:2fcdd55448255f87dd337ef5c0fdbd5e4fec432345db1aa5faea4bf2764b4ca8
strategy:
fail-fast: false
matrix:
project:
- name: Leela Chess lc0
extra_packages: gtest wget
build_cmd: |
su - builder -c '
git clone --branch lc0 --single-branch https://github.com/archlinux/aur.git lc0
cd lc0
# Temporary fix to use unofficial download location for weights
export SRCDEST=$HOME/pkg_src
# Make the directory if needed
mkdir -p "$SRCDEST"
# Download the weights file to SRCDEST if not present
# Filename must match _weights variable in PKGBUILD (weights_hanse-69722-vf2.gz)
weights="weights_hanse-69722-vf2.gz"
url="https://derr.pro/lc0/hanse-69722-vf2.gz"
if [ ! -f "$SRCDEST/$weights" ]; then
wget -O "$SRCDEST/$weights" "$url"
fi
makepkg -s --noconfirm
'
# Open3D disabled because open-source default runners don't have enough disk space
# - name: Open3D
# extra_packages: minizip
# build_cmd: |
# # Build and install the required dependency for Open3D from AUR
# su - builder -c "
# git clone https://aur.archlinux.org/python-dash.git
# cd python-dash/
# makepkg -si --noconfirm
#
# git clone https://aur.archlinux.org/nanoflann.git
# cd nanoflann
# makepkg -si --noconfirm
#
# git clone https://aur.archlinux.org/open3d.git
# cd open3d
# sed -i 's|-DUSE_SYSTEM_VTK=ON|-DUSE_SYSTEM_VTK=OFF -DISPC_USE_LEGACY_EMULATION=ON -DBUILD_ISPC_MODULE=ON -DCMAKE_ISPC_COMPILER=/usr/local/bin/ispc -DCMAKE_ISPC_INSTRUCTION_SETS=host|' PKGBUILD
# git diff
# makepkg -s --noconfirm
# "
steps:
- name: Setup Arch Linux
run: |
pacman-key --init
pacman-key --populate archlinux
# Update keyring first, then re-populate to trust new signing keys
pacman -Sy --noconfirm archlinux-keyring
pacman-key --populate archlinux
pacman -Su --noconfirm
pacman -S --needed --noconfirm base-devel git sudo cmake ninja ${{ matrix.project.extra_packages }}
- name: Create build user
run: |
useradd -m -G wheel -s /bin/bash builder
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
- name: Download ISPC artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ispc-archive
path: /tmp/ispc-build
- name: Install ISPC
run: |
cd /tmp/ispc-build
ISPC_TAR=$(ls ispc-*-linux.tar.gz)
tar -xzf "$ISPC_TAR"
ISPC_DIR=$(basename "$ISPC_TAR" .tar.gz)
cp -r "$ISPC_DIR"/* /usr/local/
chmod +x /usr/local/bin/ispc
ispc --version
- name: Build ${{ matrix.project.name }}
run: ${{ matrix.project.build_cmd }}
build-ispc-downsampler:
name: Build ispc-downsampler on macOS ARM
needs: build-ispc
runs-on: macos-14
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
- name: Download ISPC artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ispc-macos-arm
path: /tmp/ispc-build
- name: Install ISPC
run: |
cd /tmp/ispc-build
ISPC_TAR=$(ls ispc-*-macos.tar.gz)
tar -xzf "$ISPC_TAR"
ISPC_DIR=$(basename "$ISPC_TAR" .tar.gz)
sudo cp -r "$ISPC_DIR"/* /usr/local/
sudo chmod +x /usr/local/bin/ispc
ispc --version
echo "ISPC_EXECUTABLE=/usr/local/bin/ispc" >> "$GITHUB_ENV"
- name: Checkout ispc-downsampler
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
repository: Traverse-Research/ispc-downsampler
path: ispc-downsampler
- name: Build and benchmark ispc-downsampler
run: |
source "$HOME/.cargo/env"
cd ispc-downsampler
cargo clean
cargo build --features ispc
cargo bench