Skip to content

Commit 60d5b81

Browse files
committed
correctly export envvars for Windows
1 parent 117da9f commit 60d5b81

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

.github/workflows/publish.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,12 @@ jobs:
6868
run: |
6969
if [[ "${{ matrix.cuda }}" == "cu118" ]]; then
7070
echo 'TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9+PTX"' >> $GITHUB_ENV
71+
echo 'CUDA_HOME="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8"' >> $GITHUB_ENV
7172
elif [[ "${{ matrix.cuda }}" == "cu124" ]]; then
7273
echo 'TORCH_CUDA_ARCH_LIST="5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX"' >> $GITHUB_ENV
74+
echo 'CUDA_HOME="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.4"' >> $GITHUB_ENV
7375
fi
7476
75-
- name: just print the envvar
76-
if: matrix.os == 'windows-2019'
77-
run: echo $TORCH_CUDA_ARCH_LIST
78-
env:
79-
TORCH_CUDA_ARCH_LIST: ${{ env.TORCH_CUDA_ARCH_LIST }}
80-
8177
- name: Build wheels
8278
if: matrix.os == 'windows-2019'
8379
shell: cmd # Use cmd on Windows to avoid bash environment taking priority over MSVC variables
@@ -89,6 +85,7 @@ jobs:
8985
SKIP_TORCH_COMPILE: "true"
9086
CIBW_BUILD_VERBOSITY_WINDOWS: "1"
9187
TORCH_CUDA_ARCH_LIST: ${{ env.TORCH_CUDA_ARCH_LIST }}
88+
CUDA_HOME: ${{ env.CUDA_HOME }}
9289

9390
- uses: actions/upload-artifact@v4
9491
with:

cibuildwheel_support/prepare_build_environment_windows_cu118.sh

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ curl --netrc-optional -L -nv -o cuda.exe https://developer.download.nvidia.com/c
88
./cuda.exe -s nvcc_11.8 cudart_11.8 cublas_dev_11.8 curand_dev_11.8 cusparse_dev_11.8 cusolver_dev_11.8 thrust_11.8
99
rm cuda.exe
1010

11-
export WITH_CUDA=1
12-
export CUDA_HOME="$CUDA_ROOT"
13-
1411
# Create pip directory if it doesn't exist
1512
mkdir -p "C:\ProgramData\pip"
1613

cibuildwheel_support/prepare_build_environment_windows_cu124.sh

-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ CUDA_ROOT="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.4"
77
curl --netrc-optional -L -nv -o cuda.exe https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_551.61_windows.exe
88
./cuda.exe -s nvcc_12.4 cudart_12.4 cublas_dev_12.4 curand_dev_12.4 cusparse_dev_12.4 cusolver_dev_12.4
99
rm cuda.exe
10-
11-
export WITH_CUDA=1
12-
export CUDA_HOME="$CUDA_ROOT"

0 commit comments

Comments
 (0)