This repository was archived by the owner on Jan 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
83 lines (69 loc) · 2.84 KB
/
build_kernel_windows.yaml
File metadata and controls
83 lines (69 loc) · 2.84 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
name: "Build and test kernel - Windows"
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened] # trigger on PRs
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [ windows-2022 ]
python: [ 3.12 ]
torch: [
# { version: '2.9.1', cuda: '12.6.3', wheel: '126' },
{ version: '2.9.1', cuda: '12.8.1', wheel: '128' },
# { version: '2.9.1', cuda: '13.0.1', wheel: '130' }
]
name: Build kernel
runs-on: ${{ matrix.os }}
steps:
- uses: actions/cache@v4
with:
key: cuda-toolkit-v${{ matrix.cuda }}-${{ matrix.os }}
path: |
C:\Program Files\NVIDIA GPU Computing Toolkit
~/.cargo/registry
~/.cargo/git
- uses: actions/checkout@v5
# CUDA environment setup
- uses: Jimver/cuda-toolkit@v0.2.29
id: setup-cuda-toolkit
with:
cuda: ${{ matrix.torch.cuda }} # TODO(mfuntowicz): How can we test multiple CUDA versions than align with torch?
- name: "NVCC checks"
run: nvcc -V
# Rust build environment setup
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build build2cmake
run: ( cd build2cmake && cargo build --release )
# Python environment setup
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install PyTorch
run: pip install torch --index-url https://download.pytorch.org/whl/cu${{ matrix.torch.wheel }}
- name: Build cutlass GEMM kernel
run: ( scripts\windows\builder.ps1 -SourceFolder examples/cutlass-gemm -BuildConfig Release -Backend cuda -Build -Force )
# - name: Copy cutlass GEMM kernel
# run: cp -rL examples/cutlass-gemm/result cutlass-gemm-kernel
- name: Build relu kernel
run: ( scripts\windows\builder.ps1 -SourceFolder examples/relu -BuildConfig Release -Backend cuda -Build -Force )
# - name: Copy relu kernel
# run: cp -rL examples/relu/result relu-kernel
- name: Build relu-backprop-compile kernel
run: ( scripts\windows\builder.ps1 -SourceFolder examples/relu-backprop-compile -BuildConfig Release -Backend cuda -Build -Force )
# - name: Copy relu-backprop-compile kernel
# run: cp -rL examples/relu-backprop-compile/result relu-backprop-compile-kernel
# Just test that we build with the extra torchVersions argument.
# - name: Build relu kernel (specific Torch version)
# run: ( cd examples/relu-specific-torch && nix build . )
- name: Build silu-and-mul-universal kernel
run: ( scripts\windows\builder.ps1 -SourceFolder examples/silu-and-mul-universal -BuildConfig Release -Build -Force)