Update Actions (#497)

* Actions: Python 3.12: Override with VS 2022 17.9

Github Actions updated their runner image with VS 17.10 which is
incompatible with older versions of CUDA. Force a downgrade to 17.9
and build.

Signed-off-by: kingbri <bdashore3@proton.me>

* Actions: Update to VS 2022 17.9

Github Actions updated their Windows runner image with VS 17.10 which is
incompatible with older versions of CUDA. Force a downgrade to 17.9
and build.

Signed-off-by: kingbri <bdashore3@proton.me>

* Actions: Add Python 3.12 to releases

Python 3.12 ExllamaV2 is stable. So, add it into builds.

Signed-off-by: kingbri <bdashore3@proton.me>

---------

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
Brian Dashore
2024-06-07 18:51:57 -04:00
committed by GitHub
parent 34677da2b9
commit b1c9020c2d
2 changed files with 103 additions and 65 deletions

View File

@@ -20,54 +20,65 @@ jobs:
matrix:
include:
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
# Ubuntu 20.04 CUDA
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.12', cuda: '11.8.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.12', cuda: '12.1.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
# Windows 2022 CUDA
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '11.7.0', rocm: '', torch: '2.0.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.3.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '11.8.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '12.1.0', rocm: '', torch: '2.3.1', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
# Ubuntu 20.04 ROCm
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.10', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '5.6', torch: '2.2.2', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '6.0', torch: '2.3.0', cudaarch: '' }
- { artname: 'wheel', os: ubuntu-20.04, pyver: '3.12', cuda: '', rocm: '6.0', torch: '2.3.1', cudaarch: '' }
# sdist
- { artname: 'sdist', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '', torch: '2.3.0', cudaarch: '' }
- { artname: 'sdist', os: ubuntu-20.04, pyver: '3.11', cuda: '', rocm: '', torch: '2.3.0', cudaarch: '' }
# Extra Torch 2.2 wheels for Windows until PyTorch resolves the shm.dll issue
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-latest, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
# Extra Torch 2.2 wheels for Windows 2022 until PyTorch resolves the shm.dll issue
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.8', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.9', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.10', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.11', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '11.8.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
- { artname: 'wheel', os: windows-2022, pyver: '3.12', cuda: '12.1.0', rocm: '', torch: '2.2.0', cudaarch: '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX' }
defaults:
run:
shell: pwsh
steps:
# Free disk space
- name: Free Disk Space
@@ -106,6 +117,12 @@ jobs:
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
}
# Pin VS build tools to 17.9 so builds won't fail
- name: Install VS2022 BuildTools 17.9.7
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"
if: runner.os == 'Windows'
# Install ROCm SDK, apparently needs to happen before setting up Python
- name: Build for ROCm
@@ -133,8 +150,9 @@ jobs:
# --- Install dependencies
python3 -m ensurepip --upgrade
pip3 install torch==${{ matrix.torch }} --index-url="https://download.pytorch.org/whl/rocm$ROCM_VERSION"
pip3 install --upgrade build wheel safetensors sentencepiece ninja
pip3 install --upgrade setuptools>=70.0.0 build wheel safetensors sentencepiece ninja
pip3 cache purge
# --- Build wheel
@@ -147,7 +165,7 @@ jobs:
if: matrix.cuda != ''
uses: conda-incubator/setup-miniconda@v2.3.0
with:
activate-environment: "build"
activate-environment: "exllama"
python-version: ${{ matrix.pyver }}
miniforge-variant: Mambaforge
miniforge-version: latest
@@ -158,17 +176,20 @@ jobs:
- name: Build for CUDA
if: matrix.cuda != ''
run: |
# --- Spawn the VS shell
if ($IsWindows) {
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
$env:DISTUTILS_USE_SDK=1
}
# --- Install CUDA using Conda
$cudaVersion = '${{ matrix.cuda }}'
$cudaVersionPytorch = '${{ matrix.cuda }}'.Remove('${{ matrix.cuda }}'.LastIndexOf('.')).Replace('.','')
$cudaChannels = ''
$cudaNum = [int]$cudaVersion.substring($cudaVersion.LastIndexOf('.')+1)
while ($cudaNum -ge 0) { $cudaChannels += '-c nvidia/label/cuda-' + $cudaVersion.Remove($cudaVersion.LastIndexOf('.')+1) + $cudaNum + ' '; $cudaNum-- }
mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()}
mamba install -y -c nvidia/label/cuda-$cudaVersion cuda-toolkit cuda-runtime
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaVersion}
if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'}
$env:CUDA_PATH = $env:CONDA_PREFIX
@@ -177,9 +198,9 @@ jobs:
# --- Install dependencies
python -m ensurepip --upgrade
python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
python -m pip install --upgrade setuptools==65.5.1
python -m pip install --upgrade build wheel safetensors sentencepiece ninja
python -m pip install --upgrade setuptools>=70.0.0 build wheel safetensors sentencepiece ninja
# --- Build wheel
@@ -192,6 +213,13 @@ jobs:
- name: Build sdist
if: matrix.cuda == '' && matrix.rocm == ''
run: |
# --- Spawn the VS shell
if ($IsWindows) {
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
$env:DISTUTILS_USE_SDK=1
}
# --- Install dependencies
python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cpu

