@@ -20,18 +20,25 @@ jobs:
20
20
matrix :
21
21
include :
22
22
23
- # Ubuntu 20 .04 CUDA
23
+ # Ubuntu 22 .04 CUDA
24
24
25
25
# ROCm 6.2
26
- - { artname: 'wheel', os: ubuntu-20 .04-l, pyver: '3.10', cuda: '', rocm: '6.2', torch: '2.5.0', cudaarch: '' }
27
- - { artname: 'wheel', os: ubuntu-20 .04-l, pyver: '3.11', cuda: '', rocm: '6.2', torch: '2.5.0', cudaarch: '' }
28
- - { artname: 'wheel', os: ubuntu-20 .04-l, pyver: '3.12', cuda: '', rocm: '6.2', torch: '2.5.0', cudaarch: '' }
26
+ - { artname: 'wheel', os: ubuntu-22 .04-l, pyver: '3.10', cuda: '', rocm: '6.2', torch: '2.5.0', cudaarch: '' }
27
+ - { artname: 'wheel', os: ubuntu-22 .04-l, pyver: '3.11', cuda: '', rocm: '6.2', torch: '2.5.0', cudaarch: '' }
28
+ - { artname: 'wheel', os: ubuntu-22 .04-l, pyver: '3.12', cuda: '', rocm: '6.2', torch: '2.5.0', cudaarch: '' }
29
29
30
30
# ROCm 6.2.4
31
- - { artname: 'wheel', os: ubuntu-20.04-l, pyver: '3.10', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
32
- - { artname: 'wheel', os: ubuntu-20.04-l, pyver: '3.11', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
33
- - { artname: 'wheel', os: ubuntu-20.04-l, pyver: '3.12', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
34
- - { artname: 'wheel', os: ubuntu-20.04-l, pyver: '3.13', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
31
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.10', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
32
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.11', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
33
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.12', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
34
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.13', cuda: '', rocm: '6.2.4', torch: '2.6.0', cudaarch: '' }
35
+
36
+ # ROCm 6.3
37
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.10', cuda: '', rocm: '6.3', torch: '2.7.0', cudaarch: '' }
38
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.11', cuda: '', rocm: '6.3', torch: '2.7.0', cudaarch: '' }
39
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.12', cuda: '', rocm: '6.3', torch: '2.7.0', cudaarch: '' }
40
+ - { artname: 'wheel', os: ubuntu-22.04-l, pyver: '3.13', cuda: '', rocm: '6.3', torch: '2.7.0', cudaarch: '' }
41
+
35
42
36
43
fail-fast : false
37
44
53
60
large-packages : false
54
61
swap-storage : true
55
62
56
- # Setup Python
57
-
58
63
- uses : actions/checkout@v4
59
64
60
- - uses : actions/setup-python@v5.4.0
61
- with :
62
- python-version : ${{ matrix.pyver }}
63
-
64
65
# Get version string from package
65
66
66
67
- name : Get version string
@@ -78,11 +79,11 @@ jobs:
78
79
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
79
80
}
80
81
81
- # Pin VS build tools to 17.9 so builds won't fail
82
-
83
- - name : Install VS2022 BuildTools 17.9.7
84
- run : choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel"
85
- if : runner.os == 'Windows'
82
+ # Install uv for easier python setup
83
+ - name : Install the latest version of uv and set the python version
84
+ uses : astral-sh/setup-uv@v5
85
+ with :
86
+ python-version : ${{ matrix.pyver }}
86
87
87
88
# Install ROCm SDK, apparently needs to happen before setting up Python
88
89
@@ -111,101 +112,15 @@ jobs:
111
112
112
113
# --- Install dependencies
113
114
114
- python3 -m ensurepip --upgrade
115
- pip3 install torch==${{ matrix.torch }} --index-url="https://download.pytorch.org/whl/rocm$ROCM_VERSION"
116
- pip3 install --upgrade setuptools==69.5.1 build wheel safetensors sentencepiece ninja
117
- pip3 cache purge
115
+ uv pip install torch==${{ matrix.torch }} --index-url="https://download.pytorch.org/whl/rocm$ROCM_VERSION"
116
+ uv pip install --upgrade build setuptools==69.5.1 wheel packaging ninja safetensors sentencepiece tokenizers numpy
118
117
119
118
# --- Build wheel
120
119
121
120
python3 -m build -n --wheel -C--build-option=egg_info "-C--build-option=--tag-build=+rocm${{ matrix.rocm }}-torch${{ matrix.torch }}"
122
121
123
- # Build for CUDA
124
-
125
- - name : Setup Mamba
126
- if : matrix.cuda != ''
127
- uses : conda-incubator/setup-miniconda@v3.1.0
128
- with :
129
- activate-environment : " exllama"
130
- python-version : ${{ matrix.pyver }}
131
- # miniforge-variant: Mambaforge
132
- miniforge-version : latest
133
- # use-mamba: true
134
- add-pip-as-python-dependency : true
135
- auto-activate-base : false
136
-
137
- - name : Build for CUDA
138
- if : matrix.cuda != ''
139
- run : |
140
- # --- Spawn the VS shell
141
- if ($IsWindows) {
142
- Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
143
- Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
144
- $env:DISTUTILS_USE_SDK=1
145
- }
146
-
147
- # --- Install CUDA using Conda
148
- $cudaVersion = '${{ matrix.cuda }}'
149
- $cudaVersionPytorch = '${{ matrix.cuda }}'.Remove('${{ matrix.cuda }}'.LastIndexOf('.')).Replace('.','')
150
-
151
- $env:MAMBA_NO_LOW_SPEED_LIMIT = 1
152
- mamba install -y -c nvidia/label/cuda-$cudaVersion cuda-toolkit cuda-runtime
153
-
154
- if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaVersion}
155
- if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'}
156
-
157
- $env:CUDA_PATH = $env:CONDA_PREFIX
158
- $env:CUDA_HOME = $env:CONDA_PREFIX
159
- if ($IsLinux) {$env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH}
160
-
161
- # --- Install dependencies
162
-
163
- python -m ensurepip --upgrade
164
- python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
165
- python -m pip install --upgrade setuptools==69.5.1 build wheel safetensors sentencepiece ninja
166
-
167
- # --- Build wheel
168
-
169
- $BUILDTAG = "+cu$cudaVersionPytorch-torch${{ matrix.torch }}"
170
- $env:TORCH_CUDA_ARCH_LIST = '${{ matrix.cudaarch }}'
171
- python -m build -n --wheel -C--build-option=egg_info "-C--build-option=--tag-build=$BUILDTAG"
172
-
173
- # Build sdist
174
-
175
- - name : Build sdist
176
- if : matrix.cuda == '' && matrix.rocm == ''
177
- run : |
178
- # --- Spawn the VS shell
179
- if ($IsWindows) {
180
- Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
181
- Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
182
- $env:DISTUTILS_USE_SDK=1
183
- }
184
-
185
- # --- Install dependencies
186
-
187
- python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cpu
188
- python -m pip install build wheel ninja
189
-
190
- # --- Build wheel
191
-
192
- $env:EXLLAMA_NOCOMPILE=1
193
- python -m build -n
194
-
195
122
# Upload files
196
123
197
- - uses : actions/upload-artifact@v4
198
- if : matrix.artname == 'wheel'
199
- with :
200
- name : wheel-${{ matrix.os }}-py${{ matrix.pyver }}-cuda${{ matrix.cuda }}-torch${{ matrix.torch }}
201
- path : ./dist/*
202
-
203
- - uses : actions/upload-artifact@v4
204
- if : matrix.artname == 'sdist'
205
- with :
206
- name : ' sdist'
207
- path : ./dist/*
208
-
209
124
- name : Upload files to GitHub release
210
125
if : steps.package_version.outputs.PACKAGE_VERSION != 'None' && inputs.release == '1'
211
126
uses : svenstaro/upload-release-action@2.6.1
0 commit comments