Skip to content

Commit 3ec46e0

Browse files
committed
different approach for arch list
1 parent 2ec5454 commit 3ec46e0

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/publish.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ jobs:
6262
CPU_TRAIN: ${{ runner.os == 'macOS' && 'true' || 'false' }}
6363
WITH_CUDA: ${{ matrix.cuda != 'cpu' && '1' || '0' }}
6464

65+
- name: Set CUDA arch list for Windows
66+
if: matrix.os == 'windows-2019'
67+
run: |
68+
if [[ "${{ matrix.cuda }}" == "cu118" ]]; then
69+
echo ("TORCH_CUDA_ARCH_LIST='3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9+PTX'") >> $env:GITHUB_ENV
70+
elif [[ "${{ matrix.cuda }}" == "cu124" ]]; then
71+
echo ("TORCH_CUDA_ARCH_LIST='5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX'") >> $env:GITHUB_ENV
72+
fi
73+
6574
- name: Build wheels
6675
if: matrix.os == 'windows-2019'
6776
shell: cmd # Use cmd on Windows to avoid bash environment taking priority over MSVC variables
@@ -71,7 +80,8 @@ jobs:
7180
WITH_CUDA: ${{ matrix.cuda != 'cpu' && '1' || '0' }}
7281
DISTUTILS_USE_SDK: "1" # Windows requires this to use vc for building
7382
SKIP_TORCH_COMPILE: "true"
74-
CIBW_BUILD_VERBOSITY_WINDOWS: "2"
83+
CIBW_BUILD_VERBOSITY_WINDOWS: "1"
84+
TORCH_CUDA_ARCH_LIST: ${{ env.TORCH_CUDA_ARCH_LIST }}
7585

7686
- uses: actions/upload-artifact@v4
7787
with:

cibuildwheel_support/prepare_build_environment_windows_cu118.sh

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ rm cuda.exe
1010

1111
export WITH_CUDA=1
1212
export CUDA_HOME="$CUDA_ROOT"
13-
export TORCH_CUDA_ARCH_LIST="3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9+PTX"
1413

1514
# Create pip directory if it doesn't exist
1615
mkdir -p "C:\ProgramData\pip"

cibuildwheel_support/prepare_build_environment_windows_cu124.sh

-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ rm cuda.exe
1010

1111
export WITH_CUDA=1
1212
export CUDA_HOME="$CUDA_ROOT"
13-
export TORCH_CUDA_ARCH_LIST="5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX"

0 commit comments

Comments
 (0)