View File

@@ -77,11 +77,6 @@ jobs:
shell: pwsh
steps:
- name: Install VS Build Tools 17.9
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"
if: runner.os == 'Windows'
# Free disk space
- name: Free Disk Space
@@ -120,6 +115,12 @@ jobs:
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
}
# Pin VS build tools to 17.9 so builds won't fail
- name: Install VS2022 BuildTools 17.9.7
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"
if: runner.os == 'Windows'
# Install ROCm SDK, apparently needs to happen before setting up Python
- name: Build for ROCm
@@ -163,7 +164,7 @@ jobs:
if: matrix.cuda != ''
uses: conda-incubator/setup-miniconda@v2.3.0
with:
activate-environment: "build"
activate-environment: "exllama"
python-version: ${{ matrix.pyver }}
miniforge-variant: Mambaforge
miniforge-version: latest
@@ -174,17 +175,20 @@ jobs:
- name: Build for CUDA
if: matrix.cuda != ''
run: |
# --- Spawn the VS shell
if ($IsWindows) {
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
$env:DISTUTILS_USE_SDK=1
}
# --- Install CUDA using Conda
$cudaVersion = '${{ matrix.cuda }}'
$cudaVersionPytorch = '${{ matrix.cuda }}'.Remove('${{ matrix.cuda }}'.LastIndexOf('.')).Replace('.','')
$cudaChannels = ''
$cudaNum = [int]$cudaVersion.substring($cudaVersion.LastIndexOf('.')+1)
while ($cudaNum -ge 0) { $cudaChannels += '-c nvidia/label/cuda-' + $cudaVersion.Remove($cudaVersion.LastIndexOf('.')+1) + $cudaNum + ' '; $cudaNum-- }
mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()}
mamba install -y -c nvidia/label/cuda-$cudaVersion cuda-toolkit cuda-runtime
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaVersion}
if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'}
$env:CUDA_PATH = $env:CONDA_PREFIX
@@ -195,8 +199,7 @@ jobs:
python -m ensurepip --upgrade
python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch
python -m pip install --upgrade setuptools>=70.0.0
python -m pip install --upgrade build wheel safetensors sentencepiece ninja
python -m pip install --upgrade setuptools>=70.0.0 build wheel safetensors sentencepiece ninja
# --- Build wheel
@@ -209,6 +212,13 @@ jobs:
- name: Build sdist
if: matrix.cuda == '' && matrix.rocm == ''
run: |
# --- Spawn the VS shell
if ($IsWindows) {
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
$env:DISTUTILS_USE_SDK=1
}
# --- Install dependencies
python -m pip install torch==${{ matrix.torch }} --index-url https://download.pytorch.org/whl/cpu