@@ -22,12 +22,12 @@ permissions:
22
22
jobs :
23
23
build_wheels :
24
24
name : Build wheels for Python ${{ matrix.pyver }}, CUDA ${{ matrix.cuda }}, and Torch ${{ matrix.torchver }}
25
- runs-on : windows-2022
25
+ runs-on : windows-latest
26
26
strategy :
27
27
matrix :
28
28
pyver : ["3.10", "3.11"]
29
29
cuda : ["12.2.2"]
30
- torchver : ["2.2.2", "2.3.1 "]
30
+ torchver : ["2.2.2", "2.3.0 "]
31
31
defaults :
32
32
run :
33
33
shell : pwsh
44
44
with :
45
45
python-version : ${{ matrix.pyver }}
46
46
47
- - name : Install VS2022 BuildTools 17.9.7
48
- 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"
49
- if : runner.os == 'Windows'
50
-
51
47
- name : Setup Mamba
52
48
uses : conda-incubator/setup-miniconda@v2.2.0
53
49
with :
@@ -61,10 +57,12 @@ jobs:
61
57
62
58
- name : Install Dependencies
63
59
run : |
64
- $cudaVersion = '${{ matrix.cuda }}'
65
- $cudaVersionPytorch = '${{ matrix.cuda }}'.Remove('${{ matrix.cuda }}'.LastIndexOf('.')).Replace('.','')
66
-
67
- mamba install -y -c nvidia/label/cuda-$cudaVersion cuda-toolkit cuda-runtime
60
+ $cudaVersion = $env:CUDAVER
61
+ $cudaVersionPytorch = $env:CUDAVER.Remove($env:CUDAVER.LastIndexOf('.')).Replace('.','')
62
+ $cudaChannels = ''
63
+ $cudaNum = [int]$cudaVersion.substring($cudaVersion.LastIndexOf('.')+1)
64
+ while ($cudaNum -ge 0) { $cudaChannels += '-c nvidia/label/cuda-' + $cudaVersion.Remove($cudaVersion.LastIndexOf('.')+1) + $cudaNum + ' '; $cudaNum-- }
65
+ mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()
68
66
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()}
69
67
if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'}
70
68
73
71
- name : Build Wheel
74
72
id : build-wheel
75
73
run : |
76
- # --- Spawn the VS shell
77
- if ($IsWindows) {
78
- Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
79
- Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
80
- $env:DISTUTILS_USE_SDK=1
81
- }
82
-
83
74
$cudaVersion = $env:CUDAVER.Remove($env:CUDAVER.LastIndexOf('.')).Replace('.','')
84
75
$packageVersion = $env:PCKGVER.TrimStart('v')
85
76
0 commit comments