Repository navigation
218 lines (202 loc) · 7.98 KB
/
Copy pathwheels.yml
File metadata and controls
218 lines (202 loc) · 7.98 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
name: qwentts-cpp-python wheels
"on":
workflow_dispatch:
inputs:
qwentts_ref:
description: qwentts.cpp commit, tag, or branch to build
required: true
default: 6fae92914045cd83364d2845ceaa0f7969727319
jobs:
macos-metal:
uses: ./.github/workflows/metal-wheel.yml
with:
qwentts_ref: ${{ inputs.qwentts_ref || '6fae92914045cd83364d2845ceaa0f7969727319' }}
linux-cuda:
name: Linux ${{ matrix.arch }} CUDA ${{ matrix.cuda_version }} wheel
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-22.04
cuda_repo_distro: ubuntu2204
cuda_repo_arch: x86_64
cuda_version: "12.4"
cuda_package_suffix: "12-4"
cuda_home: /usr/local/cuda-12.4
wheel_build_tag: 1cu124
cuda_architectures: 75-virtual;80-real;86-real;90-real
manylinux_platform: manylinux_2_35_x86_64
build_jobs: "2"
- arch: aarch64
runner: ubuntu-22.04-arm
cuda_repo_distro: ubuntu2204
cuda_repo_arch: sbsa
cuda_version: "12.4"
cuda_package_suffix: "12-4"
cuda_home: /usr/local/cuda-12.4
wheel_build_tag: 1cu124
cuda_architectures: 75-virtual;80-real;86-real;90-real
manylinux_platform: manylinux_2_35_aarch64
build_jobs: "2"
- arch: x86_64
runner: ubuntu-24.04
cuda_repo_distro: ubuntu2404
cuda_repo_arch: x86_64
cuda_version: "12.8"
cuda_package_suffix: "12-8"
cuda_home: /usr/local/cuda-12.8
wheel_build_tag: 1cu128
cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual
manylinux_platform: manylinux_2_39_x86_64
build_jobs: "2"
- arch: aarch64
runner: ubuntu-24.04-arm
cuda_repo_distro: ubuntu2404
cuda_repo_arch: sbsa
cuda_version: "12.8"
cuda_package_suffix: "12-8"
cuda_home: /usr/local/cuda-12.8
wheel_build_tag: 1cu128
cuda_architectures: 75-virtual;86-real;90-real;120-real;120-virtual
manylinux_platform: manylinux_2_39_aarch64
build_jobs: "2"
- arch: x86_64
runner: ubuntu-24.04
cuda_repo_distro: ubuntu2404
cuda_repo_arch: x86_64
cuda_version: "13.0"
cuda_package_suffix: "13-0"
cuda_home: /usr/local/cuda-13.0
wheel_build_tag: 1cu130
cuda_architectures: 75-virtual;80-real;86-real;90-real;121-real
manylinux_platform: manylinux_2_39_x86_64
build_jobs: "2"
- arch: aarch64
runner: ubuntu-24.04-arm
cuda_repo_distro: ubuntu2404
cuda_repo_arch: sbsa
cuda_version: "13.0"
cuda_package_suffix: "13-0"
cuda_home: /usr/local/cuda-13.0
wheel_build_tag: 1cu130
cuda_architectures: 75-virtual;80-real;86-real;90-real;121-real
manylinux_platform: manylinux_2_39_aarch64
build_jobs: "2"
env:
QWENTTS_CPP_BACKEND: cuda
QWENTTS_CPP_BUILD_JOBS: ${{ matrix.build_jobs }}
QWENTTS_CPP_WHEEL_BUILD_TAG: ${{ matrix.wheel_build_tag }}
QWENTTS_REF: ${{ inputs.qwentts_ref || '6fae92914045cd83364d2845ceaa0f7969727319' }}
CUDA_ARCHITECTURES: ${{ matrix.cuda_architectures }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Free disk space
run: |
sudo rm -rf /usr/local/lib/android /opt/ghc /usr/share/dotnet
sudo apt-get clean
- name: Install build tools
run: |
python -m pip install --upgrade pip auditwheel build wheel
sudo apt-get update
sudo apt-get install -y --no-install-recommends cmake ninja-build patchelf wget ca-certificates
- name: Install CUDA toolkit
run: |
wget -q https://developer.download.nvidia.com/compute/cuda/repos/${{ matrix.cuda_repo_distro }}/${{ matrix.cuda_repo_arch }}/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
cuda-nvcc-${{ matrix.cuda_package_suffix }} \
cuda-cudart-dev-${{ matrix.cuda_package_suffix }} \
libcublas-dev-${{ matrix.cuda_package_suffix }}
echo "${{ matrix.cuda_home }}/bin" >> "$GITHUB_PATH"
echo "CUDA_HOME=${{ matrix.cuda_home }}" >> "$GITHUB_ENV"
echo "CMAKE_CUDA_COMPILER=${{ matrix.cuda_home }}/bin/nvcc" >> "$GITHUB_ENV"
- name: Fetch qwentts.cpp
run: |
git init third_party/qwentts.cpp
git -C third_party/qwentts.cpp remote add origin https://github.com/ServeurpersoCom/qwentts.cpp
git -C third_party/qwentts.cpp fetch --depth 1 origin "$QWENTTS_REF"
git -C third_party/qwentts.cpp checkout --detach FETCH_HEAD
git -C third_party/qwentts.cpp submodule update --init --recursive
- name: Build wheel
run: |
python scripts/build_native.py \
--source third_party/qwentts.cpp \
--backend cuda \
--clean \
--cmake-arg=-G \
--cmake-arg=Ninja \
--cmake-arg="-DCMAKE_CUDA_ARCHITECTURES=$CUDA_ARCHITECTURES"
python -m build --wheel
mkdir -p wheelhouse
python -m auditwheel repair \
--plat ${{ matrix.manylinux_platform }} \
--exclude libcudart.so.12 \
--exclude libcudart.so.13 \
--exclude libcublas.so.12 \
--exclude libcublas.so.13 \
--exclude libcublasLt.so.12 \
--exclude libcublasLt.so.13 \
--exclude libcuda.so.1 \
-w wheelhouse \
dist/*.whl
- uses: actions/upload-artifact@v4
with:
name: qwentts-cpp-python-linux-${{ matrix.arch }}-cuda-${{ matrix.wheel_build_tag }}
path: wheelhouse/*.whl
linux-cpu:
name: Linux ${{ matrix.arch }} CPU wheel
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
runner: ubuntu-24.04
- arch: aarch64
runner: ubuntu-24.04-arm
env:
QWENTTS_CPP_BACKEND: cpu
QWENTTS_CPP_BUILD_JOBS: "2"
QWENTTS_CPP_WHEEL_BUILD_TAG: 1cpu
QWENTTS_REF: ${{ inputs.qwentts_ref || '6fae92914045cd83364d2845ceaa0f7969727319' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip auditwheel build wheel
sudo apt-get update
sudo apt-get install -y --no-install-recommends cmake ninja-build patchelf ca-certificates
- name: Fetch qwentts.cpp
run: |
git init third_party/qwentts.cpp
git -C third_party/qwentts.cpp remote add origin https://github.com/ServeurpersoCom/qwentts.cpp
git -C third_party/qwentts.cpp fetch --depth 1 origin "$QWENTTS_REF"
git -C third_party/qwentts.cpp checkout --detach FETCH_HEAD
git -C third_party/qwentts.cpp submodule update --init --recursive
- name: Build wheel
run: |
python scripts/build_native.py \
--source third_party/qwentts.cpp \
--backend cpu \
--clean \
--cmake-arg=-G \
--cmake-arg=Ninja
python -m build --wheel
mkdir -p wheelhouse
python -m auditwheel repair \
--plat manylinux_2_39_${{ matrix.arch }} \
-w wheelhouse \
dist/*.whl
- uses: actions/upload-artifact@v4
with:
name: qwentts-cpp-python-linux-${{ matrix.arch }}-cpu
path: wheelhouse/*.whl