-
Notifications
You must be signed in to change notification settings - Fork 77
84 lines (77 loc) · 2.39 KB
/
build_kernel.yaml
File metadata and controls
84 lines (77 loc) · 2.39 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
name: "Build and test kernel"
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened] # trigger on PRs
paths-ignore:
- "docs/**"
- "*.md"
workflow_dispatch:
jobs:
build:
name: Build kernels (${{ matrix.arch }})
strategy:
matrix:
include:
- arch: x86_64-linux
runner: aws-highmemory-32-plus-nix
- arch: aarch64-linux
runner: aws-r8g-8xl-plus-nix
runs-on:
group: ${{ matrix.runner }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25
with:
extra-conf: |
max-jobs = 8
cores = 12
sandbox-fallback = false
- uses: cachix/cachix-action@1eb2ef646ac0255473d23a5907ad7b04ce94065c # v17
with:
name: huggingface
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
env:
USER: runner
- name: Nix info
run: nix-shell -p nix-info --run "nix-info -m"
- name: Build all example kernels
run: nix build -L ./examples/kernels#ci-build
- name: Copy kernel artifacts
run: cp -rL result/* .
- name: Upload kernel artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: built-kernels-${{ matrix.arch }}
path: |
activation-kernel
cutlass-gemm-kernel
cutlass-gemm-tvm-ffi-kernel
extra-data
relu-kernel
relu-tvm-ffi-kernel
relu-kernel-cpu
relu-backprop-compile-kernel
silu-and-mul-kernel
test:
name: Test kernels
needs: build
runs-on:
group: aws-g6-12xlarge-plus
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download kernel artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: built-kernels-x86_64-linux
path: .
- name: Build Docker image
run: |
docker build \
-t kernel-builder:latest \
-f nix-builder/tests/Dockerfile.test-kernel .
- name: Run Tests
run: |
docker run --gpus all kernel-builder:latest